prompt-contract
Fill the nine-slot prompt contract, then grill, then hand off to a clean Claude session. Use for new substantial tasks. Do not implement in this session.
- License 许可
- MIT
- 最近更新
- 2026-09-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- prompt-contract
- description
- Fill the nine-slot prompt contract, then grill, then hand off to a clean Claude session. Use for new substantial tasks. Do not implement in this session.
02 资源文件 1
- 参考文档reference.md650 B
03 SKILL.md 正文
Prompt contract
You are in the enrichment session. Do not implement the user's task here. Do not open extra Cursor tabs. The work happens in a new claude CLI terminal after launch.
If the user typed /deep-ask ..., treat the rest of the message as the original request.
1. Fill these nine slots
Infer when obvious. Ask only for missing high-impact slots. Multiselect is allowed for role, audience, and length/tone. Do not ask for a raw model id unless they volunteer an override (opus, sonnet, ultra, or a profile name).
| # | Slot | Notes |
|---|---|---|
| 1 | Role | senior backend, staff SRE, tech lead, security reviewer, … |
| 2 | Audience | implementing agent, PR reviewer, beginner, future-you |
| 3 | Goal | one-sentence deep ask and the deliverable |
| 4 | Context | repo, stack, files, constraints; or “none / infer from repo” |
| 5 | Constraints / non-goals | must / must not |
| 6 | Output format | code+tests, plan only, diff, ADR, commands |
| 7 | Length / tone | short, informal, rigorous, production-ready |
| 8 | Success criteria | observable done-when |
| 9 | Model profile | fast code reason heavy vision (auto; user may override) |
Profile tie-break: vision if screenshots/UI; else heavy if many files / production / security; else reason if debug/design/investigate; else code if the output is code/tests; else fast.
Optional (only if they change the work): examples, tools/sources, plan-then-code vs jump-to-code.
See reference.md in this skill for the assembled markdown shape.
2. Grill
Follow ~/.claude/skills/design-tree-interview/SKILL.md (or /grill-plan). Fill remaining contract slots from the tree. Escape: “just go”, “skip grill”, /skip-enrich. If they get lost, restate-plain.
3. Handoff and launch
When the frontier is empty (or they skip):
- Follow
~/.claude/skills/session-handoff/SKILL.md. Start the file with<!-- PROMPT_CONTRACT_V1 -->and include the nine slots plus original request. - Run (replace the path with the file you wrote):
~/.claude/hooks/prompt-enrich/launch-clean-claude.sh --file <handoff-path>
- Tell the user the saved path and that work continues in the new terminal. Suggest that session load
implement-terse. - Stop. Do not start coding in this session. The new tab is the only implementer; this tab continuing will 429 OpenRouter.
04 同仓库更多 Skills
verify-before-done
Use before claiming work is complete, fixed, or passing, and before commit or PR. Run the proof command in this turn.
token-playbook
Token budget for Claude Code. Use when shrinking CLAUDE.md, choosing skills vs rules vs MCP, compressing tool output, or cutting always-on context.
test-writer
Write failing tests from a technical spec and public contracts only. Use in /dev-loop test-writer stage. Do not read implementation sources or write production code.
tdd
Use when implementing a feature or bugfix, before writing production code. Test first, watch it fail, then implement. Vertical slices at public seams.
systematic-debugging
Use when hitting a bug, test failure, or unexpected behavior, before proposing a fix. Find root cause first.
story-spec
Turn a Jira story into a technical spec via grill. Use in the spec stage of /dev-loop. Do not implement.