generate-agents-md
Generates a project-specific AGENTS.md that captures conventions, build commands, module rules, and coding standards. This file is read at session start by coding agents and helps keep behavior consistent.
Best use case
generate-agents-md is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generates a project-specific AGENTS.md that captures conventions, build commands, module rules, and coding standards. This file is read at session start by coding agents and helps keep behavior consistent.
Teams using generate-agents-md should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/generate-agents-md/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How generate-agents-md Compares
| Feature / Agent | generate-agents-md | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generates a project-specific AGENTS.md that captures conventions, build commands, module rules, and coding standards. This file is read at session start by coding agents and helps keep behavior consistent.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Skill: Generate AGENTS.md ## What This Skill Does Creates an `AGENTS.md` file in the project root that captures the conventions an agent needs before writing code. The file is read at the start of each agent session. A well-written `AGENTS.md` eliminates the 2-5k tokens that agents otherwise spend re-discovering project conventions (build commands, test patterns, naming rules, directory layout) at every session start. ## When to Use - When a project has no `AGENTS.md` yet - When `smart-start` detects a missing `AGENTS.md` - After significant project restructuring (new modules, changed build system) - When onboarding a project to AI-assisted development for the first time Use this skill to create or fully regenerate `AGENTS.md`. For small targeted edits, update `AGENTS.md` manually. ## Execution Model - **Always**: the primary agent runs this skill directly. - **Rationale**: generating `AGENTS.md` requires analyzing project files (package.json, Makefile, CI configs, lint configs) and synthesizing conventions. The primary agent has the conversation context to ask clarifying questions via the `question` tool. - **Output**: `AGENTS.md` file in the project root. ## Workflow ### Step 1: Detect Project Stack Identify the project's technology stack by checking for presence of key files: - **Node.js**: `package.json`, `tsconfig.json`, `eslint.config.*` - **Python**: `pyproject.toml`, `setup.py`, `requirements.txt`, `ruff.toml` - **Go**: `go.mod`, `go.sum` - **Rust**: `Cargo.toml` - **Java/Kotlin**: `pom.xml`, `build.gradle` - **Multi-language**: check for monorepo indicators (`packages/`, `apps/`, `services/`) Read the detected config files to extract: - Project name and description - Dependencies and their versions - Build commands (`scripts` in package.json, targets in Makefile) - Test commands and frameworks ### Step 2: Analyze Project Structure Map the directory layout: - Top-level directories and their purpose - Module/package boundaries - Source vs. test directory conventions - Configuration file locations ### Step 3: Extract Conventions From config files and existing code, extract: - **Code style**: linter config (ESLint, Ruff, golangci-lint), formatter config (Prettier, Black) - **Naming conventions**: file naming patterns, export patterns - **Testing patterns**: test file naming, test framework, test directory structure - **Git conventions**: branch naming (from CI config), commit message format (from commitlint config or CONTRIBUTING.md) - **CI/CD**: which checks must pass, deployment targets ### Step 4: Check for Existing Documentation Read any existing documentation that informs conventions: - `CONTRIBUTING.md` - `README.md` (development section) - `.editorconfig` - Existing `AGENTS.md` (if updating) ### Step 5: Generate AGENTS.md Write the `AGENTS.md` file with the following structure: ```markdown # <Project Name> - Agent Instructions ## Project Overview <one paragraph: what the project does, its purpose> ## Tech Stack <language, framework, key dependencies> ## Project Structure <directory tree with purpose annotations> ## Development Commands | Command | Purpose | |---------|---------| | `<cmd>` | <what it does> | ## Code Conventions - <naming rules> - <import order> - <error handling patterns> ## Testing - Framework: <name> - Run: `<command>` - Naming: `<pattern>` - Coverage: <requirements> ## Module Rules <per-module constraints, e.g. "api/ must not import from cli/"> ## Do NOT <explicit list of things the agent should avoid> ``` ### Step 6: Confirm with User Use the `question` tool to present the generated `AGENTS.md` summary and ask: - Are there project-specific conventions not captured? - Are there modules with special rules? - Any explicit "do not" instructions? Incorporate feedback before finalizing. ## Rules 1. **Analyze, don't guess**: every statement in AGENTS.md must be derived from actual project files. Do not assume conventions that aren't evidenced in config files or code patterns. 2. **Concise over complete**: AGENTS.md should be ~50-150 lines. It's read at every session start, so brevity is critical. Link to detailed docs rather than duplicating them. 3. **Actionable instructions**: every section should tell the agent what TO DO or NOT TO DO. Avoid descriptive prose that doesn't guide behavior. 4. **Commands must work**: verify build/test commands by checking they exist in package.json/Makefile. Do not invent commands. 5. **Module rules are valuable**: if the project has clear module boundaries, document them. This prevents agents from creating unwanted cross-module dependencies. 6. **No built-in explore agent**: do NOT use the built-in `explore` subagent type.
Related Skills
docugenerate-automation
Automate Docugenerate tasks via Rube MCP (Composio). Always search tools first for current schemas.
voice-agents
Voice agents represent the frontier of AI interaction - humans speaking naturally with AI systems. The challenge isn't just speech recognition and synthesis, it's achieving natural conversation flo...
structured-autonomy-generate
Structured Autonomy Implementation Generator Prompt
parallel-agents
Multi-agent orchestration patterns. Use when multiple independent tasks can run with different domain expertise or when comprehensive analysis requires multiple perspectives.
mcp-deploy-manage-agents
Skill converted from mcp-deploy-manage-agents.prompt.md
m365-agents-ts
Microsoft 365 Agents SDK for TypeScript/Node.js.
m365-agents-py
Microsoft 365 Agents SDK for Python. Build multichannel agents for Teams/M365/Copilot Studio with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based auth.
m365-agents-dotnet
Microsoft 365 Agents SDK for .NET. Build multichannel agents for Teams/M365/Copilot Studio with ASP.NET Core hosting, AgentApplication routing, and MSAL-based auth.
hosted-agents
This skill should be used when the user asks to "build background agent", "create hosted coding agent", "set up sandboxed execution", "implement multiplayer agent", or mentions background agents, sandboxed VMs, agent infrastructure, Modal sandboxes, self-spawning agents, or remote coding environments.
hosted-agents-v2-py
Build hosted agents using Azure AI Projects SDK with ImageBasedHostedAgentDefinition. Use when creating container-based agents in Azure AI Foundry.
generate-image
Generate or edit images using AI models (FLUX, Nano Banana 2). Use for general-purpose image generation including photos, illustrations, artwork, visual assets, concept art, and any image that is not a technical diagram or schematic. For flowcharts, circuits, pathways, and technical diagrams, use the scientific-schematics skill instead.
generate-handover
Generate a session handover document that captures progress, decisions, and context for seamless session continuity. This documentation shall serve Agents and Humans when working in consecutive sessions with the project. Use this skill at the end of a work session or when context transfer to a new session is needed.