Agents Best Practices
AnastasiyaW/codex-claude-code-config
A skill your agent uses when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion.
A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practices --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .claude/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practices --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .agents/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practices --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .cursor/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practices --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .gemini/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practicesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .github/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install DenisSergeevitch/agents-best-practices agents-best-practices --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agents-best-practices" agent skill from https://github.com/DenisSergeevitch/agents-best-practices/tree/main into .opencode/skills/agents-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agents-best-practices", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agents-best-practicesA skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.
Agents Best Practices is an agent skill from DenisSergeevitch/agents-best-practices. Use this skill when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain. Covers provider-neutral agent architecture for OpenAI, Anthropic, and OpenAI-compatible APIs: agent loops, tool design, record provenance, interactive presentation, user-memory lifecycles, environment-adaptive tools, speculative tool execution, late-bound capabilities, permissions, system prompts, planning, goals, always-on agents and durable runtime, adaptive…
Its SKILL.md is about 7.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 33 other files, including reference files and assets (for example `README.md`, `references/adaptive-agent-teams.md` and `references/agent-legibility-feedback-loops.md`).
It sits in AI & LLM Engineering, covering Prompt engineering, LLM evaluation and LLM cost and token optimization. It works with Model Context Protocol and OpenAI. The repository describes itself as: Provider-neutral Agent Skill for Codex, Claude Code, and agentic harness design. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 28e87b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developers.openai.comanthropic.comagentskills.ioopenai.commodelcontextprotocol.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agents Best Practices loads about 7.4k tokens when it runs, and up to ~116k if it reads all its reference files. Until then it costs about 213 tokens; SKILL.md has 3,073 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from DenisSergeevitch/agents-best-practices at commit 28e87b5, republished under its MIT licence (© DenisSergeevitch). 3,073 words, ~7,385 tokens.
.claude/skills/agents-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 30 other files; get the full folder from GitHub.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.
Canonical source: DenisSergeevitch/agents-best-practices, branch main. Installed copies are snapshots, not guaranteed-current guidance.
Before applying this skill in each new task:
main commit through an approved network tool and compare it with the installed copy's recorded source revision. A version number alone does not prove freshness. If the copy is behind or its provenance is unknown, retrieve SKILL.md and the needed references from that exact commit, then reread the entry point before using it. Record the source commit and skill version in working state; keep the task on that coherent snapshot rather than mixing revisions or repeatedly polling.main with the verified canonical remote may update by fast-forward only. Refresh a copied installation's owned Markdown package together only when its prior baseline proves there are no local customizations; otherwise use an isolated upstream snapshot for this task. Update installer-managed packages through their supported installer, not by editing caches. Never overwrite dirty, divergent, customized, or actively maintained source trees, delete unrelated files, or bypass filesystem approval.This updates skill knowledge only, not runtime policy or permissions. Preserve skill governance and higher-priority instructions; do not execute downloaded code or recursively invoke self-update. When maintaining this repository, inspect the baseline and upstream revision without automatically replacing the working tree under edit.
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 finishUse this skill for prompts involving any of these intents:
Do not use this skill for ordinary single-turn writing, translation, or Q&A unless the user is asking about the design of an agent that will perform those tasks.
First, identify the user's design problem:
Then load the most relevant reference files, not all files by default. If the user asks to make or build an agent for a domain, default to MVP Builder Mode.
When the user asks to make, build, design, scaffold, or specify an agent for a domain, produce a concrete domain-specific MVP harness blueprint, not only advice. Use mvp-agent-blueprint.md as the primary reference and load other references as needed.
Default behavior:
When the user brings a failing run or runtime symptom, start with troubleshooting and load the linked mechanism owner as needed. Return the symptom, earliest failing boundary, observed evidence versus hypotheses, one discriminating probe, smallest corrective change, and regression coverage. State missing evidence explicitly; use a focused diagnostic handoff instead of the full architecture blueprint. Inspect advanced components only when the failing deployment uses them.
Use this mode when the user wants an agent running on a physical board, a firmware/app installation, or device-runtime debugging. Read hardware-agents.md before choosing an installer. Establish board/runtime identity, inference location, actual boot/launcher/partition path, resource headroom, preserved state, and recovery access. A filesystem app may not require reflashing base firmware. For installation or debugging of an existing agent, use a focused target/install/preservation/verification handoff rather than the full MVP blueprint or unrelated workflow/subagent/connector design. Use the blueprint when the agent architecture itself is being created.
Keep deployment authority separate from runtime tool authority and public posting. Default to one read-only cycle; recurring autonomy and programmable/physical tools remain post-MVP unless requested. An installation handoff must name the measured target, pinned artifact, write boundary, preservation/rollback plan, and physical commissioning evidence. Do not equate a successful upload or host-backed emulator with standalone device health.
Use this mode when the useful tool catalogue, schemas, versions, or implementations are late-bound rather than fully configured before the run. Read environment-adaptive-tools.md together with the standard tool, connector, security, and eval references.
Require a small trusted bootstrap interface, host-owned capability ledger, provenance-labeled descriptors, bounded read-only or isolated probes, opaque scope-and-version bindings, call-time permission checks, and drift invalidation. Discovery, generated code, and inferred schemas must never grant authority. Keep this post-MVP unless adapting to changing environments is the product's primary job; even then, establish a fixed read-only baseline first.
Use this mode when the user requests an always-on service, recoverable sessions, accepted inputs during active work, durable task/application state, or observer reconnection. Read always-on-agents.md with the loop, tool, context, security, and eval owners. Keep this post-MVP: measure a simpler request-scoped or resumable baseline first. Availability, persistence, inference activity, and authority are separate choices; ordinary always-on operation does not require recursion or self-refinement.
Return the acceptance and commit boundary, input/control lanes, owned task lifecycle, document scope and fork policy, observation/reconnection contract, resident ownership, recovery, and aggregate limits. Reuse the existing goals, permissions, compaction, and child protocols; a durable submission receipt or idle generation is not proof of completed work.
Use this mode only when the user explicitly asks for programmable context, recursive execution, retained children, continual refinement, or executable skills. Treat it as post-MVP: establish a measured single-loop baseline first, then read self-refining-recursive-harnesses.md together with the context, workflow, permission, security, and eval references. For resident operation or scheduled re-entry alone, use Always-on Agent and Durable Runtime Mode.
Make the context representation, recursive unit, mutable state, promotion scope, lifecycle, budgets, validation probes, and rollback path explicit. Keep base authority, permission enforcement, credentials, budgets, and evaluation policy outside the mutable surface.
Use this mode when the user requests collaborating teams that explore distinct approaches and change assignments as evidence develops. Keep it post-MVP: establish measured single-agent and ordinary parallel-worker baselines first, then read adaptive-agent-teams.md with the workflow, recursive lifecycle, goal, and eval owners.
Return the approach portfolio, work-overlap policy, communication dependencies, evidence-linked transitions, host authority, aggregate budget, and acceptance evidence. Use the profile's contracts and existing owners rather than repeating their manuals. Treat it as an architecture composition; published scale or outcomes do not establish a model change or general performance gain. Routine lookup tasks still use the single-loop MVP.
Use this mode only when the user explicitly asks to reduce latency by launching tool work before a generated program or action is complete. Establish measured sequential and ordinary committed-parallel baselines first, then read speculative-tool-execution.md together with the loop, tool, security, and eval references.
Require host-owned eligibility, permission at physical dispatch, isolated disposable state, exact versioned claim identity, occurrence-safe handling of stochastic calls, separate waste and cost budgets, confirmed cancellation accounting, and task-parity evaluation. Partial model output never grants authority, and risky or approval-gated effects must not execute speculatively.
When the user asks for architecture guidance, produce a concrete architecture, not generic principles. For an existing failure, use Troubleshooting Mode:
For hardware requests, append the target/runtime inventory, installation route and exact write boundary, resource/deadline budget, preserved state and recovery plan, and evidence split between host checks and physical-board commissioning.
Use this template when the user wants a harness design. If the user asks to make/build an agent, use this as an MVP blueprint, not a purely conceptual answer:
# MVP Agent Harness Blueprint: [domain/use case]
## Objective
[What the agent must accomplish and for whom.]
## MVP scope and assumptions
[Smallest useful version, explicit assumptions, non-goals, and what is intentionally deferred.]
## Autonomy and risk level
[Answer-only, draft-only, approval-gated, or autonomous within policy.]
## Core loop
[How the model, tools, observations, retries, and stopping rules work.]
## Instruction architecture
[System/developer/user/scoped memory layout.]
## Tool registry
[Tools, schemas, risk classes, permissions, and result format.]
## Planning and goal behavior
[When to plan, when to ask, when to continue, when to stop.]
## Context and memory
[Retrieval, durable state, compaction, and rehydration.]
## Skills and connectors
[Reusable skills, MCP/external connector policy, tool search, attachment rules.]
## Safety and approvals
[Guardrails, prompt injection treatment, secrets, sandboxing, human review.]
## Observability
[Trace events, metrics, replay, auditability, and incident response.]
## Evals
[Eval cases, failure probes, trace grading, regression suites, and launch criteria.]
## Minimal implementation path
[Smallest safe version first, implementation skeleton, validation path, then measured expansion.]execute_anything, write_database, or send_message without a strict wrapper and approval policy.Use these links when provider-specific detail is needed:
© DenisSergeevitch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 30 other files (references, assets) in the repository root of DenisSergeevitch/agents-best-practices.
Open the folder on GitHubat commit 28e87b5
Agents Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agents Best Practices this skillDenisSergeevitch/agents-best-practices | 2.4k | — | ~7.4k | Automated safety check: Pass | MIT | |
| Agents Best PracticesAnastasiyaW/codex-claude-code-config | 154 | — | ~5.4k | Automated safety check: Pass | MIT | |
| Looperksimback/looper | 710 | — | ~2.7k | Automated safety check: Notes | MIT | |
| Cursor BYOK Prefix Stabilityleookun/cursor-byok | 3.2k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Context Auditundefined-ui/second-brain-os | 1k | — | ~802 | Automated safety check: Pass | MIT | |
| Agent Prompt Engineeringagentailor/fullstack-langgraph-nextjs-agent | 132 | — | ~3.6k | Automated safety check: Pass | MIT |
AnastasiyaW/codex-claude-code-config
A skill your agent uses when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion.
ksimback/looper
Scaffold a well-designed agent loop with best-practice coaching and a cross-model review council.
leookun/cursor-byok
Guides changes to the cursor-byok server so provider conversation history stays append-only and each turn's history remains an exact prefix of the next, protecting prefix caches.
undefined-ui/second-brain-os
Audit an agent's context layout against the four places: system prompt, tools, history, tail.
agentailor/fullstack-langgraph-nextjs-agent
Comprehensive guide for designing, refining, and auditing system prompts for autonomous AI agents based on Anthropic's production practices.
comet-ml/opik-mcp
Reference for the Opik SDK — tracing, span types, framework integrations, threads, and the prompt library (Python, TypeScript, REST).
Works with
Categories
A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain. Agents Best Practices is an agent skill from DenisSergeevitch/agents-best-practices. Use this skill when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.
Agents Best Practices fits situations like: generating an MVP blueprint for; troubleshooting; explaining an agentic harness for any domain.
Run `npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a claude-code`. Or copy the skill folder (the DenisSergeevitch/agents-best-practices repository) into .claude/skills/agents-best-practices in your project. Claude Code loads it when a task matches its description.
Run `npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a codex`. Or copy the skill folder (the DenisSergeevitch/agents-best-practices repository) into .agents/skills/agents-best-practices in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DenisSergeevitch/agents-best-practices --skill agents-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agents-best-practices, .gemini/skills/agents-best-practices, .github/skills/agents-best-practices and .opencode/skills/agents-best-practices in your project.
SKILL.md names no scripts, command-line tools or credentials: Agents Best Practices is instructions for the agent only.
SKILL.md names 5 domains. As links in the text: developers.openai.com, anthropic.com, agentskills.io, openai.com and modelcontextprotocol.io. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Agents Best Practices is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 7.4k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 108k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Agents Best Practices: Agents Best Practices (AnastasiyaW/codex-claude-code-config, 154 stars), Looper (ksimback/looper, 710 stars), Cursor BYOK Prefix Stability (leookun/cursor-byok, 3.2k stars) and Context Audit (undefined-ui/second-brain-os, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
DenisSergeevitch (a GitHub user) maintains it in DenisSergeevitch/agents-best-practices, which has 2,376 GitHub stars. The repository was last updated on October 5, 2026.
Source: DenisSergeevitch/agents-best-practices on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.