agents-brain
Skill96 starsChanged 2 months agoMITView on GitHub
If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly; do not invoke this skill again through a skill tool. Create or polish repo-local context as one coherent system: human-facing README.md files, agent-facing AGENTS.md files (with companion CLAUDE.md symlinks only for pre-native Claude Code, per Claude Code Compatibility below), existing project-installed skills under .agents/skills, eligible source-catalog skills under skills/<name>/, and context docs — any other Markdown files, under any name or directory,…
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- toolkit/AGENTS.mdAGENTS.md
- agents-docsSkill
- agents-introspectionSkill
- ai-pruneSkill
- autoresearchSkill
- brainstormSkill
- chromium-browserSkill
- claude-handoffSkill
- cli-castSkill
- cli-coingeckoSkill
- cli-ghSkill
- cli-justSkill
- codebase-designSkill
- code-polishSkill
- codex-handoffSkill
- commitSkill
- copy-transcript-pathSkill
- effect-tsSkill
- evm-atlasSkill
- fresh-eyes-sweepSkill
- frontend-designSkill
- git-squashSkill
- grill-meSkill
- html-debriefSkill
- html-playgroundSkill
- interview-meSkill
- large-file-refactorSkill
- naming-refactorSkill
- node-deps-bumperSkill
- pdfSkill
- release-bumperSkill
- repo-cross-pollinationSkill
- repo-harmonizationSkill
- repo-renameSkill
- skill-doctorSkill
- skill-harmonizationSkill
- skill-mapSkill
- skill-writingSkill
- spreadsheetsSkill
- tailwind-cssSkill
- task-handoffSkill
- todo-archiveSkill
- tool-finderSkill
- vitestSkill
- wrap-upSkill
- yeetSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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
- Distinctive: line 17
If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly.
- Distinctive: line 20
Create or polish repo-local context as one coherent system: human-facing README.md files, agent-facing AGENTS.md files (with companion …
- Distinctive: line 55
Keep only content that changes a decision, prevents an evidenced mistake, or supplies a non-discoverable constraint.
- Very specific: line 76
If the intent is unclear, select polish in --dry-run mode and report the smallest useful planned change set.
- Distinctive: line 90
Do not expand from documentation work into source changes, skill creation, or external writes.
- Very specific: line 111
If --minimal and --thorough / --full are both present, make no writes and ask the user to choose.
- Distinctive: line 116
Run before discovery or writes:
- Very specific: line 140
When managed_skill_root is set, allow README.md, AGENTS.md, and CLAUDE.md work elsewhere in that repository, but exclude the entire …
- Distinctive: line 165
Do not create CLAUDE.md symlinks.
- Distinctive: line 166
Delete every CLAUDE.md that is a symlink resolving to its sibling AGENTS.md, in the same pass and across the whole selected tree, using git …
- Very specific: line 171
When claude is missing or older, keep the pre-native behavior: create or refresh a sibling symlink only where CLAUDE.md is missing or …
- Very specific: line 179
Use git-aware discovery, canonicalize every candidate beneath repo_root, and exclude VCS, dependency, environment, and build outputs.
- Very specific: line 194
After writes, run repository-defined Markdown formatting or checks when present.
- Very specific: line 206
When issues need a separate section, group verified fixes with evidence as Resolved and remaining problems as Open, with impact and next …
- Distinctive: line 210
Keep paths, commands, guard-rail errors, symlink targets, and user-authored content exact and undecorated.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Agents Brain
If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly; do not invoke this skill again through a skill tool.
Create or polish repo-local context as one coherent system: human-facing README.md files, agent-facing AGENTS.md files
(with companion CLAUDE.md symlinks only for pre-native Claude Code, per Claude Code Compatibility below), existing
project-installed skills under .agents/skills, eligible source-catalog skills under skills/<name>/, and context docs
— any other Markdown files, under any name or directory, whose content is durable guidance for agents or humans, such as
conventions, command catalogs, data-format rules, workflow runbooks, and reference material.
Success means every selected target is grounded in repository evidence, respects its audience and scope, spends agent context only on guidance that changes behavior, and passes the narrowest repository-defined validation. Stop after reporting completed or planned changes, validation, and any blockers.
Model and Context Optimization
Optimize skills and other agent-facing context for GPT-6.1 Sol and Claude Opus 5.5 while preserving README.md as clear
human-facing documentation. Before complex, long-running, multi-tool, or orchestration-heavy context work, resolve
scripts/fetch-guidance.sh relative to this skill directory, run it once for gpt-6.1-sol and once for
claude-opus-5-5, and read both returned files completely. The helper retrieves the official
GPT-6.1 Sol prompting guidance
and
Claude Opus 5.5 prompting guidance
because their recommendations may evolve. OpenAI publishes Sol guidance in the shared GPT-6 guide; evaluate its
family-wide prompting recommendations on GPT-6.1 Sol. Simple context work does not require either guide.
Accept an integrity-valid cached guide for 24 hours. Use --refresh for explicitly latest or change-sensitive work,
materially disputed guidance, or conflicts with observed model behavior. Interpret helper diagnostics precisely:
cachedreused a guide validated no more than 24 hours ago without network access.revalidatedrefreshed validation metadata after a successful conditional304response.fetchedatomically replaced the cache with integrity-valid content from the pinned official URL.stalereused a guide validated no more than seven days ago after live retrieval failed. Proceed only after reading it and disclose the validation timestamp and retrieval failure under open issues and caveats.
Forced refreshes, expired entries, integrity failures, and unexpected redirects fail closed. If either required guide cannot be returned, stop qualifying work before writing instead of substituting memory or another source. Never create the cache in a repository or skill installation.
Keep only content that changes a decision, prevents an evidenced mistake, or supplies a non-discoverable constraint. State each meaning once at the narrowest reliable load scope, except where independently installed artifacts need to stay self-contained. Preserve authority, safety, material exceptions, semantic success criteria, and exact machine-consumed text. Documentation-only authority does not permit changing helpers or schemas; report an extraction opportunity instead.
Choose a Workflow
Choose exactly one workflow and read only its reference.
For skill creation, first inspect applicable repository instructions. When they define a source catalog and lifecycle,
stop and follow that repository-owned workflow. Use skill-writing only when no catalog-specific workflow exists.
| User intent | Workflow | Reference |
| Update, refresh, sync, prune, polish, repair, or fix context | polish | references/polish.md |
| Create, initialize, generate, or regenerate context files | create | references/create-docs.md |
| Audit, check, review, inspect, or suggest changes without edits | polish in --dry-run mode | references/polish.md |
| Create or scaffold a skill | Stop | Use repository catalog lifecycle or skill-writing |
| Install, discover, remove, or rename a skill | Stop | Use a dedicated skill-management workflow |
If the intent is unclear, select polish in --dry-run mode and report the smallest useful planned change set.
Authority
- Apply explicit user instructions and established authorization before this skill's defaults. Do not ask again for an unchanged decision; preserve host restrictions and required destructive-action approval.
- Explicit create, update, polish, repair, fix, or equivalent intent authorizes in-scope local writes. Inspection-only
intent and
--dry-rundo not. - Require explicit confirmation before deleting README.md, AGENTS.md, regular CLAUDE.md files, or context-doc targets.
--forceauthorizes documented overwrites, not deletions. The one standing exception is a CLAUDE.md symlink to a sibling AGENTS.md when the installed Claude Code reads AGENTS.md natively (see Claude Code Compatibility): delete it without asking. - Resolve scope from the requested outcome. Preview a large change set, then continue when it is already authorized; file count alone is not an approval boundary. Ask only when an unresolved choice changes scope or intended meaning.
- Do not expand from documentation work into source changes, skill creation, or external writes.
Complete authorized discovery, edits, and validation before reporting completion. When one target needs input, continue independent targets and identify the exact unresolved choice. If a skill rule requires a pause, cite that rule and explain why existing authorization does not cover the next action.
Arguments
path: Optional repo-relative subtree. Restrict documentation, package-root, project-skill, source-catalog skill, and context-doc discovery to that subtree.target ...: Optional filters duringpolish: skill names from existing.agents/skills/<name>/or eligibleskills/<name>/trees, or repo-relative Markdown paths selecting specific context docs.--root-only: Select only root README.md, AGENTS.md, and CLAUDE.md targets. Exclude project-installed skills, source-catalog skills, and context docs unless explicitly selected bytarget.--dry-run: Report planned writes and concise diffs without changing files.--preserve: Duringpolish, keep accurate user-authored prose and structure; fix only drift and obvious noise.--minimal: Produce the smallest context that still meets the completion bar.--thorough/--full: Perform deeper analysis only where it adds durable, repository-specific context.--force: Duringcreate, regenerate existing README.md or AGENTS.md targets without prompting. Never applies to skills or deletions.
If --minimal and --thorough / --full are both present, make no writes and ask the user to choose. Report
unrecognized flags; continue only when they cannot change scope, safety, or write behavior.
Repository Guard Rail
Run before discovery or writes:
cwd="$(pwd -P)"
case "$cwd" in
/) printf 'abort: refusing to run at the filesystem root\n' >&2; exit 1 ;;
esac
repo_root="$(git rev-parse --show-toplevel 2>/dev/null)" || {
printf 'abort: not inside a git repository\n' >&2; exit 1; }
managed_skill_root=
case "$repo_root" in
/|"$HOME") printf 'abort: unsupported repo root: %s\n' "$repo_root" >&2; exit 1 ;;
"$HOME/.agents"|"$HOME/.codex"|"$HOME/.claude") managed_skill_root="$repo_root/skills" ;;
"$HOME/.agents/"*|"$HOME/.codex/"*|"$HOME/.claude/"*)
printf 'abort: repo root is nested under an agent configuration repository: %s\n' "$repo_root" >&2; exit 1 ;;
esac
if [ -n "$managed_skill_root" ]; then
case "$cwd" in
"$managed_skill_root"|"$managed_skill_root/"*)
printf 'abort: installed skills must be edited in their source catalog: %s\n' "$cwd" >&2; exit 1 ;;
esac
fiWhen managed_skill_root is set, allow README.md, AGENTS.md, and CLAUDE.md work elsewhere in that repository, but
exclude the entire installed skills/ tree from every workflow. Apply the exclusion before discovery, canonicalization,
or symlink traversal. If path, a target, or an explicit request would enter that tree, make no writes there and
report that the skill must be edited in its source catalog. --force does not override this boundary.
Outside managed agent-config roots, eligible git-tracked skills/<name>/ source catalogs are in scope for polish per
references/polish.md.
Claude Code Compatibility
Claude Code v2.1.277 and later read AGENTS.md directly whenever no CLAUDE.md, .claude/CLAUDE.md, or
CLAUDE.local.md exists in the working directory or above it, so a CLAUDE.md symlink is no longer needed. Detect the
installed version once per run before either workflow touches CLAUDE.md:
claude_version=$(claude --version 2>/dev/null | awk '{ print $1; exit }')
agents_md_native=false
if [ -n "$claude_version" ] &&
[ "$(printf '%s\n' 2.1.277 "$claude_version" | sort -V | head -n 1)" = 2.1.277 ]; then
agents_md_native=true
fiWhen agents_md_native=true:
- Do not create CLAUDE.md symlinks.
- Delete every CLAUDE.md that is a symlink resolving to its sibling AGENTS.md, in the same pass and across the whole
selected tree, using
git rmwhen tracked. Leave regular CLAUDE.md and CLAUDE.local.md files untouched and report them: any such file at or above the repository root still suppresses direct AGENTS.md loading unless the user sets Project instructions toclaude-md-and-agents-mdin/config.
When claude is missing or older, keep the pre-native behavior: create or refresh a sibling symlink only where
CLAUDE.md is missing or already a symlink, and never delete one.
Snapshot git status --short before broad edits. Preserve unrelated pre-existing changes and re-check expected paths
after generators or broad commands.
Discovery and Tool Routing
Use git-aware discovery, canonicalize every candidate beneath repo_root, and exclude VCS, dependency, environment, and
build outputs. Deliberately include ignored .agents/skills/*/SKILL.md only when project skills are selected. Discover
git-tracked, non-ignored, non-symlinked skills/*/SKILL.md only outside managed agent-config roots and only when
source-catalog skills are selected. Parse each selected skill's YAML frontmatter. Inspect only a project-installed
skill's declared write boundary before deciding whether it qualifies for a coordination exemption. Prefer fd, fall
back once on suspiciously narrow results, and synthesize independent repository evidence before writing.
Discover context docs by following Markdown links from README.md, AGENTS.md, CLAUDE.md, and SKILL.md files, then by scanning remaining tracked Markdown whose content qualifies. Classify by content, never by file name or location. Exclude changelogs, licenses, legal and policy notices, generated or vendored documentation, and prose that is product content rather than guidance. When classification is uncertain, leave the file out of scope and report it as a candidate.
Completion and Report
After writes, run repository-defined Markdown formatting or checks when present. If skill frontmatter or
agents/openai.yaml changed in a project-installed skill, run its invocation metadata check. Verify that no CLAUDE.md
symlink remains when agents_md_native=true, and that every retained or created symlink resolves to its sibling
AGENTS.md otherwise. In --dry-run, report commands that would depend on planned files instead of running them.
Lead with ### ✅ Context updated only after writes and required validation pass,
### ⚠️ Context updated — validation failed when files were written but required checks fail,
### 🔎 Context preview — no files written in dry-run mode, or ### ⛔ Context blocked — no files written for a
pre-write stop. Follow with the workflow and scope, material changes, exact validation commands and outcomes, and any
remaining limitation. Use short prose for a small change; add headings or tables only when they organize repeated
information, and a tree only when directory ownership matters. Follow the user's requested report format.
When issues need a separate section, group verified fixes with evidence as Resolved and remaining problems as Open,
with impact and next action. Omit empty groups and report each item once. Reserve blocker for something preventing
required work and risk for a specific potential adverse outcome. A workaround leaves the underlying issue open.
Keep paths, commands, guard-rail errors, symlink targets, and user-authored content exact and undecorated. Omit empty detail and stop once the selected targets meet the completion bar.
References
polish: readreferences/polish.md.create: readreferences/create-docs.md.
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
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.

