SKILL.md
$27
State the evaluation target and what kind of judgment is needed (value, risk, or tradeoff). Take a current-state snapshot: what it does, who uses it, what depends on it; grep and read before opining.
For product pivot, commercialization, or business-direction requests, frame the market, user, distribution, willingness-to-pay, and maintenance burden before proposing technology. Do not assume open source, do not assume implementation comes first, and do not hide a business judgment inside a technical plan.
Output format (Kill/Keep/Pivot):
Line 1: one of Kill / Keep / Pivot as the verdict. No preamble.
Then three reasons, based on the user's actual constraints (time, motivation, business model, maintenance cost). Not generic tradeoffs.
If verdict is Pivot: list specific directions on separate lines, one per line, each actionable.
If verdict is Kill or major rework: list impact scope (files, dependents, migration cost) before asking for confirmation.
Do not use a build-plan template here. Do not list options. Give one verdict.
Distinction from Lightweight Mode: Lightweight answers "how to fix it" (method). Evaluation answers "should it exist" (value judgment).
Before Reading Any Code
- Confirm the working path:
pwdorgit rev-parse --show-toplevel. Never assume~/projectand~/www/projectare the same.
- If the project tracks prior decisions (ADRs, design docs, issue threads), skim the ones matching the problem before proposing. Skip if none exist.
- If the plan involves a default value, env var, or config field, open the project's actual config file (e.g.
pake.json,tauri.conf.json,package.json,.env) and lift the live value. Never quote a default from memory or docs.
Durable Context Preflight
Run this only when the user mentions memory, preview, previous decisions, or a prior conclusion; when they provide a memory path; or when the current project exposes an obvious local memory summary. Do not hard-code machine-specific memory roots or read raw transcripts.
Read durable context in this order: user-provided path, current project scope, then global preferences. List titles first, then open at most 1-2 relevant summaries. Treat cross-project entries as transferable patterns only.
Map memory types before using them: decision, preference, and principle are planning constraints; pattern and learning are design checks; fact must be verified against current state before it affects the plan. Current repo state, live docs, logs, tests, and remote state override memory; if they conflict, name the conflict and follow current state.
For /think, lock durable decisions and preferences before asking questions. Do not ask the user to restate an intent that the durable context already establishes unless it is risky, stale, or contradicted by current state.
Before outputting any plan, scan the project's AGENTS.md, CLAUDE.md, .claude/rules/*.md, and any local agent-memory summary if the user pointed at one. If the proposed plan contradicts a "hard rule", "never X", "must Y", or "prefer Z" stated in those files, surface the contradiction in the plan output (one sentence: which rule, which step contradicts it, recommended resolution). Do not silently override the rule. If the rule blocks the plan, stop and ask before continuing.
Check for Official Solutions First
Before proposing custom implementations, search for framework built-ins, official patterns, and ecosystem standards. Use Context7 MCP tools to query latest docs when available. If an official solution exists, it is the default recommendation unless you can articulate why it is insufficient for this specific case.
Propose Approaches
Give one recommended approach with rationale. Include effort, risk, and what existing code it builds on. Mention one alternative only if the tradeoff is genuinely close (>40% chance the user would prefer it). Always include one minimal option.
For the recommendation, identify the most fragile assumption (premise collapse) and state it explicitly: "This plan assumes X. If X does not hold, Y happens." If the assumption is load-bearing and fragile, deform the design to survive its failure.
Blocking ambiguities: if requirements have a conflict the user must resolve (two contradicting sources, two valid interpretations with different cost), name the specific conflict in one sentence and ask which takes precedence. Do not silently pick.
Additional attack angles (run only when the plan involves external dependencies, high concurrency, or data migration):
Attack angle
Question
Dependency failure
If an external API, service, or tool goes down, can the plan degrade gracefully?
Scale explosion
At 10x data volume or user load, which step breaks first?
Rollback cost
If the direction is wrong after launch, what state can we return to and how hard is it?
If an attack holds, deform the design to survive it. If it shatters the approach entirely, discard it and tell the user why. Do not present a plan that failed an attack without disclosing the failure.
Get approval before proceeding. If the user rejects, ask specifically what did not work. Do not restart from scratch.
Validate Before Handing Off
- More than 8 files or 1 new service? Acknowledge it explicitly.
- More than 3 components exchanging data? Draw an ASCII diagram. Look for cycles.
- Every meaningful test path listed: happy path, errors, edge cases.
- Can this be rolled back without touching data?
- Every API key, token, and third-party account the plan requires listed with one-line explanations. No credential requests mid-implementation.
- Every MCP server, external API, and third-party CLI the plan depends on verified as reachable before approval.
No placeholders in approved plans. Every step must be concrete before approval. Forbidden patterns: TBD, TODO, "implement later," "similar to step N," "details to be determined." A plan with placeholders is a promise to plan later.
Implementation Handoff
A finished plan must be executable by another engineer or agent without re-deciding the direction. Include:
- Scope and non-scope.
- The chosen approach and the one rejected alternative, if the tradeoff was close.
- Public API, schema, command, config, or file-interface changes, if any.
- Verification commands and manual acceptance checks.
- Release, publish, migration, or issue/PR follow-through steps, if the task naturally continues there.
- Rollback or failure handling for any step that can leave external state changed.
When the user asks to export a handoff, or when the environment prevents further execution, make the handoff execution-ready instead of explaining the limitation. Include file targets, key constants or selectors, exact commands, runtime or visual checklist, and risk boundaries. If the work depends on a screenshot or artifact, name the artifact and the pass/fail delta.
When the user later says "Implement the plan", "可以干", "直接改", "整", or equivalent, treat that as approval of the written plan. Do not re-litigate the design. State which plan is being executed, check for obvious drift in the repo, and proceed. If the environment has changed enough that the plan is unsafe, name the specific drift and stop before editing.
Gotchas
What happened
Rule
Moved files to ~/project, repo was at ~/www/project
Run pwd before the first filesystem operation
Asked for API key after 3 implementation steps
List every dependency before handing off
User said "just do it" or equivalent approval
Treat as approval of the recommended option. State which option was selected, finish the plan. Do not implement inside /think.
Planned MCP workflow without checking if MCP was loaded
Verify tool availability before handing off, not mid-implementation
Rejected design restarted from scratch
Ask what specifically failed, re-enter with narrowed constraints
User said "just fix X" and skipped /think
If the fix touches 3+ files or needs a method choice, pause and run Lightweight Mode
User approved a concrete plan and the agent debated the plan again
Execute the approved plan. Only stop for repo drift, missing permissions, or unsafe external state
Picked a regional or locale-specific API variant without checking
List all regional or locale differences before writing integration code
Introduced a second language or runtime into a single-stack project
Never add a new language or runtime without explicit approval
User said "判断一下这个报错" and got Evaluation Mode
"判断一下" + error/bug context = debugging, route to /hunt. Evaluation Mode is for value/existence judgments only
Output
Approved design summary:
- Building: what this is (1 paragraph)
- Not building: explicit out-of-scope list
- Approach: chosen option with rationale
- Key decisions: 3-5 with reasoning
- Unknowns: only items that are explicitly deferred with a stated reason and a clear owner. Not vague gaps. If an unknown blocks a decision, loop back before approval.
After the user approves the design, stop. Implementation starts only when requested.
After Approval
When the plan is approved, output this guidance:
Plan approved. To implement: say "implement this plan". After implementation, run `/check` to review before merging or release follow-through.
Keep it concise (2-3 sentences max). The user decides when to start implementation.