agent-instruction
Generate or refresh the AGENTS.md agent-instructions file for a repository (the open cross-tool standard used by Elph, OpenAI Codex, VS Code/Copilot, Cursor…
от riipandi★ 34 звезды на GitHub
Установить agent-instruction в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Agent Instruction (AGENTS.md)
Language
- Generated file (
AGENTS.md) and any files this skill writes: always English, regardless of chat language. Keep paths, commands, symbols, and tool names literal. - In-chat responses / questions: follow the language the user is currently using (Indonesian, English, …). Keep file paths, commands, and identifiers literal.
Purpose
Produce a high-signal AGENTS.md that tells any AI coding agent how to work in this repository.
The file is the canonical, open-format instruction doc (Codex reads it; VS Code/Copilot, Cursor, and Gemini CLI also read it).
The skill also reconciles conflicts with other tools' instruction files and can refresh an existing AGENTS.md against the repo's current state.
When to use
- "Generate an AGENTS.md for this repo."
- "Update / refresh our agent instructions with the latest setup."
- "We have CLAUDE.md and .cursorrules — consolidate them into AGENTS.md."
/agent-instruction
References
Read these before generating — they carry the detection rules, precedence model, and the section template:
references/agent-file-formats.md— cross-tool file catalogue, detection globs, precedence, conflict-resolution options.references/agents-md-template.md— the section skeleton and writing principles.
Workflow
Phase 0 — Scan & conflict detection (always first)
- From the repo root, detect existing agent instruction files using the globs in
references/agent-file-formats.md(case-insensitive). Record each hit: path, owning tool, and whetherAGENTS.mdalready exists. Include nestedAGENTS.mdfiles for monorepos. - If
AGENTS.mdexists, read it and parse its current sections. - Note any contradictions between detected files (indentation, test commands, forbidden actions, supported OS, …).
Do not skip this phase even when the user only asked to "create" a file — the whole point is to avoid clobbering or duplicating other agents' instructions.
Phase 1 — Decide mode
- Create mode: no
AGENTS.mdyet → author from scratch using the template. - Update mode:
AGENTS.mdalready exists → refresh it. Re-scan the repo for drift (new deps, changed build/test commands, new CI, renamed modules, new conventions). Preserve still-valid project rules; update or remove stale ones. Ask the user whether to do a full rewrite or a surgical update of specific sections.
Phase 2 — Resolve conflicts
If other instruction files exist, pick a strategy (see the references file):
- Unify on AGENTS.md (recommended) — make
AGENTS.mdthe single source of truth. - Coexist — write
AGENTS.mdonly; leave the others untouched; add a "Related Agent Instructions" note for humans. - Migrate & retire — fold the others into
AGENTS.mdand remove them. Destructive: requires explicit per-file user approval; never auto-delete. - Cancel — stop.
For each contradiction found in Phase 0, present the conflicting rules and let the user choose the canonical one. Never silently pick a side.
Phase 3 — Gather current project state
Explore the repo to ground the content (do not invent):
README.md,CONTRIBUTING.md,docs/**— overview, conventions, testing.- Manifest files:
Cargo.toml,package.json,pyproject.toml,go.mod,pom.xml,Gemfile,*.csproj,requirements.txt,pnpm-workspace.yaml, … - Build/test/lint entrypoints:
Makefile,justfile, CI workflows (.github/workflows/**,.gitlab-ci.yml),rust-toolchain.toml,.nvmrc. - Directory layout & architecture (top-level dirs,
src/,crates/,apps/). - Lint/format configs:
clippy.toml,.editorconfig,biome.json,eslint.config.*,ruff.toml,rustfmt.toml. - Search existing docs for agent-critical gotchas; link them rather than copying.
Phase 4 — Confirm before execution (mandatory)
Before writing any file, present a concise plan to the user and ask for confirmation via ask_user_question (always allow_custom: true):
- Mode (create / update-full / update-surgical).
- Target path (
AGENTS.mdat repo root, or nested for a monorepo component). - Conflict-resolution choice and any files you intend to modify or delete.
- The sections you plan to include.
Offer at least: Proceed, Modify plan, Cancel. Only write after an affirmative answer. If the plan includes deleting/migrating other tools' files, make that explicit and require explicit approval for those specific files.
Phase 5 — Generate / write
- Build the
AGENTS.mdfromreferences/agents-md-template.md. Include only sections the project benefits from. Every line must change agent behavior. Follow the lean-but-clear writing rules there: short active sentences, lead with the rule, one concrete example over a paragraph, no preamble or recap. - In update mode, merge: keep valid existing rules, apply Phase 3 findings, drop stale content, and note what changed if useful.
- Respect the **pr
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/agent-file-formats.md
- references/agents-md-template.md
FAQ
Что делает скилл agent-instruction?
Generate or refresh the AGENTS.md agent-instructions file for a repository (the open cross-tool standard used by Elph, OpenAI Codex, VS Code/Copilot, Cursor, and Gemini CLI). Scans the repo for existing agent instructions from other tools (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, GEMINI.md, codex.md, Windsurf, etc.), resolves conflicts, and updates the doc to match the current project/repo state. Always asks the user to confirm before writing. Use when the user wants to create, generate, write, update, refresh, sync, or repair AGENTS.md, agent instructions, repo guidance, or runs /agent-instruction.
Как установить скилл agent-instruction?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-instruction запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…