Index of every page on this site: llms.txt
All skills
zazencodes avatar

/init-agents-md

@a174880
Run it yourself

Create a minimal, repo-specific AGENTS.md and symlink CLAUDE.md to it. Use to initialize agent instructions; ask before replacing an existing AGENTS.md.

Use this Skill: https://skilld.dev/gh/zazencodes/skills/init-agents-md

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈42 tokens for metadata: the name and description. ≈731 when used: this file. ≈337 more on demand in 2 files.

Description uses 2.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈169 characters, or 2.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Initialize AGENTS.md

Create a short, repo-specific AGENTS.md. Inspect the repository first, keep only the facts that help an agent work faster, treat AGENTS.md as the canonical context file, and ensure CLAUDE.md is a symlink to AGENTS.md.

Read references/agents-md-best-practices.md before drafting.

Workflow

  1. Check the current files.
  • If AGENTS.md already exists, stop. Tell the user and ask whether to continue and overwrite it.
  • If CLAUDE.md exists and is a regular file (not a symlink), read it and use it as seed material for the new AGENTS.md.
  • If CLAUDE.md does not exist or is already a symlink, plan to symlink it after creating AGENTS.md.
  1. Explore the repository.
  • Inspect only enough to explain the real project shape and workflows.
  • Start with root files and directories, using the README as an initial guide to understand the project.
  • Look for the commands people actually run, where the important code lives, whether tests exist, and any sharp edges an agent could miss.
  • Prefer rg, rg --files, ls, and targeted file reads over broad dumps.
  1. Draft AGENTS.md.
  • Keep it minimal. Cut anything generic, obvious, or duplicated from existing docs.
  • Start the file with # AGENTS.md.
  • Place ## Project Instructions near the top. Leave it blank if there is nothing project-specific to add.
  • Favor section names that match the real repo shape instead of generic placeholders.
  • Focus on a few high-value facts:
    • what the repository is
    • where important code or content lives
    • the main workflows or commands
    • testing or validation expectations
    • any important gotchas
  • Use short sections and terse bullets. If the file starts feeling long, compress it again.
  • If the repository has useful topic-specific groupings, split them into small sections like Reference Docs, Development Commands, Architecture, Important Notes, or similarly precise names.
  1. Symlink CLAUDE.md.
  • If CLAUDE.md existed as a regular file, remove it after extracting any useful details into AGENTS.md.
  • Create a relative symlink from CLAUDE.md pointing to AGENTS.md:
    ln -sf AGENTS.md CLAUDE.md
  1. Sanity-check the result.
  • Confirm AGENTS.md is the source of truth.
  • Confirm CLAUDE.md is a relative symlink pointing to AGENTS.md.
  • Confirm every command and path matches the repository.
  • Confirm the file stays short and agent-specific.

Suggested Shape

Use only the sections that earn their keep. A good default for a richer repo is:

  • ## Project Overview
  • ## Project Instructions
  • ## Reference Docs
  • ## Development Commands
  • ## Architecture
  • ## Important Notes
  • ## Validation

If the repository has clear domain-specific buckets, prefer those over the generic defaults. For example: Styling System, Path Aliases, State Management, or Admin Scripts.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    This skill automates the creation of repository-specific agent instructions. It analyzes local files and creates a symlink using standard shell commands. While safe for intended use, it has a minor surface for indirect prompt injection from processed repository files.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: LOW · No issues

Signed by skilld at a174880. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 weeks ago

README badge

README badge for zazencodes/skills/init-agents-md