SuperAPI AI Directory

generate-agents-md

Coding & development

View repository

Updated 10-15 20:32

About this skill

Generate AGENTS.md

This skill creates or revises AGENTS.md for the current repository.

Its scope is intentionally narrow:

  • only use the current repository as the source of truth
  • only write project-specific instructions
  • do not add generic engineering rules unless the user explicitly asks for them
  • present a draft first, then wait for confirmation before writing the file

When to Use

Use this skill when the user asks for things like:

  • "Initialize AGENTS.md"
  • "Create AGENTS.md"
  • "Write AGENTS.md based on the current project"
  • "Only write the special rules for this project"
  • "Rewrite this repository's AGENTS.md"

Do not use this skill for generic prompt-writing, global coding guidelines, or non-repository instruction files.

Workflow

1. Inspect the current repository

Read the smallest set of files needed to understand the repo:

  • top-level directory structure
  • existing AGENTS.md if present
  • project docs such as README*, schema files, docs indexes, config files, or representative content files

Prefer concrete repo evidence over assumptions. If the repo has clear structural boundaries, operating rules, or content conventions, extract those.

2. Derive only project-specific rules

Good project-specific rules usually include:

  • what this repository is for
  • which directories are inputs vs outputs
  • what is read-only vs writable
  • required file formats or schema constraints
  • naming/frontmatter/linking conventions
  • required companion updates when a certain file changes
  • scope boundaries: what does not belong in this repo

Do not include generic rules such as:

  • think before coding
  • keep changes small
  • write tests first
  • be concise

Unless the user explicitly asks for those.

3. Present a draft before writing

Always show the proposed AGENTS.md content first.

Keep the explanation short:

  • summarize the repo rules you extracted
  • show the draft
  • ask for confirmation

If an AGENTS.md already exists, explain whether you are proposing a patch, rewrite, or compression.

4. Wait for confirmation

Do not create or overwrite AGENTS.md until the user confirms.

If the user asks for changes, revise the draft and show it again.

5. Write the file after approval

Once approved:

  • create or update AGENTS.md
  • keep the file concise
  • match the repo's actual structure and terminology

Writing Guidelines

  • Prefer short bullet points over long prose.
  • Default to Chinese-simplified unless the user requests another language.
  • Use the repository's actual directory names and file names.
  • If the repo has a schema or contract file, cite it directly in the draft.
  • If a rule is uncertain, say it is a suggestion instead of presenting it as a fact.
  • If there are no meaningful project-specific rules, say so plainly instead of inventing content.

Output Shape

Before approval, the response should look like:

  1. one short paragraph explaining the extracted repo-specific boundaries
  2. the proposed AGENTS.md draft
  3. one short confirmation question

After approval, write the file and briefly summarize what was created or changed.