agentic-harness-patterns

agentic-harness-patterns is a skill for Claude Code from keli-wen/agentic-harness-patterns-skill. It costs 28 tokens per session (3,510 once invoked), scanned A, original, MIT.

A guide to designing the surrounding system for coding agents: their memory, permissions, context, delegation, reusable skills, hooks, and tool access. A coding-agent harness is the runtime structure that controls how an agent works.

In plain words
What is it for?
Use it when building or extending coding-agent runtimes, custom agents, or multi-agent workflows. It covers memory, context selection, tool safety, delegation, and lifecycle behavior.
Why use it?
It helps engineers reason about the parts that make an agent reliable and safe beyond the language model itself.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it when building or extending coding-agent runtimes, custom agents, or multi-agent workflows. It covers memory, context selection, tool safety, delegation, and lifecycle behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns
Install

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.

Any agent
npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns
Clone the repo
git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill

Made for: Claude Code.

Wrote 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.

agentmods badge for agentic-harness-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns.svg)](https://agentmods.dev/skills/keli-wen/agentic-harness-patterns-skill/agentic-harness-patterns)
Your own site
<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>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash 1e72510fb053, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

skills/agentic-harness-patterns/SKILL.md · 252 lines

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.

Read the full file on GitHub · 252 lines

Changes

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.

  1. 8d ago First seen · 252 lines · 28 tokens per session scan A 1e72510fb053

Subscribe to this mod's changes

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.

Related

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…

walkinglabs/learn-harness-engineering · 142 tokens

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…

melandlabs/openloomi · 74 tokens

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.

melandlabs/openloomi · 55 tokens

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…

alleneee/skill-agent · 62 tokens

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".

alleneee/skill-agent · 57 tokens

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.

alleneee/skill-agent · 59 tokens