Catalogue / agents-tree
agents-tree
MITSignedBuild or refresh a repository's AGENTS.md hierarchy and engineering standards, with researched architecture recommendations.--- name: agents-tree description: Build or refresh a repository's AGENTS.md hierarchy and engineering standards, with researched architecture recommendations. disable-model-invocation: true ---
agents-tree
Build a doc tree in the target repository: AGENTS.md files that let a coding agent navigate, follow the architecture and debug without rediscovering the repository, and engineering standards that tell it how to write code there.
Two constraints hold in every step:
- Documentation only. This skill writes
AGENTS.md,CLAUDE.mdbridges,docs/engineering-standards.mdanddocs/architecture-recommendations.md, and nothing else. Every other file, source comments included, stays untouched; source moves and renames become recommendations. The companion skills in step 0b write their own config files, under their own constraints. - Evidence or approval. Descriptions state what the repository does today, as shown by code, tests, config or git history. What code *should* do is a standard once the user approves it, written only in the standards file, the root principles block and the Standards section of a nested file. Until then it is a recommendation.
0. Choose the path
Read the root AGENTS.md. If it contains an <!-- agents-tree: reviewed <hash> --> marker, follow refresh.md. Otherwise continue below. Either path also runs the companion skills in step 0b.
0b. Companion skills
Every run also runs two companion skills: agent-bans and security-guardrails. The user's own /agents-tree invocation is what starts them, and step 5 is where the user approves them. Both set disable-model-invocation, so the Skill tool cannot start them; this section reads their files with Read instead, and only as part of this job. Read ../agent-bans/SKILL.md and ../security-guardrails/SKILL.md relative to this file. If either file is missing, stop before step 1 and tell the user to install it (npx skills add zrlldy/zrldy-skills --skill <name>, or the plugin).
Run them as one job with this skill, under one approval:
- Survey and research (their steps 1 and 2) run alongside steps 1 and 2 here. Their queries follow the public-names rule in step 2.
- Plan (their step 3) joins step 5. Their "plan, then stop" wording gives way to step 5. The user approves one plan that lists every file, tool, install, command, scan and ban from all three skills, plus what leaves the machine.
- Stop rule. A companion's "say so and stop" (its no-gaps or no-changes exit) ends only that companion's steps. This skill continues with its own steps.
- Write runs after step 6. Order: this skill's documents, then each companion's files other than
.claude/settings.json, agent-bans first, then security-guardrails. Then.claude/settings.jsononce, last, with both companions' rules merged in. A companion's step 4 instruction to write settings last applies to that merged write, not to a separate write per companion. Shared files (AGENTS.md,CLAUDE.mdbridges) get one merged edit each that keeps the human text. - Prove and report (their steps 5 and 6) run after step 7, and the report covers all three skills.
The "documentation only" constraint above governs the files this skill writes. Each companion's "config only" constraint governs its own files.
1. Survey
Read standards.md. Read the manifests, lockfiles, build, test, lint and format config, CI workflows, entry points, existing agent and human docs (AGENTS.md, CLAUDE.md, .claude/CLAUDE.md, README, docs/), the directory tree and recent git history. Skip dependencies, build output, vendored and generated code. If you can dispatch subagents and the repository is large, give each one a subtree, split between the step 1 agents in standards.md; otherwise go subtree by subtree.
Done when you can name the stack with versions (or note that none is declared), every command and the purpose of every source directory in scope, and every item under Discover in standards.md has evidence or is marked absent.
2. Research
If web access is available, search for current guidance on architecture, folder organization and the stack topics listed in standards.md, for the detected stack and versions. Prefer official framework and language documentation, then well-established sources. Record the URL for each finding. Send only public technology names and versions in queries, subagents included: no repository name, code or internal identifiers.
If web access is unavailable, say so in the plan and in the recommendations file, and compare the repository against its own conventions only.
Done when each major technology has a cited source or is marked unresearched.
3. Map earned directories
The root always gets a file. A subdirectory is earned when it has conventions, boundaries or traps that a directory listing does not reveal. Leave all others to their parent.
Done when every source directory is marked earned (with the reason) or skipped.
4. Draft standards
Follow Decide in standards.md, using baseline.md, and run the Reviewer pass on the draft.
Done when every standard has a status and source label, and every conflict has a winner or a question for the user.
5. Plan, then stop
Show the user:
- each file to create or edit, with the reason
- for existing files, what is added and any conflict between them and the code
- the standards, baseline included, one line each with status and source label, for the user to approve, change or drop
- each conflict between sources, with its trade-off
- the recommendations, one line each
Then end your turn and wait for approval. Write nothing before the user approves this plan.
6. Write
Use the shapes and size caps in templates.md and Write in standards.md. A proposed standard the user did not approve goes to the recommendations file; a dropped or changed baseline standard goes under Deviations instead.
Existing files hold human work, so merge into them: keep their text, add what is missing, and report conflicts for the user to resolve. A file already over its cap keeps its content; report it.
Put a bridge beside each AGENTS.md so Claude Code loads it:
| Beside the AGENTS.md | Action | |---|---| | No CLAUDE.md | Create CLAUDE.md containing only @AGENTS.md | | CLAUDE.md with content | Add an @AGENTS.md line at the top; keep everything else in place | | CLAUDE.md already imports or symlinks to AGENTS.md | Leave it |
Record the output of git rev-parse HEAD in the root marker. Omit the marker if the repository has no commits.
7. Verify
- Every path and link written in the tree exists.
- Every command is defined in a manifest, script, config or CI file.
- Every
AGENTS.mdin the doc tree has a bridge. - Every standard has a status and source label, and every researched standard or recommendation a URL.
- The root principles block, the standards file and nested standards agree, and each standard appears in full once (the root block only summarises).
- Nothing written comes from a developer's personal instruction files.
git statusshows changes only to the files in the approved plan (plus any that were already changed before you started). Without git, check that every file you wrote is in that plan.
Run tests, builds or other repository commands only if the user approves each one. Report which commands were run and which were only found defined.
Done when every check passes. Finish by listing the files written, unresolved conflicts and anything unverified.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 7.6 kB | f9d43ab15d00 |
| SKILVAULT_SOURCE.json | 1.5 kB | 0dd6568a3f38 |
| THIRD_PARTY_NOTICES.md | 1.0 kB | 6654f0449138 |
| baseline.md | 4.4 kB | f92a7449af4b |
| refresh.md | 1.9 kB | 360e4581b6ed |
| standards.md | 5.0 kB | af0ead750ffd |
| templates.md | 2.3 kB | 7548c45fd433 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | a988f3f29c5d | 2 Dec 2026 |
Locking a skill to one version needs Pro.