/frappe-fullstack:frappe-reviewfrom frappe-fullstack
Reviews Frappe/ERPNext code changes for framework idioms, security, permission correctness, and performance. Works with local diffs and GitHub PRs.
Ships in frappe-fullstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Triage Frappe/ERPNext changes before they ship. This skill gathers the diff and tooling output, loads the relevant reference rules, then hands off to the frappe-fullstack:frappe-reviewer agent for the actual line-by-line review.
When the user asks to review without naming a target, review the working tree:
git -C ${user_config.bench_path} diff HEAD --stat
git -C ${user_config.bench_path} diff HEAD
Override only when explicit:
| User says | Use |
|---|---|
| "review my last commit" | git show HEAD |
| "review the branch" | git diff $(git merge-base HEAD main)...HEAD |
"review path/to/file.py" | git diff HEAD -- <path> (and read the full file if context is needed) |
When the user pastes a GitHub PR URL (https://github.com/{owner}/{repo}/pull/{n}) or says "review PR #N":
gh pr view <url-or-number> --json number,title,body,author,baseRefName,headRefName,headRefOid,files
gh pr diff <url-or-number>
# For files where the diff alone is ambiguous:
gh pr view <url-or-number> --json files -q '.files[].path' | while read -r p; do
gh api "repos/{owner}/{repo}/contents/$p?ref=<headRefOid>" -H "Accept: application/vnd.github.raw"
done
Authentication: gh uses the user's existing gh auth login credentials, or GH_TOKEN / GITHUB_TOKEN from env. Do not prompt the user for tokens.
Posting back to GitHub is opt-in. Do NOT post the review as a PR comment unless the user explicitly says "post the review", "comment on the PR", or similar. By default, surface the review in the chat only. When the user does ask to post:
gh pr comment <url-or-number> --body-file <(printf '%s' "<review markdown>")
Frame the diff
Mode A: git diff HEAD --stat. Mode B: gh pr view --json files.
If empty, ask the user to point to what they want reviewed.
Categorize touched files:
| Pattern | Domain | Reference to read |
|---|---|---|
*.py (controllers, APIs, hooks, patches) | Frappe Python | references/frappe-python.md |
*.json inside a doctype/ path | DocType schema | references/doctype-json.md |
*.js, *.jsx, *.ts, *.tsx, *.vue | Frontend | references/frontend.md |
*.html (Jinja) | Templates | references/frappe-python.md (Jinja section) |
hooks.py, patches/, fixtures/ | Frappe infra | references/frappe-python.md |
*.css, *.scss | Style | inline rules in references/frontend.md |
Build / config (pyproject.toml, package.json, tsconfig.json, lockfiles) | Skip unless obviously broken | — |
Always apply references/security.md to every file regardless of type.
Cheap tooling first (skip whatever isn't installed; never block on tooling)
# Python — only on changed .py files
files=$(git diff HEAD --name-only --diff-filter=AM | grep '\.py$')
[ -n "$files" ] && echo "$files" | xargs -r ruff check 2>/dev/null
[ -n "$files" ] && echo "$files" | xargs -r ruff format --check 2>/dev/null
# JS/TS — only when the touched app has its own package.json / lint config
git diff HEAD --name-only --diff-filter=AM | grep -E '\.(js|jsx|ts|tsx|vue)$'
Capture findings — the reviewer agent should not re-flag what tooling already caught.
Note migration / fixture risk
git diff HEAD --name-only | grep -E '(doctype/.*\.json|patches\.txt|fixtures/|hooks\.py)$'
Any hit means the reviewer must check for a corresponding patch or after_migrate step.
Hand off to the reviewer agent
Invoke frappe-fullstack:frappe-reviewer with:
git diff HEAD or gh pr diff)<url>)ruff / eslint findings already known (so the agent ignores them)${user_config.bench_path} and ${user_config.default_site} for cross-file lookupsThe agent reads the relevant reference files itself — do not copy rule text into the prompt.
Surface the report
The agent returns a single structured report (severity buckets + verdict + What's Done Well + file-by-file table). Surface it verbatim. Do not summarize or rewrite — the user needs the citations intact.
/frappe-test separately./frappe-github after fixes.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub unityappsuite/frappe-claude --plugin frappe-fullstack13 skills in this plugin
/bench-commandsFrappe Bench CLI command reference for site management, app management, development, and production operations. Use when running bench commands, managing sites, migrations, builds, or deployments./client-scriptsFrappe client-side JavaScript patterns for form events, field manipulation, dialogs, and UI customization. Use when writing form scripts, handling field changes, creating dialogs, or customizing the Frappe desk interface./doctype-patternsFrappe DocType creation patterns, field types, controller hooks, and data modeling best practices. Use when creating DocTypes, designing data models, adding fields, or setting up document relationships in Frappe/ERPNext./frappe-apiFrappe Python and JavaScript API reference including document operations, database queries, utilities, and REST API patterns. Use when working with frappe.get_doc, frappe.db, frappe.call, or any Frappe API methods./frappe-debugFrappe DebugInvestigate a Frappe/ERPNext error or unexpected behavior. Use when the user reports an exception, a 500 response, a permission error, a slow query, a stuck background job, or an unexpected DocType state./print-formatFrappe Print Format design — Jinja templates for receipts, certificates, invoices; PDF generation; page handling; multi-currency; wkhtmltopdf rendering. Use when designing or modifying a Print Format, troubleshooting PDF rendering, or formatting documents for print. Follows the team convention of self-contained formats — no `letter_head`/`footer` injection.Other plugins' skills for the same job