agentic-harness-patter…
AI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。
Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap.
$ npx -y skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/agentic-harness-patternsContext preview
The summary Claude sees to decide when to auto-load this skill.
Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap.
name: agentic-harness-patterns description: >- Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap. when_to_use: >- Triggers on: harness engineering, tool safety, permission pipeline, agent memory, memory persistence, delegation pattern, context budget, bootstrap sequence, skill runtime, hook lifecycle, tool orchestration, agent harness, context engineering. license: MIT
Production AI coding agents are not just an LLM calling tools in a loop. The **harness** — memory, skills, safety, context control, delegation, and extensibility — is what separates a demo from a production system.
**For:** Engineers building or extending coding-agent runtimes, custom agents, or advanced multi-agent workflows. **Not for:** Prompt engineering, model selection, generic software architecture, or LLM API basics.
All principles are distilled from production runtime decisions. Claude Code is used as grounding evidence, not as the only possible implementation.
| If you want to... | Read | |---|---| | Make the agent remember and improve over time | [Memory](#1-memory) | | Package reusable workflows and expertise | [Skills](#2-skills) | | Let the agent use tools powerfully but not dangerously | [Tools and Safety](#3-tools-and-safety) | | Give the agent the right context at the right cost | [Context Engineering](#4-context-engineering) | | Split work across multiple agents without losing control | [Multi-agent Coordination](#5-multi-agent-coordination) | | Extend behavior with hooks, background tasks, or startup logic | [Lifecycle and Extensibility](#6-lifecycle-and-extensibility) |
**Before you start building:** Read the [Gotchas](#gotchas) — these are the non-obvious failure modes that cost the most time.
---
**User problem:** "My agent forgets corrections and project rules between sessions."
**Golden rule:** Separate what the agent *knows* (instruction memory) from what the agent *learns* (auto-memory) from what the agent *extracts* (session memory). Each layer has different persistence, trust, and review needs.
**When to use:** Any agent that operates across multiple sessions or needs to accumulate project-specific knowledge over time.
**How it works:**
**Start here:** Define your memory layers (instruction, auto, extraction). Implement the two-step save invariant (topic file, then index). Add background extraction only after the core write path is stable.
> **In Claude Code:** Use `/remember` to audit and promote auto-memory entries across layers.
**Tradeoffs:**
**Go deeper:** [references/memory-persistence-pattern.md](references/memory-persistence-pattern.md)
---
**User problem:** "I want my agent to reuse workflows and domain knowledge without re-explaining them every time."
**Golden rule:** Skills are lazy-loaded instruction sets, not eagerly injected prompts. Discovery must be cheap (metadata only); the full body loads only on activation.
**When to use:** Any agent that needs reusable, composable workflows activating on matching user intent.
**How it works:**
**Start here:** Choose a metadata format (frontmatter recommended). Implement two-phase discovery: cheap listing at startup, lazy body loading on invocation. Set a per-entry character cap before your catalog grows.
**Tradeoffs:**
**Go deeper:** [references/skill-runtime-pattern.md](references/skill-runtime-pattern.md)
---
**User problem:** "I want my agent to use tools powerfully, bu
Agent skill for harness engineering — memory, permissions, context engineering, multi-agent coordination. Distilled from Claude Code, with Codex CLI and Gemini CLI on the roadmap. EN/ZH. Install via npx skills add.
Repo: keli-wen/agentic-harness-patterns-skill
AI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。