agents-best-practices

agents-best-practices is a skill for Claude Code, Codex from AnastasiyaW/codex-claude-code-config. It costs 92 tokens per session (4,420 once invoked), scanned A, a copy of agents-best-practices, MIT.

A guide for designing and evaluating software agents: systems where a model chooses actions, uses tools, receives results, and repeats until a task is complete.

In plain words
What is it for?
Use it to build or review agent loops, tool access, planning, durable task state, context handling, monitoring, and evaluations.
Why use it?
It helps prevent agents from stopping after finding a problem, acting without permission, or losing track of work between steps. It emphasizes validation, permissions, recorded results, and completion checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the claude-code-config plugin — 57 skills, 8 agents shipped together

Good fit Use it to build or review agent loops, tool access, planning, durable task state, context handling, monitoring, and evaluations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anastasiyaw/codex-claude-code-config/agents-best-practices
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 AnastasiyaW/codex-claude-code-config --skill agents-best-practices
Clone the repo
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config

Made for: Claude Code, Codex.

Or install claude-code-config, the plugin that ships this one along with the rest of its 57 skills, 8 agents.

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 agents-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/agents-best-practices/github.svg)](https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/agents-best-practices)
Your own site
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/agents-best-practices"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/agents-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agents-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/agents-best-practices"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/agents-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,420 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 89% copy Near-identical to another mod 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.00092 $0.04420
Opus 5 $0.00046 $0.02210
Sonnet 5 $0.00018 $0.00884
Haiku 4.5 $0.00009 $0.00442

Measured 5d ago against content hash bb686824cb06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

agents-best-practices 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 5d 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.

Origin

This is a copy

89% identical to agents-best-practices — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/agents-best-practices/SKILL.md · 262 lines

How it starts

The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agents Best Practices

Use this skill when the user asks how to build, improve, debug, or evaluate an agentic harness. This is a general-purpose agent architecture skill. Coding agents are one subdomain only; apply the same principles to research, finance, legal, support, operations, sales, healthcare, education, data analysis, procurement, and workflow automation agents.

Core stance

An agent harness is the control plane around a model. The model proposes actions; the harness validates, authorizes, executes, records, summarizes, and returns observations. Keep the loop simple and make the runtime rigorous.

Default architecture:

user/task
  -> instruction and context builder
  -> model call
  -> tool/action proposal
  -> schema validation
  -> permission decision
  -> execution or approval pause
  -> structured observation
  -> context update
  -> repeat within budget or finish

Completion and reconciliation

For an action request, treat a discovered problem as a state transition, not a terminal report. Before calling the request complete, reconcile every required item using the contract in completion-reconciliation.md. Diagnosis-only internal gaps re-enter owned work; final prose is never a completion signal.

When to activate this skill

Use this skill for prompts involving any of these intents:

  • build an agent, agentic workflow, AI worker, autonomous assistant, or harness;
  • create a domain-specific MVP agent design, starter harness, implementation blueprint, or first production-safe version;
  • choose between OpenAI, Anthropic, OpenAI-compatible APIs, direct tool loops, hosted tools, or SDKs;
  • design tools, permissions, guardrails, approval flows, or sandboxing;
  • design an agent for a partially known or changing environment using capability discovery, safe probing, runtime binding, schema verification, or drift invalidation;
  • reduce code-mode or programmatic-tool latency through speculative execution, partial-program analysis, futures, exact claim semantics, or cancellation of unused work;
  • create planning mode, workflow orchestration, goal mode, todo tracking, or long-running task behavior;
  • add context compaction, memory, retrieval, scoped instructions, or prompt hierarchies;
  • design a recursive language model (RLM), programmable-context runtime, self-refining or continual harness, retained child agents, daemon-backed or scheduled agent, or executable skills;
  • attach Agent Skills, reusable workflows, MCP servers, external connectors, or tool search;
  • audit an existing agent for reliability, cost, prompt-cache hit rate, safety, latency, or observability;
  • create system prompts or developer instructions for a domain-specific agent;
  • make source-of-truth knowledge, validation signals, logs, metrics, or workflow state legible to an agent.

Read the full file on GitHub · 262 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. 5d ago First seen · 262 lines · 92 tokens per session scan A bb686824cb06

Subscribe to this mod's changes

agents-best-practices is a skill published in the GitHub repository AnastasiyaW/codex-claude-code-config (149 stars, last pushed today), licensed MIT. It adds 92 tokens to every session and 4,420 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to agents-best-practices, differing in 30 lines, and is treated as a copy.