sandcastle-code-review/SKILL.md
Reviews and refines code on a branch for the Sandcastle project. Use when asked to "review", "clean up", "refine", or "code review" on a branch. Call as `/sandcastle-code-review` to review the current branch, or `/sandcastle-code-review [branch-name]` to review a specific branch. Makes improvements in place — reads the diff, fixes issues, runs tests, commits. Do NOT use for general code questions or reviews outside the Sandcastle project.
npx skillsauth add anahelenasilva/skills sandcastle-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reviews code on a branch against project standards, makes improvements directly, runs tests, and commits. If the code is already clean, does nothing.
Determine the target branch:
If $ARGUMENTS is non-empty, check out that branch first:
git checkout $ARGUMENTS
If $ARGUMENTS is empty, stay on the current branch. Confirm which branch is active:
git branch --show-current
Read the diff and recent commits to understand intent before forming any opinions:
git log --oneline -10
git diff main...HEAD # or against the appropriate base branch
Read .sandcastle/CODING_STANDARDS.md in full before proceeding. All improvements must conform to those standards.
Look for opportunities to improve, in priority order:
Complexity & structure
switch statements or if/else chainsReadability
Correctness
any types, or unchecked assumptions?Balance check — avoid over-simplification that:
If you found improvements to make:
pnpm test
pnpm run typecheck
git commit -m "refactor: <describe the improvements>"
If the code is already clean and well-structured, do nothing — no empty commits.
tools
Merges a specified branch into the current branch using pnpm-based verification (typecheck + tests), resolves conflicts, and optionally closes a GitHub issue via gh CLI. Use when the user mentions "Sandcastle", asks to merge a branch and close an issue, or references the Sandcastle merge protocol.
tools
Autonomously implements open GitHub issues labeled "Sandcastle" one at a time using the RALPH workflow (explore, plan, RGR test-first, verify, commit, close). Use when the user says "implement next Sandcastle issue", "process open issues", "run RALPH", or asks to work through the Sandcastle backlog. Assumes pnpm, gh CLI, and git are configured in the current repo.
development
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
tools
Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.