agent-md
Skill4 starsChanged 6 months agoMITView on GitHub
Syntax and structure reference for custom agent persona files (*.agent.md, CLAUDE.md, opencode.json). Use this to understand the schema, format, and architecture of agent definitions across platforms.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- atpaawej/skillstheir own version, first seen Sep 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- atpaawej/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- .vscode/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agent-log-analysisSkill
- agent-md-writerSkill
- agent-skill-md-writerSkill
- agentskillsSkill
- agents-md-writerSkill
- ai-prompt-writerSkill
- ansibleSkill
- apache-airflow-apiSkill
- apache-airflow-dagsSkill
- astro-cliSkill
- astronomer-docsSkill
- awesome-copilotSkill
- brainstorm-agent-runsSkill
- brainstorm-github-prSkill
- brainstormSkill
- catSkill
- chrome-devtoolsSkill
- claude-docsSkill
- codeqlSkill
- code-reviewSkill
- code-tourSkill
- coding-standard-writerSkill
- context-aware-opsSkill
- copilot-cliSkill
- copilot-docsSkill
- critical-thinkingSkill
- datadog-agentSkill
- datadog-apiSkill
- datadog-mcpSkill
- datadog-monitorsSkill
- datadog-pulumiSkill
- devcontainerSkill
- dictationSkill
- direnvSkill
- dockerfileSkill
- dockerSkill
- docs-reviewSkill
- docs-writerSkill
- dot-claudeSkill
- dotfilesSkill
- dot-githubSkill
- editorconfigSkill
- fact-writerSkill
- gdpr-compliantSkill
- gh-agent-taskSkill
- gh-apiSkill
- gh-aw-compileSkill
- gh-aw-firewall-debugSkill
- gh-aw-firewallSkill
- gh-aw-newSkill
- gh-awSkill
- gh-aw-troubleshootingSkill
- gh-codespaceSkill
- gh-issueSkill
- gh-modelsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Do not embed explicit execution tutorials or command-by-command scripts here.
- Very specific: line 73
Repository level: Create .github/agents/ in your repository for project-specific agents.
- Very specific: line 75
Organization or enterprise level: Create /agents/ in a .github-private repository for broader availability.
- Distinctive: line 110
Size Limit: Keep content under 500 KiB.
- Very specific: line 111
Relative Links: Use relative links (e.g., docs/CONTRIBUTING.md) instead of absolute URLs for files within the repository to ensure they …
- Very specific: line 166
@imports: Use @path/to/file to include other files (e.g., @AGENTS.md).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent MD Syntax
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->Agent MD is a format for defining specialized agent personas. These files provide context-specific instructions, project knowledge, and execution boundaries for autonomous agents in GitHub Copilot, OpenCode, and Claude Code. Unlike broad custom instructions, custom agents are selected for specific tasks and maintain their configuration throughout the workflow.
When to Use
- Platform Syntax Reference: Defining and validating the exact YAML frontmatter and Markdown structure for
.agent.md,CLAUDE.md, andopencode.json. - Architectural Alignment: Correctly partitioning logic between Agents ("Who"), Skills ("How"), and Instructions ("Rules") to minimize context window bloat.
- Scoped Persona Definition: Creating specialized agents with tailored roles, tech stacks, and execution boundaries for repository or organizational use.
- Tool & Permission Guardrails: Mapping autonomous capabilities to specific tools (built-in or MCP) and defining safety boundaries via
Never/Ask firstrules. - Multi-Platform Configuration: Standardizing agent behavior across GitHub Copilot, OpenCode, and Claude Code environments within a single codebase.
When Not to Use
- Domain Formatting Rules: Setting pure coding conventions or style guides — these belong in
*.instructions.md. - Mechanical Execution: Defining step-by-step terminal commands or API workflows — these belong in
SKILL.md. - One-off Interaction: Simple chat prompts or quick clarifications that don't require a persistent persona or complex tool mapping.
Common Pitfalls
- The 500 KiB Wall: GitHub truncates agent files beyond this limit; avoid embedding large documentation files directly—use relative links instead.
- Absolute Path Breakage: Using absolute URLs or paths within a repository; always use relative links to ensure portability across clones.
- Role Overlap: Creating multiple agents with ambiguous or overlapping scopes, which causes model confusion and activation drift.
Architecture Principles: Agents vs Skills vs Instructions
To prevent redundancy and context drift, always enforce a strict conceptual boundary when authoring system components:
- Agents (
*.agent.md) - The "Who" and "Why":- Focus: Persona, invariants, cognitive framework, escalation gates, and output constraints.
- Rule: Do not embed explicit execution tutorials or command-by-command scripts here. Instruct the agent who they are, what constraints they must obey (e.g. "Never mutate files directly"), and explicitly tell them to invoke specific skills for mechanical processes.
- Skills (
SKILL.md) - The "How" (Execution Playbooks):- Focus: Tools, commands, step-by-step procedures, and mechanical execution.
- Rule:
Isolates the exact
bash,gh, or API mechanics. A skill is agnostic to who uses it. It exists strictly to define how an audit, a build, or a commit sync is correctly executed.
- Instructions (
*.instructions.md) - The "Rules" (Domain Standards):- Focus: Formatting standards, coding conventions, and structural rules (e.g. JSON schema, Python dependencies).
- Rule: Applied dynamically based on the file-type or project paths being modified. They govern the output structure regardless of which agent or skill generated it.
When to Use What (Copilot Context)
- Prompts: Direct questions or commands in chat for one-off requests and quick clarifications (single conversation).
- Instructions: Global or workspace-level rules applied to all Copilot interactions (setting coding standards, preferences).
- Chat Modes: Pre-configured conversation contexts like
/explainor/fix(single conversation session). - Custom Agents: Specialized AI assistants with specific roles, capabilities, and deep context for complex workflows (activated per conversation).
Target Locations
GitHub Copilot
Agent persona files for GitHub Copilot can be defined at different levels:
- Repository level: Create
.github/agents/in your repository for project-specific agents.- The filename SHOULD match the agent's
nameproperty with.agent.mdextension (e.g.,.github/agents/test-agent.agent.md).
- The filename SHOULD match the agent's
- Organization or enterprise level: Create
/agents/in a.github-privaterepository for broader availability.
Claude Code
Claude Code uses CLAUDE.md for project-level instructions:
- Project-level:
CLAUDE.mdat the repository root. - Subdirectory-level:
CLAUDE.mdwithin a specific directory (applies to that subtree). - Global:
~/.claude/CLAUDE.mdfor machine-wide preferences. - Local overrides:
CLAUDE.local.md(typically gitignored).
OpenCode
OpenCode agents can be defined globally or per-project:
- Global:
~/.config/opencode/agents/ - Per-project:
.opencode/agents/ - Configuration: Configure agents in your
opencode.jsonconfig file under theagentkey.
GitHub Copilot Agent Syntax
An Agent MD file for Copilot consists of YAML frontmatter followed by a structured Markdown body.
Agent profile format
Agent profiles are Markdown files with YAML frontmatter. In their simplest form, they include:
- Name (optional): A display name for the custom agent. If omitted, the agent's filename is used as its identifier and default display name.
- Description: Explains the agent's purpose and capabilities.
- Version (optional): Semantic versioning for tracking agent changes.
- ApplyTo (optional): File patterns (e.g.,
['**/*.js']) or scopes (e.g.,fileTypes,directories) where the agent is most relevant. - Prompt: Custom instructions that define the agent's behavior and expertise (the Markdown body).
- Tools (optional): Specific tools the agent can access. Common built-in tools include
read_file,write_file,search_files,list_directory, andrun_terminal. By default, agents can access all available tools, including built-in tools, and MCP server tools. Be cautious when grantingwrite_fileandrun_terminaltogether. - MCP Servers (optional): Configurations for MCP servers using the
mcp-serversproperty.
Technical Constraints (GitHub Copilot)
- Size Limit: Keep content under 500 KiB. GitHub truncates content beyond this limit.
- Relative Links: Use relative links (e.g.,
docs/CONTRIBUTING.md) instead of absolute URLs for files within the repository to ensure they work when the repository is cloned.
OpenCode Agent Syntax
OpenCode supports both JSON configuration and Markdown files for agent definitions.
JSON Configuration (opencode.json)
{
"agent": {
"my-agent": {
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "{file:./prompts/my-agent.txt}",
"permission": {
"edit": "allow",
"bash": "allow"
}
}
}
}Markdown Agent Frontmatter
Markdown files in the OpenCode agent directories use more extensive frontmatter:
| Field | Description |
description | Concise description of the agent's purpose (Required). |
mode | primary, subagent, or all (Defaults to all). |
model | Override the model for this agent (e.g., openai/gpt-5). |
temperature | Control randomness (0.0 to 1.0). |
permission | Fine-grained tool permissions (allow, ask, deny). |
steps | Max agentic iterations before forcing a response. |
prompt | Path to a custom system prompt file. |
hidden | true to hide from @ autocomplete (subagents only). |
Claude Code Syntax (CLAUDE.md)
Claude Code uses a simple Markdown-based format. It does not require YAML frontmatter.
Common Sections
| Section | Description |
| Build Commands | Exact strings to build the project. |
| Test Commands | Exact strings to run tests (e.g., npm test). |
| Lint Commands | Commands to check/fix code style. |
| Code Style | Specific preferences (e.g., "Use named exports"). |
| Architecture | High-level map of the codebase. |
Advanced Syntax
@imports: Use@path/to/fileto include other files (e.g.,@AGENTS.md).Read when:: Conditional trigger for loading detailed documentation (e.g.,Read when: Modifying database schema).
Core Markdown Sections
Regardless of the platform, a high-quality agent definition should include:
- Role Definition: Explicitly state the agent's persona and specialization.
- Project Knowledge: Tech stack, versions, and relevant directory layout.
- File Types: List specific file extensions or directories the agent is authorized to work with.
- Executable Commands: Real commands (build, test, lint) with all necessary flags.
- Standards & Examples: Idiomatic code snippets showing the expected style.
- Important Limitations: Explicit "Negative Scope" (what the agent MUST NOT do).
- Three-Tier Boundaries: Using
Always,Ask first, andNevercategories.
Reference Structure (GitHub Copilot)
---
name: <agent-name>
description: <one-sentence description>
version: 1.0.0
applyTo:
- '**/*.js'
- '**/*.ts'
tools:
- read_file
- search_files
- list_directory
---
You are an expert <role> for this project.
## Your role
- You specialize in <specialty>
- Your task: <specific task>
## File types you work with
- `<extension/pattern>` (primary focus)
- `<other file type>`
## Project knowledge
- **Tech Stack:** <technologies with versions>
- **File Structure:**
- `src/` - <purpose>
- `tests/` - <purpose>
## Commands you can use
- **Build:** `<command>`
- **Test:** `<command>`
- **Lint:** `<command>`
## Standards
<Code style examples>
## Important Limitations
- Do NOT <prohibited action related to scope>
- Do NOT <another scope boundary>
## Boundaries
- ✅ **Always:** <mandatory actions>
- ⚠️ **Ask first:** <guarded actions>
- 🚫 **Never:** <prohibited actions, e.g., commit secrets>Related Skills
- agent-md-writer: Load this skill when you need guidance on how to write and optimize high-performance agent personas.
- agents-md-writer:
Load this skill for general
AGENTS.mdproject context files. - agent-skill-md-writer:
Load this skill when writing
SKILL.mdfiles for Copilot skills.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

