agentleFS
pdparchitectpdparchitect/noodle/.agents/skills/agents-md-symlink/SKILL.md

agents-md-symlink

Skill286 starsChanged 3 days agoApache-2.0View on GitHub

Every AGENTS.md must have a sibling CLAUDE.md symlink pointing to it. Use when creating, moving, renaming or deleting an AGENTS.md or CLAUDE.md file in any directory, or when auditing agent instruction files.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from the directory that holds the AGENTS.md:

    line 15
  2. Distinctive:

    If a regular CLAUDE.md already exists, read it first.

    line 24
  3. Distinctive:

    When an AGENTS.md is moved, renamed or deleted, do the same to its link.

    line 31
  4. Distinctive:

    When the directory is a build-system source folder, give CLAUDE.md the same exclusion AGENTS.md has, so it is not treated as a source or …

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AGENTS.md with a CLAUDE.md symlink

AGENTS.md is the single source of agent instructions. Claude Code reads only CLAUDE.md, so every directory that has an AGENTS.md also needs a CLAUDE.md that is a relative symbolic link to it. Never keep a second copy of the text, and never write an import stub instead of a link.

Create

Run from the directory that holds the AGENTS.md:

ln -s AGENTS.md CLAUDE.md

The target must be the bare filename. Git stores the target verbatim, so an absolute path breaks on every other checkout.

If a regular CLAUDE.md already exists, read it first. Merge anything that is not already in AGENTS.md, then replace the file with the link.

Keep in step

  • Edit AGENTS.md only. Writing through CLAUDE.md works, but replacing it with a regular file silently breaks the link.
  • When an AGENTS.md is moved, renamed or deleted, do the same to its link.
  • When the directory is a build-system source folder, give CLAUDE.md the same exclusion AGENTS.md has, so it is not treated as a source or resource file.

Verify

List every AGENTS.md whose sibling link is missing or wrong:

find . -name AGENTS.md -not -path './.git/*' -not -path './.build/*' | while read -r f; do
  d=$(dirname "$f")
  [ "$(readlink "$d/CLAUDE.md")" = "AGENTS.md" ] || echo "missing or wrong: $d/CLAUDE.md"
done

Git must record the link as a symlink, mode 120000:

git ls-files -s -- '*CLAUDE.md'

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.