clean-up-for-pr
Skill834 starsChanged 3 days agoMITView on GitHub
Clean up a completed feature, bug fix or maintained content change before PR handoff. Simplify the patch, correct code and prose, apply the required writing style guide, update agent and Sphinx documentation, check AGENTS.md conformance, and obtain an independent cross-agent review.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-curatorSkill
- add-stablecoinSkill
- add-vault-abi-methodsSkill
- add-vault-noteSkill
- add-vault-protocolSkill
- categorise-vault-strategySkill
- check-stablecoinsSkill
- check-top-list-vaultsSkill
- check-vault-onchainSkill
- document-curator-incidentSkill
- extract-project-logoSkill
- extract-test-setSkill
- extract-vault-protocol-logoSkill
- find-new-curatorsSkill
- fix-sphinx-docsSkill
- get-block-numberSkill
- Identify vault protocolSkill
- maintain-curatorsSkill
- make-releaseSkill
- monthly-vault-reportSkill
- more-vaultsSkill
- post-process-logoSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this after implementation and focused checks, before reporting the work as ready for review.
- Distinctive: line 12
When reached from a skill invoked by another skill, leave cleanup to the outermost task after all its implementation is complete.
- Distinctive: line 16
Keep the user's intended behaviour and scope.
- Distinctive: line 23
Read the applicable AGENTS.md instructions.
- Distinctive: line 37
Read new untracked source files explicitly: they are absent from git diff.
- Distinctive: line 43
Simplify the code and relevant surrounding code: Remove unnecessary abstractions, redundant state, duplicated work and speculative …
- Distinctive: line 45
Prefer existing helpers and direct control flow when they express the same behaviour more clearly.
- Distinctive: line 47
Correct misleading information: Check comments, docstrings, error messages, examples, descriptions, notes and metadata against the actual …
- Distinctive: line 55
When a repair or newly discovered vault starts collecting prices late, check whether it needs a historical price backfill.
- Distinctive: line 59
Check that runbooks and PR reminders use the production Compose command and stamped image build in the migration guide.
- Distinctive: line 65
Update Sphinx narrative/API sources, examples and index references when their contracts or usage change.
- Distinctive: line 74
Follow the prescribed Poetry, environment and focused-test commands.
- Distinctive: line 75
Review docstrings for rationale and mechanism: Keep a concise summary, then explain why the function exists, how it achieves its purpose, …
- Distinctive: line 99
Before invoking any external agent CLI, read agent tricks and troubleshooting in the current session and follow its invocation, …
- Distinctive: line 110
Do not silently substitute a moving alias or another model.
- Distinctive: line 126
Verify each finding against the actual code and sources before applying it.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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.
Files
Clean up for PR
Use this after implementation and focused checks, before reporting the work as ready for review. It applies to code, documentation, skills and manually maintained descriptions, notes and metadata. Run it once for the completed change, rather than after every nested skill or individual file edit. When reached from a skill invoked by another skill, leave cleanup to the outermost task after all its implementation is complete. A child skill returns its result to its caller without starting a separate cleanup or review.
Keep the user's intended behaviour and scope. Inspect nearby code where it helps simplify or verify the change; avoid an unrelated repository-wide refactor. Preserve other work already present in the worktree. Follow the user's existing authorisation for commits, pushes, PRs and production actions.
Establish the review scope
Read the applicable AGENTS.md instructions. Confirm the repository, branch
and worktree, then inspect tracked, staged and untracked changes:
pwd
git status --short --branch
git diff --stat
git diff --cached --stat
git diff --name-only
git diff --cached --name-only
git ls-files --others --exclude-standardInclude committed feature changes against the intended PR base when applicable.
Read new untracked source files explicitly: they are absent from git diff.
Inspect targeted hunks and the surrounding implementation rather than dumping
the entire patch into context.
Clean up the implementation and text
- Simplify the code and relevant surrounding code. Remove unnecessary abstractions, redundant state, duplicated work and speculative generality. Prefer existing helpers and direct control flow when they express the same behaviour more clearly. Keep safeguards and meaningful regression coverage.
- Correct misleading information. Check comments, docstrings, error messages, examples, descriptions, notes and metadata against the actual behaviour and authoritative sources. Distinguish a published claim from a verified fact and a historical snapshot from current state. Correct factual errors without inventing missing information.
- Update documentation. For database repairs or persisted accessor
refreshes, check the migration documentation
and require a new numbered migration or an explicit no-migration rationale.
When a repair or newly discovered vault starts collecting prices late,
check whether it needs a historical price backfill.
Standalone repair scripts are legacy format: do not recommend creating or
invoking them, or rerunning a successful initial migration for a new change.
Check that runbooks and PR reminders use the production Compose command
and stamped image build in the migration guide. Provenance comes from the
image's git commit; no host Docker hash is required. The host launcher is
optional for Docker preflight and automatic image pinning.
Revise relevant
.claude/docsguidance when the work changes an agent workflow or reveals a reusable operational lesson. Update Sphinx narrative/API sources, examples and index references when their contracts or usage change. Keep public product copy focused on the product; put repository internals in technical documentation. Read the source files and check links and references; do not build Sphinx docs or edit generated_autosummary*files. - Check repository conformance. Audit touched code and tests against
AGENTS.md, especially argument and return type hints, Sphinx:param:and:return:documentation,dataclass(slots=True),#:member comments, logging, naive UTC datetimes and the repository's address/percentage types. Follow the prescribed Poetry, environment and focused-test commands. - Review docstrings for rationale and mechanism. Keep a concise summary, then explain why the function exists, how it achieves its purpose, and any meaningful constraints or failure behaviour. Document inputs and outputs; include canonical API links and DataFrame column/value expectations where relevant. Replace prose that merely translates the implementation into English. Avoid padding simple functions or repeating inherited docstrings.
- Check the writing style guide (required for user-facing text). Read
and follow the shared
description writing style guide
for added or changed user-facing website and data text: public
descriptions, notes and metadata. Check the audience, plain language, field
formatting, sources and dated claims; remove jargon, filler, hype and
repetition. Repository engineering documentation, such as READMEs, Sphinx
pages,
.claudedocs, docstrings, code comments,CHANGELOG.mdentries and pull request descriptions, is outside the guide's scope: check it against the English rules inCLAUDE.mdonly. Reuse an earlier style review for unchanged text, but check subsequent substantive edits again. Record completion, the earlier review, or N/A when there are no user-facing text changes, including in the PR checklist when a PR is requested. - Obtain an independent review using the opposite agent as described below.
Review with the opposite agent
Before invoking any external agent CLI, read agent tricks and troubleshooting in the current session and follow its invocation, permissions, streaming, timeout and completion rules. That document owns the CLI recipes.
| Implementing agent | Required reviewer | Requested model |
| Codex | Claude CLI | Opus 5.5 (--model claude-opus-5-5) |
| Claude | Codex CLI | GPT 6.1 sol (--model gpt-6.1-sol; smoke-test availability) |
Resolve and smoke-test the exact requested model before a substantial review. Do not silently substitute a moving alias or another model. If the requested CLI/model cannot run after checking its setup, report the review as incomplete with the concrete reason; finish the independent cleanup that remains possible.
Give the reviewer the task intent and reviewed file groups, including new
untracked files and relevant surrounding code. Require it to verify the worktree
and non-empty patch, read AGENTS.md, and inspect the files itself. Ask for
findings ranked by severity with file:line references and residual risks,
covering correctness, regressions, missing tests, misleading text and repository
instruction compliance. Request concrete simplifications only when they remove
demonstrated unnecessary complexity without changing the intended behaviour.
The reviewer must not edit files, run tests, change GitHub or production state, invoke this cleanup skill, or start another reviewer. Only the implementing agent runs the cleanup workflow; this prevents recursive review chains.
Verify each finding against the actual code and sources before applying it. Fix substantiated issues within scope and re-run affected checks. Request a focused follow-up if a fix changes behaviour or leaves a material concern unresolved. Accept only a completed review with a final verdict, never a partial event stream or an empty output file.
Finish the handoff
Format only the reviewed Python paths, including reviewed new files, with
poetry run ruff format path/to/changed.py path/to/new.py. Run the relevant
focused checks and git diff --check. Inspect the final status and patch,
including staged and untracked files. Do not start a Sphinx build or the whole
test suite as a cleanup check.
Report the cleanup made, checks run, writing-style review status, reviewer and model used, review outcome, and any remaining limitations. Keep the repository's required PR description format when a PR was requested. Do not claim PR readiness when a required review or check remains incomplete.
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
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.

