Normalize agent instructions
Personal agent skills for coding agents, installable with npx skills.
npx -y skills add Andiedie/skills --skill normalize-agent-instructionsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Normalize AGENTS.md/CLAUDE.md project instruction files. Use when the user asks to standardize AGENTS.md and CLAUDE.md or migrate Claude guidance to AGENTS.md.
SKILL.md
8.6 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Normalize Agent Instructions
Use this to make AGENTS.md the only instruction source and CLAUDE.md its adapter.
Policy
AGENTS.mdholds all instructions.- A regular
CLAUDE.mdis a pure adapter whose canonical bytes are@AGENTS.md\n. It holds no additional instructions. - A
CLAUDE.mdsymlink is normalized only when it directly and relatively targets a regular siblingAGENTS.md. - Never infer ownership of extra content or automatically merge, delete, overwrite, or deduplicate instructions.
- Obey effective higher-priority local rules. An incompatible rule is an authority blocker, not a preference the user can bypass here.
Workflow
1. Scan The Complete Project
Find every AGENTS.md and CLAUDE.md in the current project, excluding dependency, generated, and VCS directories.
Use filename search as a discovery seed:
rg --files --hidden \
-g 'AGENTS.md' \
-g 'CLAUDE.md' \
-g '!**/.git/**' \
-g '!**/node_modules/**' \
-g '!**/dist/**' \
-g '!**/build/**' \
-g '!**/.next/**' \
-g '!**/coverage/**'
Supplement that seed with a non-following directory-entry scan for the two exact names so symlinks and special objects omitted by rg are still discovered. Do not infer that a path is absent merely because rg omitted it. For every discovered directory and exact instruction path, inspect the path object without following symlinks:
- record whether
AGENTS.mdandCLAUDE.mdare absent, regular files, directories, symlinks, or other objects; - record each symlink's literal target and whether the immediate sibling target is a regular file;
- record whether regular files are readable, writable when an in-place rewrite is possible, and tracked;
- record the action-specific write premises without mutating the project: each containing directory that may receive a create, rewrite, or rename is searchable and writable; each rename source is readable and movable; each destination is absent and creatable; and, for a tracked source, the repository worktree and index allow the planned
git mv; and - read effective local instructions that constrain either file.
Classify regular-file layouts by directory:
agents-only: regularAGENTS.md, absent siblingCLAUDE.md;claude-only: regularCLAUDE.md, truly absent siblingAGENTS.md;paired: regular siblingAGENTS.mdandCLAUDE.md, or regularAGENTS.mdplus a candidateCLAUDE.mdsymlink;none: no instruction path object anywhere in scope.
A regular sibling AGENTS.md always makes the directory paired; never treat its CLAUDE.md as a rename source. Any AGENTS.md symlink or special object is a hard blocker. A CLAUDE.md directory or other non-regular, non-symlink object is a hard blocker. A CLAUDE.md symlink is valid only when its literal relative target is AGENTS.md or ./AGENTS.md and that sibling is a regular file. Cross-directory and absolute symlinks, and chained, cyclic, and dangling symlinks, are hard blockers. Any unreadable instruction object is also a hard blocker.
Completion criterion: every instruction path has an observed object type, every directory has one layout classification or exact hard blocker, and no write has occurred.
2. Plan Every Directory Before Writing
Resolve each instruction directory independently:
agents-only: plan to preserveAGENTS.mdand add a siblingCLAUDE.mdadapter.claude-only: when the sibling target is proven absent, plan to preserve the content by movingCLAUDE.mdtoAGENTS.md, then add the pure adapter. Prefergit mvwhen the source is tracked.claude-onlywhoseCLAUDE.mdalready imports missing@AGENTS.md: record a hard blocker instead of moving an adapter into its own source.pairedwith regular files: aCLAUDE.mdcontaining only@AGENTS.mdplus harmless surrounding whitespace is deterministic; plan a canonical rewrite only when its bytes differ. Any additional non-whitespace content is a real conflict.pairedwith a direct relativeCLAUDE.mdsymlink to the regular siblingAGENTS.md: treat the directory as normalized and plan a no-op.
Mixed layout is not a conflict. A project may contain any combination of directory states when each directory has a deterministic result.
Build one complete plan that lists the deterministic action, real conflict, authority blocker, or hard blocker for every directory. Do not edit any instruction file during scanning or planning. Never overwrite or deduplicate an occupied target, even when its text appears identical.
Use action-appropriate, non-mutating checks to prove each write premise. For a tracked migration, require the exact git mv --dry-run -- <source> <destination> to be applicable and establish that the Git index can be updated; do not silently fall back to an untracked filesystem move. If any required write premise cannot be established—including parent-directory searchability or writability, source readability or movability, destination absence or creatability, regular-file writability, or tracked git mv and index applicability—record an insufficient write premise as a hard blocker for that directory.
Completion criterion: every directory has exactly one planned outcome, every planned action has proven write premises, and every unresolved outcome names its concrete evidence.
3. Stop or Apply Once
If any directory has a real conflict, authority blocker, or hard blocker:
- write nothing anywhere in the project;
- for real content conflicts, report only the conflicting directories, their concrete differences, valid preservation options, and a recommendation;
- for authority or hard blockers, report the exact blocking rule or path state and the condition that would make a fresh run safe; do not offer an overwrite, forced replacement, or authority bypass;
- retain the deterministic plan for every unaffected directory; and
- ask only about the blocked directories instead of requesting a mixed-project policy.
After every conflict is resolved, run a fresh complete scan and rebuild the plan. When no blocker exists, proceed without asking merely because directory layouts differ.
Completion criterion: either the project remains unchanged with precise conflict questions, or one complete conflict-free plan is ready to apply.
4. Handle Projects With No Files
If the scan finds no AGENTS.md or CLAUDE.md, report that there is nothing to normalize. Recommend creating a root AGENTS.md plus a root CLAUDE.md adapter, but ask before creating either file. Stop until the user confirms; after confirmation, add the root pair to a fresh complete plan before writing.
Completion criterion: the user knows no instruction files exist and has a clear recommended starting point.
5. Apply The Plan
Revalidate every planned path type, file fingerprint, symlink target, local rule, destination, and action-specific write premise immediately before the first write. This includes containing-directory searchability and writability, rewrite-target writability, rename-source readability and movability, destination absence and creatability, and tracked git mv and index applicability. If any state drifted or a write premise is no longer provable, write nothing and report the changed premise as a hard blocker.
For each planned change:
- preserve every existing
AGENTS.md; - move
claude-onlycontent to siblingAGENTS.md, usinggit mvfor tracked files when possible; and - create or normalize the sibling regular
CLAUDE.mdas the pure adapter:
@AGENTS.md
If an unexpected write fails after mutation begins, stop immediately. Report the exact changed and unresolved paths; do not attempt a broad rollback that could overwrite concurrent user changes, and do not claim transactional success.
Completion criterion: every planned directory change is applied without merging, discarding, duplicating, or silently overwriting instructions.
6. Verify
After edits, rerun the complete path-object scan. Confirm that every instruction directory has a regular AGENTS.md plus either:
- a regular
CLAUDE.mdwith canonical bytes@AGENTS.md\n; or - an accepted direct relative
CLAUDE.mdsymlink to the regular siblingAGENTS.md.
Run:
git diff --check
Report changed files, unresolved directories, and any verification commands that could not run.
Completion criterion: every directory is normalized, a second run is a zero-write no-op, whitespace checks pass, and no success is reported while a directory or verification step remains unresolved.
Gives 0 of the 12 instructions most memory context skills give in ~1.9k tokens
Counted across 674 of the 847 authors here whose files we hold, read 2026-08-06
- inform the user when setup is completein 21 of 674, across 6 files
- confirm the draft with the user before writingin 21 of 674, across 6 files
- update the agent skills block in place if it existsin 21 of 674, across 6 files
- present findings to the userin 20 of 674, across 5 files
- write the three docs files from seed templatesin 20 of 674, across 5 files
- ask the user about each decision one at a timein 19 of 674, across 4 files
- edit CLAUDE.md if it existsin 18 of 674, across 3 files
- explore current repo statein 18 of 674, across 3 files
- do not overwrite user edits to surrounding sectionsin 18 of 674, across 3 files
- back up the original file before overwritingin 16 of 674, across 8 files
- keep the memory index under 200 linesin 15 of 674
- Provide actionable steps and verificationin 13 of 674, across 2 files
Said here and by no other author read
- hold all instructions in AGENTS.md
- scan the complete project for instruction files
- record object types for every instruction path
- classify every instruction directory
- plan every directory before writing
- stop all writes if any blocker exists
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.