Claude reads the instruction file the repository keeps
claude/instructions-symlinked@v1
CLAUDE.md is a symbolic link to AGENTS.md rather than a second copy of it or nothing at all.
| Id | claude/instructions-symlinked |
| Version | v1 |
| Category | claude |
| Default severity | warning |
| Interpreter | python3 |
| Timeout | 30 seconds |
| Violations tolerated | 0 |
| Collects | files |
Collectors
This guardrail gathers nothing itself. It depends on the collectors below, which the CLI runs once per build before any check, and reads what they found out of GUARDRAIL_FACTS. A collector that collects nothing skips this guardrail rather than failing it.
| Collector | Gathers | Inputs it is given |
|---|---|---|
files | Presence, size and line counts of the well known files a repository is expected to carry, plus any extra path the guardrail asks for. | paths |
The inputs above are this guardrail's own, passed straight through. Configuring one in buildnote.json changes what is collected, and two guardrails configured the same way share the one collection.
Configuration
{
"guardrails": {
"failOn": "error",
"checks": [
{
"use": "claude/instructions-symlinked@v1",
"severity": "warning",
"with": {
"paths": "CLAUDE.md,AGENTS.md"
},
"exemptions": []
}
]
}
}Inputs
| Input | Description | Default | Environment variable |
|---|---|---|---|
paths | The alias first, then the file it must be a symbolic link to. Both are relative to the directory the CLI runs in. | CLAUDE.md,AGENTS.md | GUARDRAIL_INPUT_PATHS |
How to fix
Point the alias at the file the repository actually keeps:
ln -sf AGENTS.md CLAUDE.md
git add CLAUDE.mdClaude Code reads CLAUDE.md; the agents.md convention every other agent follows is AGENTS.md. A repository with only one of them instructs only some of the agents working in it, and a repository with two files instructs them differently within a month.
Check the link is committed as a link: git config core.symlinks must be true on a Windows checkout, or git writes a text file holding the target's name and both agents read that.
More in claude
claude/cli-safe-flags. No Claude CLI invocation the build executed asked for its approval step to be skipped.claude/cli-structured-output. Every headless Claude CLI invocation the build executed asked for structured output.