Skip to content
Skills Library
AI & agents · Writing

agent-instructions

/agent-instructions

Use whenever creating OR editing CLAUDE.md, AGENTS.md, GEMINI.md, a SKILL.md, or any other file whose job is to instruct an AI coding agent, at any scope level (user/global, project root, parent folder, subdirectory, or a skill/runbook in a plugin repo). Covers scope diagnosis, content taxonomy, multi-tool compatibility for Claude Code, Codex, Gemini CLI, and OpenCode, cookbook templates for Python, TypeScript, monorepo, agent/MCP, and minimal projects, and the RED-GREEN editing discipline for revising instructions/skills/ runbooks that already exist. Invoke when the user asks to "create a CLA

Licence
MIT
Last repository change
26.10.2026

Assessment and security

87/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability17 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
11
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use whenever creating OR editing CLAUDE.md, AGENTS.md, GEMINI.md, a SKILL.md, or any other file whose job is to instruct an AI coding agent, at any scope level (user/global, project root, parent folder, subdirectory, or a skill/runbook in a plugin repo). Covers scope diagnosis, content taxonomy, multi-tool compatibility for Claude Code, Codex, Gemini CLI, and OpenCode, cookbook templates for Python, TypeScript, monorepo, agent/MCP, and minimal projects, and the RED-GREEN editing discipline for revising instructions/skills/ runbooks that already exist. Invoke when the user asks to "create a CLA

Original author description

Use whenever creating OR editing CLAUDE.md, AGENTS.md, GEMINI.md, a SKILL.md, or any other file whose job is to instruct an AI coding agent, at any scope level (user/global, project root, parent folder, subdirectory, or a skill/runbook in a plugin repo). Covers scope diagnosis, content taxonomy, multi-tool compatibility for Claude Code, Codex, Gemini CLI, and OpenCode, cookbook templates for Python, TypeScript, monorepo, agent/MCP, and minimal projects, and the RED-GREEN editing discipline for revising instructions/skills/ runbooks that already exist. Invoke when the user asks to "create a CLA

How it works

  1. When to Use
  2. Quick Reference
  3. Workflow
  4. Scope Decision Guide
  5. Anti-Patterns
  6. Multi-Tool Quick Guide
Original SKILL.md headings · 156 lines, 1,067 words
SKILL.md preview
---
name: agent-instructions
description: >
  Use whenever creating OR editing CLAUDE.md, AGENTS.md, GEMINI.md, a SKILL.md, or any
  other file whose job is to instruct an AI coding agent, at any scope level (user/global,
  project root, parent folder, subdirectory, or a skill/runbook in a plugin repo). Covers
  scope diagnosis, content taxonomy, multi-tool compatibility for Claude Code, Codex, Gemini
  CLI, and OpenCode, cookbook templates for Python, TypeScript, monorepo, agent/MCP, and
  minimal projects, and the RED-GREEN editing discipline for revising instructions/skills/
  runbooks that already exist. Invoke when the user asks to "create a CLAUDE.md", "set up
  Claude for this project", "what should go in my AGENTS.md", "write agent instructions",
  "help me set up my global Claude configuration", "edit this skill", "update this runbook",
  "add a rule to AGENTS.md", or any similar request — even without explicit mention of
  CLAUDE.md or AGENTS.md. If the user is starting a new project or onboarding into an
  existing one and no instruction file exists, proactively suggest creating one.
metadata:
  last_updated: "2026-08-23"
---

# Agent Instructions Builder

A builder skill for creating and editing `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `SKILL.md`,
and related AI coding assistant instruction files at any scope level, for any tool.

## When to Use

Invoke this skill when the user:

- Asks to create or write a `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, or similar file
- Says "set up Claude for this project" or "add agent instructions"
- Asks "what should go in my CLAUDE.md?" or "what belongs in AGENTS.md?"
- Wants a global/user-level configuration file (`~/.claude/CLAUDE.md`)
- Is starting a new project and wants instruction files from scratch
- Needs multi-tool support (Claude Code + Codex + Gemini + OpenCode reading the same repo)
- Is working in a monorepo and needs parent/child scoping
- Is **editing** an existing `CLAUDE.md`/`AGENTS.md`, `SKILL.md`, or runbook — adding a
  rule, correcting one, or moving content between files

## Quick Reference

| Scope | File(s) | Reference |
| --- | --- | --- |
| User/global | `~/.claude/CLAUDE.md` | `references/scope-hierarchy.md`, `references/cookbook/user-global.md` |
| Project root | `CLAUDE.md` or `AGENTS.md` | `references/scope-hierarchy.md`, project cookbook |
| Personal (gitignored) | `CLAUDE.local.md` | `references/scope-hierarchy.md` |
| Subdirectory / path-scoped | `.claude/rules/*.md` | `references/scope-hierarchy.md`, `references/cookbook/monorepo.md` |
| Multi-tool project | CLAUDE.md + AGENTS.md + GEMINI.md | `references/multi-tool-compat.md` |
| **Editing** an existing instruction file, skill, or runbook | `references/editing-discipline.md` |

## Workflow

### Step 1: Diagnose Scope

Ask — or infer from the codebase and conversation context:

- **Which level?** User-global, project root, monorepo parent/child, or a combination?
- **Which tool(s)?** Claude Code only, or also Codex, Gemini CLI, OpenCode?

Use the **Scope Decision Guide** below if unsure.

### Step 2: Gather Context

For **project-level** files, read the codebase first. Check `package.json`, `pyproject.toml`,
`Makefile`, `README.md` — don't ask for things you can discover. Then determine:

- Project type (Python library? TypeScript API? monorepo? agent/plugin?)
- Key commands: build, test, lint, dev server
- Async stance (async-first, sync-first, or mixed)
- Non-obvious constraints or conventions the AI would need to know
- Team or solo? (If solo, personal preferences can go here; if team, use `CLAUDE.local.md`
  for personal preferences)

For **user-global** files, ask the user about:

- Role and primary languages/frameworks
- Communication preferences (verbosity, code vs. prose, etc.)
- Recurring tools and workflows that apply across all projects

### Step 3: Select Cookbook Template

Read the relevant file from `references/cookbook/` and adapt it to the actual project.
Remove sections that don't apply; add project-specific content.

| Project type | Template |
| --- | --- |
| Python (FastAPI, library, data) | `references/cookbook/python-project.md` |
| TypeScript (Next.js, API, CLI, agent) | `references/cookbook/typescript-project.md` |
| Monorepo (any language) | `references/cookbook/monorepo.md` |
| Agent, MCP server, or plugin | `references/cookbook/agent-mcp-project.md` |
| Side project / minimal | `references/cookbook/minimal-project.md` |
| User global (`~/.claude/CLAUDE.md`) | `references/cookbook/user-global.md` |

### Step 4: Generate and Write

Quality targets:

| Scope | Target length | Key principle |
| --- | --- | --- |
| User-global | 100–200 lines | Comprehensive personal preferences |
| Project-level | 20–80 lines | Concrete facts about this codebase |
| Subdirectory rule | 5–20 lines | Path-scoped, laser-focused |

Every line costs context on every session. Trim ruthlessly — if removing a line wouldn't
confuse a new contributor, remove it.

If multiple tools are in use, read `references/multi-tool-compat.md` before generating.

Write the file(s) to disk at the correct paths, then tell the user where each one lives.

### Editing an Existing Instruction File, Skill, or Runbook

Creating from scratch and revising something that already exists are different jobs.
Before adding, correcting, or moving a rule in a `CLAUDE.md`/`AGENTS.md`, a `SKILL.md`,
or a `references/*.md` runbook, read
[`references/editing-discipline.md`](references/editing-discipline.md) — the RED-GREEN
discipline for doc edits (a check that the guidance is actually missing before writing
it, one incident citation per rule, and where a fix belongs: local file vs. the global
instruction files loaded into every session). For creating a genuinely new skill from
nothing, use `superpowers:writing-skills` instead — its pressure-scenario testing is
the heavier tool for guidance that doesn't exist yet.

---

## Scope Decision Guide

```
Need agent instructions for...
├── Every project on this machine → ~/.claude/CLAUDE.md  (user-global)
├── This specific project only
│   ├── Solo project                → CLAUDE.md at project root
│   ├── Team project (checked in)  → CLAUDE.md or AGENTS.md at project root
│   └── Personal prefs on a team   → CLAUDE.local.md  (add to .gitignore)
├── Monorepo with distinct sub-packages
│   ├── Spans all packages          → root CLAUDE.md
│   └── Package-specific rules      → CLAUDE.md in that package dir, or
│                                      .claude/rules/<name>.md with paths: frontmatter
└── Multi-tool (2+ AI assistants)
    └── See references/multi-tool-compat.md
```

---

## Anti-Patterns

Avoid these — they make instruction files worse over time:

| Anti-pattern | Why it fails | Alternative |
| --- | --- | --- |
| Multi-step procedures ("to deploy, step 1...") | Bloats every session; hard to maintain | Move to a skill or a runbook |
| Large reference material | Expensive on every session | `@import` or a skill with `references/` |
| "Always use X" with no context | Gets ignored; no reasoning to generalize from | Explain the why: "Use X because Y" |
| Git history or incident notes | Stale fast; belongs in commits | Commit message or ADR |
| Duplicate content across scope levels | Diverges silently | Use `@import` to share a single source |
| Instructions for hypothetical scenarios | Not active constraints | Only write what shapes daily work |
| Personal preferences in a team file | Pollutes shared instructions | Put personal prefs in `CLAUDE.local.md` |

---

## Multi-Tool Quick Guide

For projects used with more than one AI coding tool, read `references/multi-tool-compat.md`
for the full decision matrix. Quick summary:

- **Claude Code only** → write everything in `CLAUDE.md`, use `@import` freely
- **Codex only** → write everything in `AGENTS.md` (plain Markdown, no imports)
- **Claude Code + Codex** → write in `AGENTS.md`; `CLAUDE.md` = single line `@AGENTS.md`
- **+ Gemini / OpenCode** → same as above; make `GEMINI.md` a **symlink** to `AGENTS.md`
  (`ln -sf AGENTS.md GEMINI.md` — Gemini has no imports, and a symlink means zero sync drift).
  OpenCode reads `AGENTS.md` directly.
- **Claude-only tool wiring** (which skill/hook to invoke) → keep it in a separate
  `claude-extras.md`, and set `CLAUDE.md` = `@AGENTS.md` + `@claude-extras.md` so the shared
  `AGENTS.md` stays universal. Prefer symlinks from a canonical source over copies; see
  `references/multi-tool-compat.md`.
Files in this package (11)
  • SKILL.md 8 KB
  • references/content-taxonomy.md 5 KB
  • references/editing-discipline.md 5 KB
  • references/multi-tool-compat.md 6 KB
  • references/scope-hierarchy.md 6 KB
  • references/cookbook/agent-mcp-project.md 6 KB
  • references/cookbook/minimal-project.md 3 KB
  • references/cookbook/monorepo.md 5 KB
  • references/cookbook/python-project.md 5 KB
  • references/cookbook/typescript-project.md 5 KB
  • references/cookbook/user-global.md 6 KB

Versions

RepositoryScoreLicence
This page · joeblackwaslike/agent-skills87MIT
sentimony/skills100MIT
devantler-tech/agent-skills100Apache-2.0
nimadorostkar/Claude-Skills-collection100MIT
SimonFoote-greensparx/CopilotForge100CC-BY-4.0
tushaarmehtaa/tushar-skills100MIT
murphytrueman/design-system-ops100MIT
EpicenterHQ/epicenter95MIT

Database snapshot: 13.11.2026 · package version 937a0abfb32b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100install-user-instructions
    Install, update, or audit general user-level AI coding instructions across Claude Code, OpenAI Codex, GitHub Copilot CLI, and Cursor. Use when the user asks to set up global instructions, personal AGENTS.md or CLAUDE.md defaults, configure instructions for multiple agent…
  • 90ariadne:workspace-instructions
    Create or update workspace-level instruction files for code repositories or ordinary project folders, including AGENTS.md, CLAUDE.md, GEMINI.md, local override files, and Ariadne vault-link blocks. Use when a user wants to initialize, repair, or refresh workspace instructions,…
  • 100agents-md
    This skill should be used when the user asks to "create AGENTS.md", "update AGENTS.md", "maintain agent docs", "set up CLAUDE.md", or needs to keep agent instructions concise. Guides discovery of local skills and enforces minimal documentation style.
  • 100agents-md-author
    Bootstrap or update project AI-agent instruction files (AGENTS.md for Codex, CLAUDE.md for Claude Code, or both) from the current project's structure. Triggers on: write AGENTS.md, write CLAUDE.md, generate AGENTS.md, agent instructions, project conventions for AI, bootstrap…
  • 100install-agents
    Use when the user wants to install or update the agents of this repository into Claude Code, Codex, Gemini CLI or Copilot CLI (user-level or in one project).
  • 100using-agent-skills
    Explains how to find, choose, install and invoke agent skills (SKILL.md folders that follow the Agent Skills specification) in Claude Code, Codex, Gemini CLI and Cursor, each by its own documented mechanism. Use when a user asks "which skill should I use for this", "what skills…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.