Skip to content
Skills Library
Programming · Writing

create-agents-md

/create-agents-md

Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents".

Author
sejas ↗
Licence
MIT
Last repository change
08.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents".

Triggers from the description

create agents mdsetup agent docsinitialize repo for agents
Original author description

Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents".

How it works

  1. Workflow
  2. Step 1: Inspect the Repository
  3. Step 2: Present Findings to User
  4. Step 3: Generate AGENTS.md
  5. Step 4: Create CLAUDE.md
  6. Step 5: Show Diffs and Get Approval
  7. Common Mistakes
Original SKILL.md headings · 212 lines, 1,011 words
SKILL.md preview
---
name: create-agents-md
description: Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents".
user-invocable: true
---

# Create AGENTS.md

Generate an AGENTS.md file that gives coding agents the non-obvious context they need to work effectively in a repository. Also creates a CLAUDE.md containing only `@AGENTS.md`.

**Core principle:** Write what is HARD for agents to find, not what's obvious. Agents already know how to use git, write code, and run standard tools.

## Workflow

```dot
digraph create_agents_md {
    "Inspect repo" [shape=box];
    "Present findings" [shape=box];
    "User confirms/adds" [shape=diamond];
    "Generate AGENTS.md" [shape=box];
    "Show diff to user" [shape=box];
    "User approves?" [shape=diamond];
    "Write files" [shape=doublecircle];

    "Inspect repo" -> "Present findings";
    "Present findings" -> "User confirms/adds";
    "User confirms/adds" -> "Generate AGENTS.md" [label="yes"];
    "User confirms/adds" -> "Present findings" [label="needs changes"];
    "Generate AGENTS.md" -> "Show diff to user";
    "Show diff to user" -> "User approves?";
    "User approves?" -> "Write files" [label="yes"];
    "User approves?" -> "Generate AGENTS.md" [label="revise"];
}
```

## Step 1: Inspect the Repository

Run these inspections in parallel:

**Project identity and stack:**
- Read README.md for project description and context
- Read primary config: package.json, composer.json, Cargo.toml, go.mod, pyproject.toml, Gemfile, etc.
- Check for monorepo indicators: workspaces, lerna.json, nx.json, turbo.json, pnpm-workspace.yaml
- Note language versions: .nvmrc, .node-version, .tool-versions, .python-version, rust-toolchain.toml

**Directory structure:**
- `ls` the root directory
- Identify the top-level layout pattern (src/, lib/, packages/, apps/, etc.)
- For monorepos, list the packages/workspaces

**Build, lint, and test commands:**
- Read Makefile, package.json `scripts`, Taskfile.yml, justfile, composer.json `scripts`
- Read CI config: .github/workflows/*.yml, .circleci/config.yml, Jenkinsfile
- Identify: build command, lint command, test command (unit + integration), dev server command
- Note any required environment setup (Docker, .env files, database)

**Conventions:**
- `git log --oneline -20` for commit message style
- `git branch -a | head -20` for branch naming patterns
- Check for: .eslintrc*, .prettierrc*, phpcs.xml, .editorconfig, biome.json
- Check for: CONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md
- Check for existing: CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md

**Architecture signals:**
- Read entry points (index.ts, main.go, app.py, etc.)
- Look for architecture docs in docs/ or ARCHITECTURE.md
- Identify patterns: MVC, hexagonal, event-driven, microservices, plugin-based

**Pitfall signals:**
- Check for generated files that should not be edited (look for "DO NOT EDIT" patterns)
- Check for vendored dependencies (vendor/, third_party/)
- Look at .gitignore for clues about generated artifacts
- Note any unusual build steps or prerequisites

## Step 2: Present Findings to User

Before generating, present a summary:

```
## Repo Inspection Results

**Project:** [name] - [one-line description]
**Stack:** [language] [version], [framework], [key deps]
**Structure:** [monorepo/standard] - [brief layout]

**Commands found:**
- Build: `[command]`
- Test: `[command]`
- Lint: `[command]`

**Conventions observed:**
- Commits: [style from git log]
- Branches: [pattern from git branch]

**Architecture:** [brief pattern]

**Things I couldn't determine:**
- [list unknowns]

Anything to add or correct before I generate AGENTS.md?
```

Use AskUserQuestion to confirm and gather any missing context the user wants included (common pitfalls, team conventions, architectural decisions).

## Step 3: Generate AGENTS.md

Use only sections that apply. Skip empty sections. Keep total under 500 lines.

### Template

```markdown
# [Project Name]

[One-line description of what this project is.]

## Tech Stack

- [Language] [version] — [framework/runtime]
- [Key dependency]: [what it's used for, if non-obvious]
- [Build tool]: [version if it matters]

## Directory Structure

[Only include non-obvious layout. Skip if it's a standard framework structure.]

```
[brief tree of important top-level dirs with one-line descriptions]
```

## Commands

### Build
```sh
[exact command]
```

### Test
```sh
[unit test command]
[integration test command, if different]
```
[Note: any prerequisites like running database, Docker, etc.]

### Lint
```sh
[lint command]
[autofix command if available]
```

### Dev
```sh
[dev server command]
```
[Note: ports, URLs, required env vars]

## Conventions

- **Commits:** [observed style, e.g., "Conventional Commits: type(scope): description"]
- **Branches:** [pattern, e.g., "feature/TICKET-123-short-description"]
- **PRs:** [any conventions — template, review requirements, CI checks]
- **Tests:** [when to write tests, what kind, coverage expectations]
- **Code style:** [enforced by linter — just mention the tool, don't repeat its rules]

## Architecture

[High-level decisions that deviate from defaults or that an agent might "fix" incorrectly.]

[Examples: "State management uses X instead of Y because...", "We use a custom router because...", "The plugin system uses dynamic imports intentionally — do not convert to static."]

## Common Pitfalls

- [Thing agents/developers commonly get wrong]
- [Files or patterns that MUST NOT be modified]
- [Non-obvious prerequisites or gotchas]
- [Environment-specific issues]
```

### Writing Quality Rules

- **Be explicit with commands** — copy-pasteable, not "run the test suite"
- **Use MUST/CRITICAL** for rules that cause real breakage if violated
- **Use "prefer" or "should"** for nice-to-haves
- **Don't restate what agents know** — no need to explain how git works, how to read JSON, etc.
- **Don't list every CLI flag** — basic usage and when to use each command is enough
- **Keep descriptions proportional** — 2 lines for simple sections, more for complex ones

## Step 4: Create CLAUDE.md

Generate a CLAUDE.md containing only:

```
@AGENTS.md
```

This keeps a single source of truth in AGENTS.md while ensuring Claude Code reads it.

## Step 5: Show Diffs and Get Approval

CRITICAL: Always show the full generated content as diffs before writing any files.

- If AGENTS.md already exists, show a diff against the existing file
- If CLAUDE.md already exists, warn the user and show what will change
- Ask for explicit approval before writing
- NEVER overwrite existing files without confirmation

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Including obvious info ("use git to commit") | Only write what's hard to discover |
| Letting the agent auto-generate everything | User must review — agents miss non-obvious context |
| Splitting into many sub-files too early | Keep one root file until it exceeds ~500 lines |
| Writing rules the linter already enforces | Reference the linter, don't duplicate its rules |
| Being vague about commands ("run tests") | Give exact copy-pasteable commands |
| Missing the Common Pitfalls section | This section prevents the most mistakes — always include it |
| Using symlinks for CLAUDE.md | Use `@AGENTS.md` content instead — symlinks break on Windows/sync |

Versions

RepositoryScoreLicence
This page · sejas/ai-code-skills100MIT
ploau/engineering-skills100MIT

Database snapshot: 13.11.2026 · package version 281b59453f80 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100init
    This skill should be used when a user asks to initialize a repository for AI agents, create or update an AGENTS.md file, scaffold agent instructions for a codebase, or improve existing agent guidance. Triggers include phrases like 'create an AGENTS.md', 'set up agent…
  • 100agents-md
    Creates and maintains concise AGENTS.md and CLAUDE.md project instruction files. Use when asked to create AGENTS.md, update AGENTS.md, maintain agent docs, set up CLAUDE.md, document repository agent conventions, or keep coding-agent instructions minimal and reference-backed.
  • 100agents-md
    Write effective AGENTS.md files that give coding agents only the context they cannot infer from the repository. Use when creating a new AGENTS.md, improving or trimming an existing one, setting up a repo for AI coding agents, or onboarding agents to a codebase. Triggers on:…
  • 100200-agents-md
    Use when you need to generate an AGENTS.md file for a Java repository — covering project conventions, tech stack, file structure, commands, Git workflow, and contributor boundaries — through a modular, step-based interactive process that adapts to your specific project needs.…
  • 100agents-md-author
    Bootstrap or update project AI-agent instruction files (AGENTS.md for Codex, CLAUDE.md for Claude Code, or both) from the current project's structure. Triggers on: write AGENTS.md, write CLAUDE.md, generate AGENTS.md, agent instructions, project conventions for AI, bootstrap…
  • 100init-agents-md
    Creates a short, repository-specific AGENTS.md for coding agents and makes CLAUDE.md a symlink to it, so every agent reads one instruction file. Use when the user asks to create, initialize or bootstrap AGENTS.md (or an agent instruction file) for a repository, or to turn an…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.