Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patternsgit clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns)<a href="https://agentmods.dev/skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns"><img src="https://agentmods.dev/badge/skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.03510 |
| Opus 5 | $0.00014 | $0.01755 |
| Sonnet 5 | $0.00006 | $0.00702 |
| Haiku 4.5 | $0.00003 | $0.00351 |
Grade A, and why
agentic-harness-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agentic Harness Patterns
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.
Choose Your Problem
| If you want to... | Read |
|---|---|
| Make the agent remember and improve over time | Memory |
| Package reusable workflows and expertise | Skills |
| Let the agent use tools powerfully but not dangerously | Tools and Safety |
| Give the agent the right context at the right cost | Context Engineering |
| Split work across multiple agents without losing control | Multi-agent Coordination |
| Extend behavior with hooks, background tasks, or startup logic | Lifecycle and Extensibility |
Before you start building: Read the Gotchas — these are the non-obvious failure modes that cost the most time.
1. Memory
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:
- Instruction memory is curated, hierarchical configuration injected into system context in priority order (org-wide → user → project → local; local wins). This is where project conventions, coding standards, and behavioral rules live. It is human-authored and stable.
- Auto-memory is agent-written persistent knowledge with a type taxonomy (user / feedback / project / reference) and a capped index. Saving is two-step: write a topic file, then update the index. The cap prevents unbounded growth — without cleanup, recent entries silently disappear.
- Session extraction runs as a background agent at session end. It directly writes to auto-memory — topic file then index — following the same two-step save invariant. A mutual-exclusion guard ensures that if the main agent already wrote memory during the turn, the extractor skips entirely. This is the autonomous learning loop.
- Review and promotion audits across all memory layers and proposes cross-layer moves (auto-memory → project conventions, personal instructions, or team memory). It never applies changes autonomously — proposals require explicit user approval.
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- metadata.json 494 B
- references/agent-orchestration-pattern.md 14 KB
- references/bootstrap-sequence-pattern.md 15 KB
- references/context-engineering-pattern.md 2.4 KB
- references/context-engineering/compress-pattern.md 8.3 KB
- references/context-engineering/isolate-pattern.md 9.8 KB
- references/context-engineering/select-pattern.md 9.0 KB
- references/hook-lifecycle-pattern.md 15 KB
- references/memory-persistence-pattern.md 14 KB
- references/permission-gate-pattern.md 15 KB
- references/skill-runtime-pattern.md 15 KB
- references/task-decomposition-pattern.md 8.8 KB
- references/tool-registry-pattern.md 13 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 252 lines · 28 tokens per session scan A 1e72510fb053
agentic-harness-patterns is a skill published in the GitHub repository keli-wen/agentic-harness-patterns-skill (302 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 3,510 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
harness-creator
Build, audit, and improve harnesses that make AI coding agents reliable: AGENTS.md/CLAUDE.md instruction files, feature/state tracking, verification gates, scope boundaries, session handoff, memory persistence, context budgets, tool-permission safety, and multi-agent coordination. Use this whenever a coding agent is…
openloomi-memory
OpenLoomi Memory is the long-lived context layer of OpenLoomi — a tiered, locally-stored knowledge graph that grows on its own from your Connectors, chats, and Screen Capture. Memory is what makes Chat grounded and what Loop reads before it produces a Decision. It is always on your machine (local-first), always…
continual-learn
Persist learning across turns by actively maintaining MENTALMODEL.md in the workspace. Use for iterative coding, debugging, benchmarking, or any feedback-driven task; read and update the file with actual filesystem writes before every response, never just hidden/internal memory.
algorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…
slack-gif-creator
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.