Index of every page on this site: llms.txt
All skills
haythamasalama avatar

/laravel-code-quality

@54e769e
Run it yourself

Use when writing, reviewing or cleaning up Laravel PHP for quality and safety rather than layout — formatting with Pint, one-line method signatures, named arguments, the few-comments rule and when PHPDoc is allowed, naming and types, readable conditionals (guard clauses, named conditions, elseif, match), private methods over single-use classes; security (fail-closed authorization, routes inside auth groups, file-route permissions, row-level visibility, Form Request validation, one-value-or-list fields, mass assignment, bound raw SQL, XSS, secrets and env(), throttle keys, random_int, signed public links); sensitive operations such as refunds, payouts, data exports and access grants (duplicate-submit protection, once-only execution, maker-checker approvals, self-approval, overrides, step-up auth, append-only audit logs, masking, bounded output); tests that guard all of this; the numbered anti-pattern catalogue; the code review report format. Also triggers on "review this diff", "code review", "clean this up", "is this secure", "anti-pattern", "double submit", "approval flow", "audit log", "مراجعة الكود", "جودة الكود", "تنظيف الكود", "التعليقات", "ثغرة", "أمان", "موافقات".

Use this Skill: https://skilld.dev/gh/haythamasalama/skills/laravel-code-quality

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesreview-output.md

≈698 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Review output

Read when: reporting the findings of a code review, by hand or from a reviewer agent. Owns: the report template, ordering, tone, and the definition of each severity.

TL;DR

  • Cite file:line for every finding.
  • Pair each problem with the corrected code.
  • Security and boundaries first; formatting last or not at all (Pint owns it).
  • Mark each finding 🔴, 🟡 or 🟢 as defined below. Cite the anti-pattern number when one matches.
  • Omit empty sections. Say plainly when a change is solid.

Severity

Flag Meaning In review Typical findings
🔴 Critical must fix before merge block security holes, broken module boundaries, partial writes (no transaction), once-only work that can run twice, response-contract regressions
🟡 Warning should fix; debt if left fix in this change if reasonable, otherwise a follow-up raw arrays for DTOs, logic in a controller, missing eager loads, comments that restate code
🟢 Suggestion optional recommend; do not block naming, small refactors the author may defer

Template

## Review

### Files reviewed
- `src/Domain/Billing/Actions/IssueRefund.php`
- `app/Http/Controllers/RefundController.php`

### Verdict
✅ Approve  /  ⚠️ Approve with suggestions  /  ❌ Changes required

### Security
- 🔴 `routes/web.php:88` — export route outside the auth group (#53).

### Boundaries and layers
- 🔴 `RefundService.php:42` — query in a Service (#5). Move it to `GetPendingRefunds` and delegate.

### Data and queries
- 🟡 `RefundController.php:31` — `$request->all() + [...]` lets the request override `customer_id` (#32).

### API and responses
- 🔴 `RefundController.php:57` — `store` returns 200 (#69); return 201 with the resource.

### Code quality
- 🟡 `IssueRefund.php:12` — comment restates the next line (#49); delete it.

### Suggestions
- 🟢 …

### Seen nearby (not blocking)
- Older problems in files the change touched, one line each.

### What is good
- Specific, not generic ("the transition guard covers self-approval and has a test for it").

### Summary
Files: 2 · 🔴 3 · 🟡 2 · 🟢 1

How to write findings

  • One finding per problem, with the offending line and the fix side by side when it is not obvious.
  • Lead with what can break production or leak data, then boundary violations, then the rest.
  • Suggest the fix; do not only name the smell.
  • Point to the anti-pattern number instead of re-explaining it.
  • Keep it short. A balanced review gets read; a wall of nits gets ignored.
  • Scope findings to what the change touched. Pre-existing problems go under "Seen nearby", not in the blocking list.
  • Do not flag a decision the project documented as a deliberate deviation.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts20d3 checks · Risk SAFE
  • Gen Agent Trust Hub20d

    This skill provides a comprehensive framework for auditing and improving Laravel PHP code. It focuses on security, clean code principles, and sensitive operations, providing the AI agent with specific anti-patterns to detect and standard auditing commands to verify codebase integrity.

  • Socket20d

    No alerts

  • Snyk20d

    Risk: LOW · No issues

Signed by skilld at 54e769e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 3 weeks ago
Other metadata
metadata
{
  "summary": "Laravel code style, security, sensitive operations and code review.",
  "tags": "laravel, php, security, code-review, clean-code"
}

README badge

README badge for haythamasalama/skills/laravel-code-quality