agentleFS
namlifurkannamlifurkan/claude-code-reviewer/skills/example-laravel/skill.md

example-laravel

Skill1 starsChanged 3 months agoMITView on GitHub

Review Laravel PRs with inline line-based comments categorized by severity

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    ONLY leave comments for issues/bugs/concerns: No positive or praise comments.

    line 62
  2. Very specific:

    Check migrations for rollback safety (down() method)

    line 77
  3. Very specific:

    Verify mass assignment protection ($fillable / $guarded)

    line 78
  4. Distinctive:

    Before reviewing, fetch relevant Laravel documentation for features used in the diff:

    line 82
  5. Distinctive:

    After submitting, summarize findings:

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

Laravel PR Review

You are tasked with reviewing a GitHub Pull Request on the {{GITHUB_REPO}} repository and leaving inline line-based comments directly on the diff.

Input

User will provide a PR number.

Process

1. Gather PR Information

gh pr view <PR_NUMBER> --repo {{GITHUB_REPO}} --json title,body,state,author,baseRefName,headRefName,files,additions,deletions
gh pr diff <PR_NUMBER> --repo {{GITHUB_REPO}}
gh api repos/{{GITHUB_REPO}}/pulls/<PR_NUMBER> --jq '.head.sha'

2. Analyze the Diff

Review ALL changed files carefully. Focus on:

  • Bugs and logic errors
  • Missing edge cases or null checks
  • Behavioral changes that may break existing functionality
  • Type mismatches or incorrect casts
  • Deleted tests without replacement coverage
  • Security concerns (SQL injection, XSS, mass assignment)
  • Migration issues (column types, indexes, rollback safety, data loss risk)
  • N+1 query problems

3. Categorize Findings by Severity

  • Major: Bugs, data loss risk, breaking behavioral changes, missing validations, dangerous migrations, security vulnerabilities
  • Minor: Design concerns, missing coverage, questionable decisions that won't break but should be discussed
  • Trivial: Inconsistencies, style issues, small questions about intent

4. Submit Review with Inline Comments

cat <<'JSONEOF' | gh api repos/{{GITHUB_REPO}}/pulls/<PR_NUMBER>/reviews --method POST --input -
{
  "commit_id": "<COMMIT_SHA>",
  "event": "COMMENT",
  "body": "<Summary of findings: X major, Y minor, Z trivial>",
  "comments": [
    {
      "path": "path/to/file.php",
      "line": <LINE_NUMBER_IN_NEW_FILE>,
      "body": "**[Major]** Description of the issue."
    }
  ]
}
JSONEOF

Rules

  1. ONLY leave comments for issues/bugs/concerns. No positive or praise comments.
  2. Every comment MUST have a severity prefix: **[Major]**, **[Minor]**, or **[Trivial]**.
  3. Comments must be on diff lines only. The line field refers to the line number in the NEW version of the file.
  4. Be concise and actionable. State the problem and suggest a fix.
  5. Write all review comments in {{REVIEW_LANGUAGE}}.
  6. Do NOT comment on deleted files.

Laravel-Specific Checks

  • DB::table() does NOT auto-apply SoftDeletes — verify whereNull('deleted_at') filters
  • Nullable fields cast with (int) turn null into 0 — check for logic bugs
  • Collection::get() can return null — verify nullsafe operator (?->) usage
  • factory() helper is deprecated — use Model::factory()
  • PHPUnit 10+ uses #[DataProvider()] attributes, not @dataProvider annotations
  • Data providers must be static methods
  • Check migrations for rollback safety (down() method)
  • Verify mass assignment protection ($fillable / $guarded)

Documentation References

Before reviewing, fetch relevant Laravel documentation for features used in the diff:

WebFetch url="https://laravel.com/docs/11.x/eloquent#soft-deleting"
WebFetch url="https://laravel.com/docs/11.x/eloquent-mutators#attribute-casting"
WebFetch url="https://laravel.com/docs/11.x/migrations#available-column-types"

Adjust the version (11.x) to match the project's composer.json.

Output

After submitting, summarize findings:

  • Count per severity (e.g., "2 Major, 3 Minor, 1 Trivial")
  • Brief one-liner per comment

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.