agentleFS
dyxushuaidyxushuai/agent-skills/skills/agent-init/SKILL.md

agent-init

Skill2 starsChanged 10 months agoMITView on GitHub

Initialize or improve AGENTS.md files that define how coding agents operate in a repo. Use when asked to set up or replace an agent init command (Codex, Claude), standardize multi-agent behavior, or audit an existing AGENTS.md for clarity, commands, boundaries, and repo-specific context. For Claude Code, also create CLAUDE.md as a symlink to AGENTS.md.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. fritzprix/libr-agent★ 11same name
    2. rgb-24bit/agent-skills★ 0same 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.

The file

Show its rules and text

We split this skill into the rules it gives an agent

38 rules. About 0 are common, 31 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈31

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Put commands early and include flags/options.

    line 23
  2. Distinctive:

    Use real code examples over explanations.

    line 24
  3. Distinctive:

    Remove ambiguity: state boundaries and non-goals explicitly.

    line 25
  4. Distinctive:

    Use three-tier boundaries: Always / Ask first / Never.

    line 29
  5. Distinctive:

    Start small and iterate as the repo evolves.

    line 30
  6. Distinctive:

    Use this mode when requirements are unclear or the repo structure will influence the document shape.

    line 34
  7. Distinctive:

    Ask one question at a time.

    line 36
  8. Distinctive:

    If Claude Code is in scope, plan a CLAUDE.md symlink to AGENTS.md.

    line 39
  9. Distinctive:

    Ask for exact commands (with flags) and a real code example.

    line 40
  10. Distinctive:

    Keep questions short and actionable, then confirm before drafting.

    line 42
  11. Very specific:

    Read references/agents-md-brainstorm.md for question banks and decision heuristics.

    line 43
  12. Distinctive:

    Default output is root AGENTS.md.

    line 50
  13. Distinctive:

    If the user asks for a different location, confirm the exact path and proceed.

    line 51
  14. Distinctive:

    If Claude Code is in scope, create CLAUDE.md as a symlink to AGENTS.md.

    line 52
  15. Distinctive:

    If the repo uses a different location or filename, ask before proceeding.

    line 55
  16. Distinctive:

    If monorepo, add per-app or per-team sections inside AGENTS.md.

    line 68
  17. Distinctive:

    If multiple roles are needed, use role-specific subsections inside AGENTS.md.

    line 69
  18. Distinctive:

    If the repo is small, keep a single concise AGENTS.md.

    line 70
  19. Distinctive:

    If a multi-file layout is requested, confirm the target paths before writing.

    line 71
  20. Distinctive:

    Write sections that map to the six core areas, keeping each section short and command-focused.

    line 75
  21. Distinctive:

    Prefer copy/paste commands over prose.

    line 79
  22. Distinctive:

    Ensure every requirement is tied to a command, path, or policy.

    line 91
  23. Distinctive:

    Keep it short enough to scan quickly.

    line 92
  24. Very specific:

    Run/test/validate commands (copyable, placed early, include flags).

    line 99
  25. Distinctive:

    Keep instructions in plain Markdown with explicit commands and paths.

    line 108
  26. Distinctive:

    Avoid agent-specific fields or features unless the target agent requires them.

    line 109
  27. Distinctive:

    Keep a single root AGENTS.md as the source of truth.

    line 110
  28. Distinctive:

    If Claude Code is in scope, create CLAUDE.md as a symlink to AGENTS.md.

    line 111
  29. Distinctive:

    Ask which agents are in scope (Codex, Claude, GitHub Copilot, Cursor, etc.).

    line 115
  30. Distinctive:

    Use one shared AGENTS.md that works across those agents.

    line 116
  31. Distinctive:

    Do not assume tool-specific directories.

    line 117
  32. Distinctive:

    When showing examples, label tool-specific details as optional (not required).

    line 118
  33. Distinctive:

    If Claude Code is in scope, add a CLAUDE.md symlink to AGENTS.md.

    line 119
  34. Very specific:

    If GitHub Copilot coding agent is in scope, consider adding .github/copilot-instructions.md and keep it minimal (ideally pointing to …

    line 120
  35. Very specific:

    Read references/agents-md-template.md when drafting a new file.

    line 124
  36. Very specific:

    Read references/agents-md-example.md for a complete AGENTS.md example.

    line 125
  37. Very specific:

    Read references/agents-md-checklist.md when reviewing or auditing an existing file.

    line 126
  38. Very specific:

    Read references/agents-md-brainstorm.md when running a divergent Q&A gap analysis.

    line 127

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AGENTS.md Guide

Overview

Provide a repeatable workflow and quality bar for writing or updating AGENTS.md files so agents receive concrete, repo-specific instructions.

Trigger examples

  • "Create an AGENTS.md for this repo and include exact test commands."
  • "Replace our agent init command with a proper AGENTS.md file."
  • "Audit our existing AGENTS.md for missing boundaries and commands."
  • "Update AGENTS.md to reflect the current build and lint commands."
  • "Create CLAUDE.md as a symlink to AGENTS.md for Claude Code."

Core Principles (condensed)

  • Be concrete: prefer executable commands and code examples over prose.
  • Put commands early and include flags/options.
  • Use real code examples over explanations.
  • Remove ambiguity: state boundaries and non-goals explicitly.
  • Be specific about the tech stack; include versions and key dependencies.
  • Define the agent's role/persona and how it fits the team.
  • Cover the six core areas: purpose, code organization, run/test/validate, change management, dependencies/environment, and avoid list.
  • Use three-tier boundaries: Always / Ask first / Never.
  • Start small and iterate as the repo evolves.

Brainstorming Mode (divergent Q&A)

Use this mode when requirements are unclear or the repo structure will influence the document shape.

  • Ask one question at a time. Prefer multiple choice when possible.
  • Base questions on the actual repo shape (single app vs monorepo).
  • Confirm which agents will consume the docs and their expectations.
  • If Claude Code is in scope, plan a CLAUDE.md symlink to AGENTS.md.
  • Ask for exact commands (with flags) and a real code example.
  • Propose 1-2 AGENTS.md layouts (section order) with tradeoffs, then converge.
  • Keep questions short and actionable, then confirm before drafting.
  • Read references/agents-md-brainstorm.md for question banks and decision heuristics.

Workflow

1) Clarify scope and placement

  • Confirm whether the task is to create new docs or revise existing ones.
  • Default output is root AGENTS.md.
  • If the user asks for a different location, confirm the exact path and proceed.
  • If Claude Code is in scope, create CLAUDE.md as a symlink to AGENTS.md.
  • Still maintain a single AGENTS.md (no per-agent files unless explicitly requested).
  • Confirm which agents will consume the docs and align content with their workflows.
  • If the repo uses a different location or filename, ask before proceeding.

2) Gather repo-specific facts

Collect only what will make the file actionable:

  • Stack and versions (language/runtime/package manager).
  • Key directories and ownership.
  • Build, test, lint, and format commands.
  • Environment variables, secrets, and local setup details.
  • Git/PR expectations (branching, commit style, approvals).

2a) Shape the doc by repo structure

  • If monorepo, add per-app or per-team sections inside AGENTS.md.
  • If multiple roles are needed, use role-specific subsections inside AGENTS.md.
  • If the repo is small, keep a single concise AGENTS.md.
  • If a multi-file layout is requested, confirm the target paths before writing.

3) Draft with the six core areas

Write sections that map to the six core areas, keeping each section short and command-focused. Use the template if needed.

4) Add concrete commands and examples

  • Prefer copy/paste commands over prose.
  • Include example file paths and typical change patterns.
  • Show expected outputs if ambiguity is likely.
  • Include at least one real code example that matches repo style.

5) Add boundaries and safety

State what the agent must not do, what requires approval, and any data/credential constraints.

6) Review for clarity

  • Eliminate vague statements ("run tests" -> specify the exact command).
  • Ensure every requirement is tied to a command, path, or policy.
  • Keep it short enough to scan quickly.

Output Requirements

Include, at minimum:

  • Role/purpose of the agent and its scope.
  • Repo map (key paths, entry points, ownership).
  • Run/test/validate commands (copyable, placed early, include flags).
  • Tech stack with versions and key dependencies.
  • Change management rules (branching, commits, PR expectations).
  • Dependencies and environment setup.
  • Code style example (real snippet).
  • Explicit avoid list and approval gates with Always / Ask first / Never.

Cross-agent compatibility

  • Keep instructions in plain Markdown with explicit commands and paths.
  • Avoid agent-specific fields or features unless the target agent requires them.
  • Keep a single root AGENTS.md as the source of truth.
  • If Claude Code is in scope, create CLAUDE.md as a symlink to AGENTS.md.

Multi-platform support

  • Ask which agents are in scope (Codex, Claude, GitHub Copilot, Cursor, etc.).
  • Use one shared AGENTS.md that works across those agents.
  • Do not assume tool-specific directories; only update AGENTS.md unless the user asks otherwise.
  • When showing examples, label tool-specific details as optional (not required).
  • If Claude Code is in scope, add a CLAUDE.md symlink to AGENTS.md.
  • If GitHub Copilot coding agent is in scope, consider adding .github/copilot-instructions.md and keep it minimal (ideally pointing to AGENTS.md as the source of truth).

References

  • Read references/agents-md-template.md when drafting a new file.
  • Read references/agents-md-example.md for a complete AGENTS.md example.
  • Read references/agents-md-checklist.md when reviewing or auditing an existing file.
  • Read references/agents-md-brainstorm.md when running a divergent Q&A gap analysis.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.