Provider-neutral Agent Skill for Codex, Claude Code, and agentic harness design.
# Add to your Claude Code skills
git clone https://github.com/DenisSergeevitch/agents-best-practicesGuides for using ai agents skills like agents-best-practices.
Last scanned: 5/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-17T06:43:37.817Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}agents-best-practices is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by DenisSergeevitch. Provider-neutral Agent Skill for Codex, Claude Code, and agentic harness design. It has 2,212 GitHub stars.
Yes. agents-best-practices passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/DenisSergeevitch/agents-best-practices" and add it to your Claude Code skills directory (see the Installation section above). agents-best-practices ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agents-best-practices against similar tools.
No comments yet. Be the first to share your thoughts!
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.
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
Use 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:
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 only when the user explicitly asks for programmable context, recursive execution, retained children, continual refinement, executable skills, or daemon/scheduled autonomy. 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.
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.
When the user asks for guidance, produce a concrete architecture, not generic principles:
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:
"The model proposes actions; the harness validates, authorizes, executes, records, and returns observations."
A provider-neutral Agent Skill for designing, generating MVP blueprints for, auditing, refactoring, and explaining agentic harnesses.
It applies beyond coding agents: research, support, operations, sales, finance, data analysis, procurement, legal workflows, healthcare workflows, education, and workflow automation agents all need the same core runtime discipline.
Install - pick one:
A. With skills (any compatible agent):
npx skills add DenisSergeevitch/agents-best-practices -g
The -g flag installs globally at user level so every project can discover it.
B. Or paste this prompt to your AI agent:
Install the agents-best-practices skill for me:
1. Clone https://github.com/DenisSergeevitch/agents-best-practices into my
user-level skills directory as `agents-best-practices/`.
Use the skill directory my agent reads on this machine, for example:
- Codex: ~/.codex/skills/
- Claude Code: ~/.claude/skills/
2. Verify that SKILL.md, icon.jpeg, and the references/ directory are present.
3. Confirm the install path when done.
C. Manual install paths:
# Codex
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
git clone https://github.com/DenisSergeevitch/agents-best-practices.git \
"${CODEX_HOME:-$HOME/.codex}/skills/agents-best-practices"
# Claude Code, user-level
mkdir -p "$HOME/.claude/skills"
git clone https://github.com/DenisSergeevitch/agents-best-practices.git \
"$HOME/.claude/skills/agents-best-practices"
# Claude Code, project-level
mkdir -p .claude/skills
git clone https://github.com/DenisSergeevitch/agents-best-practices.git \
.claude/skills/agents-best-practices
Use cases · What this is · Philosophy · Layout · Sources
Once installed, the skill activates when a conversation touches agent architecture, harness design, tool permissions, environment-adaptive tools, planning mode, workflow orchestration, context and memory, skills, connectors, observability, evals, prompt caching, or production readiness. Five common ways to use it:
You have a domain and need the smallest useful production-safe agent harness, not a vague list of best practices.
You > Build an agent for account renewal risk. It should read CRM,
support tickets, and usage data, then draft renewal actions.
Agent > Start with an approval-gated Level 2 harness.
The MVP has one job: produce a renewal-risk brief plus draft
next actions for a human account owner.
Core loop:
user/task -> context builder -> model call -> typed tool call
-> schema validation -> permission check -> execution or pause
-> structured observation -> next step or final brief
Minimal tools:
- read_account_profile read_private_data
- list_support_tickets read_private_data
- fetch_usage_summary read_private_data
- draft_customer_email draft_external_message
- request_approval approval_gate
Launch gate:
20 historical accounts, trace review, no unapproved external
sends, and human acceptance on at least 80% of draft actions.
The primary reference is references/mvp-agent-blueprint.md.
You already have a working agent, but it is brittle, expensive, too broad, or hard to debug.
You > Our research agent sometimes runs tools forever and forgets why
it made a decision after context compaction. Audit the harness.
Agent > The failure points are runtime-level, not prompt-level:
- no hard step/tool/time/cost budget
- compaction preserves prose but loses active approvals
- tool results are unbounded and mix trusted/untrusted data
- no event trace for model output -> tool call -> observation
Fix order:
1. Add loop budgets and termination reasons.
2. Store plan, approvals, todos, and artifacts outside the prompt.
3. Make compaction rehydrate active state, not chat history.
4. Add evals for injection, missing tool result, timeout, and
budget exhaustion.
Start with references/agentic-loop.md, references/context-memory-compaction.md, references/security-observability.md, and references/evals.md.
You need an agent to work with real systems without turning every API into an unsafe broad tool.
You > The ops agent needs Slack, Linear, Google Drive, and our internal
deploy API. How should tools and permissions work?
Agent > Split by risk class. Reads can be autonomous when scoped.
Drafts can be autonomous when labeled. External writes, deploys,
destructive actions, privileged access, and financial operations
require an approval record outside the model.
Do not expose generic send_message, write_database, or run_command.
Wrap each action as a narrow typed tool with structured results and
deterministic permission checks.
Use references/tools-and-permissions.md and references/skills-and-connectors.md.
Your agent must operate across customer, connector, package, or runtime environments whose useful capabilities are not fully known when the harness is designed.
Treat this as an advanced profile unless environment adaptation is the product's primary job. Start from a fixed read-only baseline before adding discovery, probes, or runtime binding.
You > The agent will enter different tenant environments. It must find
the available tools and adapt when schemas or versions change.
Agent > It still needs one stable bootstrap contract. Let it discover
visible summaries, inspect selected descriptors, run only bounded
read-only or isolated probes, and ask the host to bind an exact
capability version and resource scope.
Discovery never grants authority. Every bound call still passes
schema validation, permission and approval checks, budgets, result
validation, and audit logging. Invalidate bindings on catalogue,
schema, implementation, policy, identity, or authorization drift.
Use references/environment-adaptive-tools.md with the standard tool, connector, security, and eval references.
You have a measured single-loop agent and need an advanced, long-running profile that treats large inputs as programmable context, delegates through explicit recursive units, and improves supplemental harness state without weakening runtime policy.
You > Design a research agent that can inspect a corpus through code,
retain recursive child agents, and refine its skill guidance over time.
Agent > Treat this as a post-MVP architecture. Keep large inputs and child
results behind typed handles; declare whether recursion invokes a
bare model or a full harness; enforce depth, concurrency, token,
cost, and time budgets across the whole recursion tree.
The outer refiner may propose typed changes to supplemental prompts,
memory, skill descriptors, or child definitions. Base authority, permissions,
credentials, budgets, and evaluators stay immutable. Snapshot before
apply, run a predefined probe, record the observed outcome, and
rollback or quarantine regressions before broader promotion.
Use references/self-refining-recursive-harnesses.md with the context, workflow, permissions, security, and eval references.
references/planning-and-goals.md.references/workflow-orchestration.md.references/environment-adaptive-tools.md.references/self-refining-recursive-harnesses.md.references/context-memory-compaction.md.