Complete Claude Code environment: global guidelines, skills, hooks, settings, version-controlled memory and…
Claude Code Environment
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A complete Claude Code environment: global guidelines, reusable skills, hooks, settings, version-controlled memory and learnings, and shared git configuration — everything symlinked into place from one repo.
Skills
---
Plan Implementation
Interactive design discussion that produces a structured plan document before any code is written.
**Command:** /plan-ralphex
**Features:**
- Researches the codebase to understand current architecture and patterns
- Asks clarifying questions and discusses design trade-offs
- Iterates on the approach until you're satisfied
- Outputs a plan in docs/plans/ with design decisions, file changes, and task breakdown
---
Create / Update PR
Prepares commits on a feature branch, pushes, and opens or updates a PR to main.
**Command:** /pr-create
**Features:**
- Reads the associated plan document and progress log for context
- Uses /reset and /commit to create clean, atomic commits from branch changes
- Rebases onto main before pushing so pr-merge can fast-forward
- Creates a new PR or updates the existing one (title, description, force-push)
- Drafts a detailed PR description with overview, changes, design decisions, and scope reconciliation
---
Merge PR
Merges a PR locally via fast-forward to preserve your GPG-signed commits.
**Command:** /pr-merge
**Features:**
- Avoids GitHub's merge UI, which re-signs commits with GitHub's own key
- Fast-forwards main to the PR branch (rebases as fallback if needed)
- Stashes uncommitted changes and restores them after merge
- Cleans up remote and local branches, prunes stale remote-tracking refs
- After pushing main, asks the session working on the same repo on the other machine to run /pull (see Peer)
---
Prepare PR
Summarizes what was done, how it matches the plan, and what the review found — all in one report before creating a PR.
**Command:** /pr-prepare
**Features:**
- Reads the plan doc, progress logs, and commits to build a complete picture
- Reports plan alignment: implemented items, unplanned additions, missing items
- Summarizes review findings: confirmed fixes, false positives, unaddressed concerns
- Read-only analysis — does not modify files or create commits
---
Clean Code
Audits modified files for dead code, duplication, needless complexity, and import hygiene.
**Command:** /clean-code
**Features:**
- Removes debug prints left from development
- Dead code audit: runs the project's own configured dead-code tooling first (an unused-symbol lint rule, knip, vulture), then traces callers to find unreachable methods, fields, imports, type members
- Duplication audit: flags repeated logic and proposes consolidation
- Complexity audit: flags nesting, nested ternaries, single-caller abstractions and unrequested generality, and proposes the simpler form
- Optimizes imports in modified files
- Iterates until clean — each removal pass may reveal new dead code
---
Review Manual
Runs a read-only review of the current change and lets the user choose what gets fixed, then fixes exactly that.
**Command:** /review-manual
**Features:**
- Calls the saved review-auto workflow with fix: false, building its scope, lenses and gate from the conversation, and passing the user's settled decisions and earlier dropped findings as context so they are not reported again
- Shows the findings as a table of checkboxes over the session, through claude/scripts/review_picker.py and a blocking agterm overlay, pre-ticked where the session recommends a fix and in lighter grey where the fix changes only wording or documentation; a row's ✎ button takes a note on how to fix it, and writing one ticks the row
- Outside agterm, publishes the same page on the tailnet and hands over its link; there Apply becomes **Copy answer**, and the user pastes the copied answer into the chat
- Falls back to the same table in chat when the page is closed without Apply, or when it is outside agterm and the page cannot be published
- Fixes only the ticked rows, following their notes, adds tests where behaviour changed, and runs the project's gate
- After fixes, says the tree changed and needs another review, since it no longer matches the bookmark the review recorded
- With nothing ticked, commits exactly the reviewed tree and moves the bookmark — message check, confidentiality scan and your yes, but none of /commit's sub-steps, whose edits would cost another review round. A later /commit reviews those unpushed commits, adds its fixes as new commits and offers the push
**Tests:** python claude/tests/review-picker.py — exit 0 when every case behaves, 1 otherwise. It stubs agtermctl on PATH and pins the picker's exit statuses and printed answer, including that a closed page is never read as an empty answer. The publish outside agterm prints NOT COVERED, since a test must not publish on the tailnet. On Windows the cases inside agterm print NOT COVERED, since an extensionless stub is invisible to a Windows PATH lookup and agterm does not run there.