Agentsfile

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Oct 28, 2026

Validate AGENTS.md and CLAUDE.md against repo reality: paths, scripts, and commands checked.

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Validates a repo's AGENTS.md or CLAUDE.md against the repo itself, flagging missing paths and undefined npm, yarn or pnpm scripts.

What you can do
  • Check agent instruction files: run one validation over a repo root or a single AGENTS.md/CLAUDE.md file and get a VALID, DRIFT or MISSING verdict.
  • Inspect path references: backticked spans that look like relative paths are compared against the actual file tree.
  • Inspect script references: npm, yarn and pnpm script mentions are compared against package.json scripts.
  • Read findings: each one carries the file, line, exact quoted text and a severity, with deterministic sorted output.
When to use it
Useful when a repo relies on AGENTS.md or CLAUDE.md to guide coding agents and you want to catch drift after directories are renamed, scripts are deleted, or the file is only a stub. Also handy as a quick pre-commit or CI-style sanity check on those files.
Requirements
Runs as a local stdio process, either via npx with the npm package or via the Docker image. No credentials, API keys or network access are needed, and nothing in the target repo is executed. The target must be a repo directory or a single agent instruction file.
Before you install
Read-only and offline, but the check is existence-only: a path that exists is not verified to be the right file, and a script is not verified to do what the guide claims. Path detection is heuristic, so unusual file names can be missed and odd tokens can be flagged. Only root-level AGENTS.md and CLAUDE.md are read, and only backticked paths plus npm, yarn and pnpm script patterns are checked.

Installation

In SourceWeft

  1. Open Agentsfile in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

agentsfile

Agent instruction files rot quietly. This checks them against the repo they describe.

AGENTS.md and CLAUDE.md tell coding agents how a repo works: which files matter, which commands to run, how the project is laid out. Repos move faster than their instruction files. A renamed directory, a deleted script, a guide that was never more than a stub, and the agent following the file wastes its run or invents what the file got wrong. Nothing fails loudly, because nothing ever checked the file against the repo.

agentsfile does that check. It reads the AGENTS.md and CLAUDE.md at a repo root, extracts the backticked paths and the npm, yarn, and pnpm script references, and verifies each one against the actual file tree and the actual package.json. Every finding carries the file, the line, and the exact text it came from. The output is deterministic: sorted findings, no timestamps, the same repo always producing the same report.

What it checks

ruleseveritywhat it means
NO-FILEhighNeither AGENTS.md nor CLAUDE.md exists at the repo root.
PATH-MISSINGmediumA backticked span that looks like a relative path does not exist in the repo, as a file or as a directory.
SCRIPT-MISSINGmediumA referenced script (npm run <name>, npm test, yarn <name>, pnpm <name> and friends) is not defined in package.json scripts.
STUBlowAn agent file exists but is empty or under 5 lines long.
NO-PACKAGE-JSONinfoThere is no package.json at the repo root (or it does not parse), so script references were not checked.

Verdict rules:

  • VALID: no medium or high findings. Low and info findings can be present. Exit code 0.
  • DRIFT: at least one medium or high finding. The agent files disagree with the repo. Exit code 1.
  • MISSING: neither AGENTS.md nor CLAUDE.md exists at the repo root. Exit code 1.
  • Usage errors exit with code 2. A reader that closes the output pipe early makes the process exit 141, never 0.

Script reference details: npm run <name> checks <name> directly. The conventional shorthands npm test and npm start (plus stop and restart) map to the script of the same name. For yarn and pnpm, <manager> <name> and <manager> run <name> check <name>, and the package managers' own builtin subcommands (install, add, publish, and friends) are never treated as scripts.

Usage

CLI

bash
# Check the current reponpx @reneturcios/agentsfile check
# Check another repo, machine readablenpx @reneturcios/agentsfile check ~/src/my-repo --json
# Print the versionnpx @reneturcios/agentsfile --version

Example output:

text
agentsfile check .: DRIFT  files: 2, findings: 2 (high: 0, medium: 2, low: 0, info: 0)  summary: 2 agent file(s) checked; 2 finding(s): 0 high, 2 medium, 0 low, 0 info. Verdict: DRIFT.
AGENTS.md:  [MEDIUM] line 4 PATH-MISSING `src/gone.ts` Referenced path does not exist in the repo: src/gone.ts  [MEDIUM] line 5 SCRIPT-MISSING `npm run deploy` Script referenced but not defined in package.json scripts: deploy
DRIFT: at least one medium or high finding; the agent files disagree with the repo.

With --json the full report is printed as JSON: tool, version, target, verdict, counts (files, findings, and per-severity totals), the findings array, and a one-line summary. Checking needs no credentials and no network, and nothing in the target repo is executed.

The target may also be a single agent instruction file instead of a directory; its own directory is then treated as the repo root and only that file is checked.

MCP server

bash
npx @reneturcios/agentsfile mcp

Add to your MCP client config:

json
{  "mcpServers": {    "agentsfile": {      "command": "npx",      "args": ["-y", "@reneturcios/agentsfile", "mcp"]    }  }}

Tool: check_agents_file(path) returns the full check report for the repo (or single file) at path, as JSON.

Limits, stated plainly

  • Only AGENTS.md and CLAUDE.md at the repo root are read. Nested agent files in subdirectories are not checked in this version.
  • Only two kinds of reference are checked: backticked spans, and npm, yarn, and pnpm script patterns. Commands shown in fenced code blocks are found by the script patterns, but paths in fenced blocks without backticks are not checked, and neither are links, prose mentions, or commands from other toolchains (make, cargo, go, and so on).
  • Path detection is a heuristic, stated honestly: a backticked span counts as a path if it has no spaces, does not start with http, and either contains a slash or ends in a dotted segment that looks like a file extension from a known list (plus a small set of known dotfiles such as .env). Tokens containing characters such as @, :, *, =, or quotes are never treated as paths, so scoped package names and action references are not flagged. The flip side is real: an unusual file name can be missed, and an odd token that happens to look like a path can be flagged. Findings always quote the exact span so a human can judge in one glance.
  • The check is existence only. A path that exists is not checked for being the right file, and a script that exists is not checked for doing what the guide claims it does.
  • The stub rule is a line count (under 5 lines), not a quality judgment. A short file that is genuinely complete will still be reported at low severity, which never changes the verdict on its own.

Source: README.md at commit 1c596b5

Tools

1

check_agents_file

Validate a repo's AGENTS.md and CLAUDE.md (or a single agent instruction file) against the repo itself: backticked paths that do not exist, npm scripts named in the file that package.json does not define, and commands referenced that have no matching bin or script. Verdict VALID, DRIFT, or MISSING with file and line evidence.

Parameterspathrequired

Version history

1
  1. v0.1.0LatestOct 25, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts