init-agents

Initialize or update AGENTS.md (or CLAUDE.md for Claude Code) with AI agent guidance. Use when user says 'init agents', 'create AGENTS.md', 'setup agent instructions', or wants project-specific AI coding assistant configuration.

16 stars

Best use case

init-agents is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Initialize or update AGENTS.md (or CLAUDE.md for Claude Code) with AI agent guidance. Use when user says 'init agents', 'create AGENTS.md', 'setup agent instructions', or wants project-specific AI coding assistant configuration.

Teams using init-agents 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

$curl -o ~/.claude/skills/init-agents/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/ai-agents/init-agents/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/init-agents/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How init-agents Compares

Feature / Agentinit-agentsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Initialize or update AGENTS.md (or CLAUDE.md for Claude Code) with AI agent guidance. Use when user says 'init agents', 'create AGENTS.md', 'setup agent instructions', or wants project-specific AI coding assistant configuration.

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.

Related Guides

SKILL.md Source

# Init Agents

Initialize or update `AGENTS.md` at project root — the instruction manual that tells AI coding assistants exactly how to work in this project.

## What AGENTS.md Is

A **vendor-agnostic markdown file** that provides persistent, project-specific guidance to AI coding agents. Codex, OpenCode, Cursor, and GitHub Copilot read it. Claude Code uses `CLAUDE.md` instead — use the same content; the filename differs by tool.

**Contains:**
- Clear dos and don'ts (tech stack, versions, patterns)
- Executable commands (file-scoped type-check, lint, format, test)
- Project structure hints and key file locations
- Safety and permission boundaries
- Code style examples (good vs bad)
- Git workflow and PR checklist

**Does NOT contain:**
- Business rules (that belongs in `KNOWLEDGE.md`)
- Product roadmap (not included in this document)

## Tool Conventions

| Tool | File | Location |
|------|------|----------|
| Codex | `AGENTS.md` | Project root, `~/.codex/AGENTS.md` global |
| OpenCode | `AGENTS.md` | `~/.config/opencode/AGENTS.md` global |
| Cursor | `AGENTS.md` or `.cursor/rules/` | Project root |
| Claude Code | `CLAUDE.md` | Project root |
| GitHub Copilot | `AGENTS.md` | `.github/agents/*.md` for specialized agents |

Project root `AGENTS.md` applies to Codex, Cursor, Copilot. Claude Code expects `CLAUDE.md`. When user mentions Claude Code specifically, create/update `CLAUDE.md`; otherwise use `AGENTS.md`.

## Six Core Areas (Best Practice)

Effective agent files cover all six:

1. **Commands** — Executable commands with flags (put early in the file)
2. **Testing** — How to run tests, test-first expectations
3. **Project structure** — Key paths, where things live
4. **Code style** — Naming, formatting, patterns with examples
5. **Git workflow** — Commit format, PR checklist
6. **Boundaries** — Allowed / ask first / never

## Format

```markdown
# AGENTS.md

This file provides guidance to AI coding agents working in this repository.

## Project Overview
[1-2 sentences: what this project is, key stack]

## Commands
# Type-check single file
npm run tsc --noEmit path/to/file.ts

# Lint single file
npm run eslint --fix path/to/file.ts

# Format single file
npm run prettier --write path/to/file.ts

# Run tests (single file or suite)
npm test -- path/to/file.test.ts

## Project Structure
- `src/` — [purpose]
- `docs/` — [purpose]
- [key files that define architecture]

## Do
- [specific rule with versions/libraries]
- [specific rule]

## Don't
- [specific prohibition]
- [specific prohibition]

## Safety and Permissions
**Allowed without prompt:** [read files, run lint/format on single file, run single test]
**Ask first:** [package installs, git push, full build, schema changes]
**Never:** [commit secrets, edit vendor/, modify production configs]

## When Stuck
- Ask a clarifying question or propose a short plan
- Do not push large speculative changes without confirmation
```

## Process

### Step 1: Explore Project

Gather in parallel:
- Tech stack (package.json, composer.json, requirements.txt, go.mod, etc.) — versions matter
- Build/lint/test commands from scripts
- Project structure and key entry points
- Existing rules (`.cursorrules`, `.cursor/rules/`, `.github/copilot-instructions.md`, `CONTRIBUTING.md`)
- `KNOWLEDGE.md`, if it exists — reference it, don't duplicate

### Step 2: Extract Commands

Find file-scoped commands (prefer over full-project builds):
- Type-check: `tsc --noEmit`, `pyright`, etc.
- Lint: `eslint --fix`, `ruff check --fix`, etc.
- Format: `prettier --write`, `black`, etc.
- Test: `vitest run`, `pytest`, `jest`, etc.

Include exact flags. Put commands early in the file.

### Step 3: Define Boundaries

Three tiers:
- **Always do** — Run lint/test on changed files, follow style examples
- **Ask first** — Package installs, git push, full builds, schema changes
- **Never** — Commit secrets, edit vendor/node_modules, modify production configs

### Step 4: Add Code Examples

Point to real files that demonstrate good patterns. Call out legacy code to avoid.
Examples beat paragraphs of description.

### Step 5: Write or Merge

**If `AGENTS.md` (or `CLAUDE.md`) exists:**
1. Read existing content
2. Merge new sections (don't duplicate)
3. Update outdated commands and structure
4. Preserve user customizations

**If it doesn't exist:**
1. Create from template above
2. Fill with discovered project context
3. Keep it concise — expand over time based on agent mistakes

## Companion Documents

| Document | Use When |
|----------|----------|
| `KNOWLEDGE.md` | Business context, domain rules, gotchas — suggest `init-knowledge` if missing |

When running init-agents, if companion docs exist, reference them in AGENTS.md (e.g. "See KNOWLEDGE.md for business context"). Don't duplicate their content.

## Rules

- **Just do it** — no approval needed, write directly
- **Be specific** — "React 18 with TypeScript and Vite" not "React project"
- **Commands first** — put executable commands early, with flags
- **Code examples over prose** — one real snippet beats three paragraphs
- **File-scoped commands** — prefer single-file validation over full builds
- **Never commit secrets** — most common and valuable boundary
- **Hierarchy** — project `AGENTS.md` overrides global; nested `AGENTS.override.md` for subdirs (Codex)
- **Iterate** — start minimal, add detail when agents make mistakes

Related Skills

minitest-testing

16
from diegosouzapw/awesome-omni-skill

Write, review, and improve Minitest tests for Ruby on Rails applications. Covers model tests, controller tests, system tests, fixtures, and best practices from Rails Testing Guide.

manage-agents

16
from diegosouzapw/awesome-omni-skill

Create, modify, and manage Claude Code subagents with specialized expertise. Use when you need to "work with agents", "create an agent", "modify an agent", "set up a specialist", "I need an agent for [task]", or "agent to handle [domain]". Covers agent file format, YAML frontmatter, system prompts, tool restrictions, MCP integration, model selection, and testing.

langchain-agents

16
from diegosouzapw/awesome-omni-skill

Expert guidance for building LangChain agents with proper tool binding, memory, and configuration. Use when creating agents, configuring models, or setting up tool integrations in LangConfig.

kramme:agents-md

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "update AGENTS.md", "add to AGENTS.md", "maintain agent docs", or needs to add guidelines to agent instructions. Guides discovery of local skills and enforces structured, keyword-based documentation style.

init

16
from diegosouzapw/awesome-omni-skill

Initialize warehouse schema discovery. Generates .astro/warehouse.md with all table metadata for instant lookups. Run once per project, refresh when schema changes. Use when user says "/data:init" or asks to set up data discovery.

git-commit-for-ai-agents

16
from diegosouzapw/awesome-omni-skill

Commit changes to a git repository. Use whenever a git commit is to be executed.

dispatching-parallel-agents

16
from diegosouzapw/awesome-omni-skill

Use when facing 3+ independent failures that can be investigated without shared state or dependencies. Dispatches multiple Claude agents to investigate and fix independent problems concurrently.

custom-sub-agents

16
from diegosouzapw/awesome-omni-skill

Guidance for creating and organizing custom sub-agents in local repos, including folder conventions, per-agent structure, and AGENTS.md indexing. Use when asked where to store sub-agents or how to document them.

custom-agents

16
from diegosouzapw/awesome-omni-skill

GitHub Custom Agent File Format

creating-agents

16
from diegosouzapw/awesome-omni-skill

Create and review agent definition files (agents.md) that give AI coding agents a clear persona, project knowledge, executable commands, code style examples, and explicit boundaries. Use when a user asks to create an agent, define an agent persona, write an agents.md file, set up a custom Copilot agent, review an existing agent definition, or improve agent quality. Covers the six core areas: commands, testing, project structure, code style, git workflow, and boundaries.

create-agents-md

16
from diegosouzapw/awesome-omni-skill

Create or rewrite AGENTS.md files for Open Mercato packages and modules. Use this skill when adding a new package, creating a new module, or when an existing AGENTS.md needs to be created or refactored. Ensures prescriptive tone, MUST rules, checklists, and consistent structure across all agent guidelines.

building-agents

16
from diegosouzapw/awesome-omni-skill

Expert at creating and modifying Claude Code agents (subagents). Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize agents, or when modifying agent YAML frontmatter fields (especially 'model', 'tools', 'description'), needs help designing agent architecture, or wants to understand agent capabilities. Also auto-invokes proactively when Claude is about to write agent files (*/agents/*.md), create modular agent architectures, or implement tasks that involve creating agent components.