con un clic
cmd-pr-sculpt-code
// Reshape code for readability, naming, structure, TODOs, and reduced surface area across any language
// Reshape code for readability, naming, structure, TODOs, and reduced surface area across any language
Ask the agent whether it finished everything or has more to do — a lightweight completeness gate for the end of any task
Audit personal skills for redundancy, verbosity, weak triggers, and overlap. Runs a Claude→Codex review loop, presents per-item approval checkboxes, then applies approved edits and updates README and agent metadata. Use when asked to "review my skills", "audit my skills", "revisit my skills", or "clean up my skills". Accepts an optional skill name to scope the review to a single skill.
Set up or extend golden/snapshot tests for a project. Covers fixture design, Makefile targets, snapshot storage, diff workflow, and update protocol.
Resolve merge conflicts systematically with context-aware 3-tier classification and escalation protocol
Create or improve Makefiles with minimal complexity. Templates available: base, python-uv, python-fastapi, postgres, nodejs, go, chrome-extension, flutter, electron, static-site.
Build high-signal PR context for review with diff analysis, risk assessment, and discussion questions
| name | cmd-pr-sculpt-code |
| description | Reshape code for readability, naming, structure, TODOs, and reduced surface area across any language |
| disable-model-invocation | false |
Reshape code quality across nine dimensions. Scope to branch changes by default, or accept explicit file/directory targets.
Philosophy: Write code for the next reader (human, agent, or RAG indexer). Minimize cognitive load. Prefer boring, obvious code over clever code. Every change must preserve business logic unless explicitly told otherwise.
Default (no scope specified): diff the current branch against the repo's base branch.
Detect the base branch in order — stop at the first success:
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/nullgit remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | xargsgit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'Do not assume main or master. If all methods fail, ask the user.
Once resolved, run:
git diff <base>...HEAD -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"
If the user specifies a scope, use the corresponding command instead:
| Scope | Command | What it covers |
|---|---|---|
unstaged | git diff HEAD -- <excludes> | All uncommitted changes (staged + unstaged) |
staged | git diff --cached -- <excludes> | Changes staged but not yet committed |
last commit / last 1 commit | git diff HEAD~1...HEAD -- <excludes> | Changes in the most recent commit |
last N commits | git diff HEAD~N...HEAD -- <excludes> | Changes in the last N commits |
entire repo | git ls-files | grep -vE "\.(lock|snap)$|package-lock\.json|pnpm-lock\.yaml" | All tracked source files; no diff — apply all sculpting dimensions to the full current state of the codebase |
| explicit files/dirs | (user-provided paths) | Only the specified files or directories |
For all diff commands, apply: -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"
references/python.md for language-specific guidance.file_path:line_number.data, temp, result, x, val, info without contextrepo/repository, config/configuration)if not items: over if len(items) == 0, but never at the cost of clarityis_valid, has_permission, should_retrymap/filter in JS where idiomatic)Apply the project's TODO prefix standards:
TODO: — general future workTODO_IMPROVE: — code quality improvementsTODO_OPTIMIZE: — performance improvementsTODO_TECHDEBT: — technical debt to address laterTODO_REVISIT: — design decisions that may need revisitingTODO_IDEA: — potential features to considerTODO_IN_THIS_PR: — must complete before mergeTODO_REMOVE_LATER: — temporary code with removal conditionFIXME: — known bugsHACK: — temporary workaroundsEach TODO must include:
Add missing TODOs for: known shortcuts, deferred work, temporary workarounds, and obvious improvement opportunities spotted during review. Remove stale or resolved TODOs.
# increment counter above counter += 1)IMPORTANT, NOTE, CRITICAL, DEV_NOTE markers — clean up the text, not the tagCode is increasingly consumed by agents traversing a codebase and RAG pipelines embedding individual chunks. Apply these checks in addition to the structural ones in Dimensions 3 and 4.
Self-containment: Each function should be understandable without reading its callers or surrounding file state.
Meaningful boundaries: File and module splits should reflect conceptual units, not arbitrary line-count budgets.
auth_tokens.py > helpers.py, user_processor.py > utils.py)Embeddable names: Names must carry enough signal to be useful in isolation — without surrounding code as context.
process, handle, run, execute) — add the subject (process_payment, handle_auth_error)MAX_RETRY_ATTEMPTS > THREE)Branching budget: High cyclomatic complexity fragments meaning across many paths, making any single path hard to embed or summarize.
For each file changed, show:
### file_path
**Changes made:**
- [dimension] description of change (line X)
- [dimension] description of change (line Y)
End with a summary: files touched, lines removed, TODOs added/removed, helpers extracted.