claude-code-harness
Design a real harness for an agentic system using Claude Code-inspired patterns. Use when the user needs a harness blueprint, request assembly design, execution loop, tool runtime, memory layering, permission model, transcript or recovery strategy, or wants to turn a vague agent idea into a harness-level architecture. Do not use for generic product brainstorming, simple prompt writing, or isolated code generation.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 1.6k
- Forks
- 468
01 前言 Front Matter
- name
- claude-code-harness
- description
- Design a real harness for an agentic system using Claude Code-inspired patterns. Use when the user needs a harness blueprint, request assembly design, execution loop, tool runtime, memory layering, permission model, transcript or recovery strategy, or wants to turn a vague agent idea into a harness-level architecture. Do not use for generic product brainstorming, simple prompt writing, or isolated code generation.
02 资源文件 6
- 参考文档agents/openai.yaml270 B
- 许可证LICENSE.txt1.0 KB
- 参考文档references/claude-code-derived-insights.md2.3 KB
- 参考文档references/harness-blueprint-template.md1.3 KB
- 参考文档references/harness-pattern-language.md2.2 KB
- 参考文档references/harness-principles.md2.3 KB
03 SKILL.md 正文
Claude Code Harness
Design the harness, not just the agent prompt.
This skill helps turn an agent idea into a harness blueprint that specifies:
- how a turn is assembled
- how the execution loop runs
- how tools are governed
- how memory survives boundaries
- how permissions and recovery are enforced
- how the system stays understandable to humans
What to optimize for
Prefer harnesses that are:
- explicit rather than magical
- layered rather than blended
- recoverable rather than one-shot
- bounded rather than overpowered
- product-useful rather than architecturally theatrical
Output contract
When this skill is active, default to a harness blueprint with these sections:
- System goal and delegation boundary
- Harness layers
- Request assembly design
- Turn loop design
- Tool and capability runtime
- Context and memory model
- Permissions and safety gates
- Transcript and recovery model
- Extension surfaces
- Implementation sequence
If the user is reviewing an existing design, lead with structural weaknesses and missing control planes.
Workflow
1. Clarify whether the user needs a harness at all
Start by answering:
- what job is being delegated
- what state must survive across steps or turns
- whether the system needs tools, memory, recovery, or background work
- what would break if the model were only called once
If the workflow does not need a harness, say so directly.
2. Define the harness boundary
Separate:
- the model
- the harness runtime
- external tools and systems
- durable storage
- human operators
The harness is the layer that governs the model, not the model itself.
For a deeper framing, read references/harness-principles.md.
3. Design request assembly before discussing autonomy
Specify:
- what instruction sources exist
- which sources are durable versus per-turn
- how system context and user context enter the request
- how tool affordances are exposed
- what transcript normalization or message repair is required before model calls
If request assembly is vague, the harness is still vague.
4. Design the turn loop
Make the loop explicit:
- gather context
- decide or plan
- call tools or act
- verify progress
- continue, compact, escalate, or stop
Prefer a small, legible loop over a large “AI orchestration” story.
5. Treat tools as a runtime plane
For each tool or action surface, define:
- purpose
- invocation boundary
- inputs and outputs
- permission gates
- success criteria
- rollback or recovery story
Tools are not just capabilities. They are governance boundaries.
6. Treat memory as multiple layers
Separate at least these concerns when relevant:
- active turn context
- retrieved grounding
- working memory
- durable user or project memory
- summaries and compaction artifacts
Do not collapse memory into one implicit blob.
For reusable patterns, read references/harness-pattern-language.md.
7. Design safety and control into the runtime
Specify:
- approval points
- permission modes
- destructive action gates
- visibility into pending actions
- interruption and override behavior
The harness should make power legible before it makes power scalable.
8. Design persistence and recovery
Make explicit:
- what gets logged or transcripted
- what survives a new turn
- what survives a new session
- how partial work is resumed
- how compacted history preserves semantic continuity
If the system cannot recover from partial work, it is brittle.
9. End with implementation order
Translate the harness design into a build order:
- what must exist first
- what can be layered later
- what should be validated early
- what failure modes must be tested before expansion
Use references/harness-blueprint-template.md when a formal blueprint is required.
Anti-patterns
Push back on these designs:
- prompt-only agents described as full systems
- lots of tools but no runtime governance
- memory with no boundaries or rewrite policy
- hidden background work with no transcript or user visibility
- retry loops with no stop conditions
- permissions handled as an afterthought
- extension systems added before the core loop is coherent
Style guidance
- Be concrete about boundaries and data flow.
- Name missing runtime planes explicitly.
- Prefer fewer but stronger abstractions.
- If the design is performative rather than useful, say so.
References
- Core framing:
references/harness-principles.md - Pattern language:
references/harness-pattern-language.md - Blueprint format:
references/harness-blueprint-template.md - Claude-derived lessons:
references/claude-code-derived-insights.md
Load only the reference files you need and keep the final answer operational.
04 同仓库更多 Skills
deja-search
deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.
deja-reflect
End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.
revid
Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.
review-study
Review a QuestionPunk survey before launch for wording, answer choices, branching, and missing settings. Use for check my survey or review this draft before publishing.
manage-study
Find QuestionPunk studies, check status, publish an explicitly requested draft, or retrieve its participant link. Use for find my survey, publish this study, or how many people responded.
create-study
Create a saved QuestionPunk survey draft from a research brief or edit specified questions. Use for requests such as make a customer feedback survey or shorten my onboarding study.