v0.2.0 — now on npm

Your AGENTS.md
is probably lying.

Detect stale paths, dead npm scripts, outdated framework patterns, and context rot before they make your coding agents expensive and wrong.

~ my-project
$ npx agents-lint

agents-lint v0.2.0
────────────────────────────────────────────────────────────
Found 2 context files: AGENTS.md, CLAUDE.md

File: AGENTS.md  ·  92/100 (A)
  ✓ No issues

File: CLAUDE.md  ·  78/100 (C)
   No testing section found
    → Add a "Testing" section with the exact test command.

Cross-File Consistency (1 issue)
   Conflicting test commands
    AGENTS.md → npm run test
    CLAUDE.md → npm run test:unit
    → Align test commands across all context files.

────────────────────────────────────────────────────────────
Overall: 85/100  1 error  1 warning  0 info

Context rot is a real cost.

Two peer-reviewed studies in 2026 quantified what many teams had experienced: stale AGENTS.md files make your agents worse and more expensive.

"LLM-generated context files reduced task success by 2–3% while increasing cost by over 20%."

— ETH Zurich, ICSE 2026

"None of the major coding agents expose lifecycle hooks for keeping context files accurate. That's a tooling gap waiting to be filled."

— Addy Osmani, Google Chrome, Feb 2026

Six categories of rot.

Each checker is independent. Run all of them in seconds, no dependencies needed.

📁
Filesystem

Every path mentioned in your AGENTS.md is verified to exist on disk. Catches renamed directories, deleted packages, restructured monorepos.

⚙️
npm Scripts

Validates that every npm run <script> mentioned exists in package.json. Supports workspaces and monorepos automatically.

📦
Dependencies

Detects references to packages not in package.json, and flags deprecated packages like moment, request, tslint.

🏗️
Framework Staleness

Catches outdated patterns: NgModules in Angular 14+, ReactDOM.render() in React 19, getInitialProps in Next.js App Router, CommonJS in ESM projects.

📋
Structure

Checks for recommended sections (Setup, Testing, Build), context bloat, unresolved TODOs, and outdated year references.

🔀
Cross-File Consistency

When multiple context files exist (AGENTS.md + CLAUDE.md, etc.), flags conflicts: different test commands, package managers, or paths documented in one file but not the other.

🏆
Freshness Score

Every run produces a 0–100 score with a letter grade. Errors cost 15 pts, warnings 7, infos 2. Set thresholds in CI.


Know your grade.

Set a minimum score in CI. Fail the build before agents start producing costly wrong answers.

Score Grade Meaning
90–100AFresh and accurate — ready for agents
80–89BMinor issues, still reliable
70–79CSome stale references, review recommended
50–69DSignificant context rot
0–49FAgents may produce incorrect or costly outputs

Zero config. Three commands.

No install required. Works with any repo that has a context file.

🚀
Generate a starter file
$ npx agents-lint init
Created AGENTS.md
Fill in the TODO sections,
then run agents-lint to validate.

Detects your stack (React, Next.js, Vue…), test runner, and package manager. Pre-populates sections from package.json.

🔍
Lint all context files
$ npx agents-lint
Auto-detects AGENTS.md,
CLAUDE.md, GEMINI.md,
.cursorrules, and more.

Lints each file independently, then cross-checks for conflicts between them. Pass a path to lint a specific file.

🛠️
Interactive fix mode
$ npx agents-lint --fix
Remove stale path on :23?
[y/n] y
Line removed.

Walk through each issue and accept or skip the suggested fix. Changes are applied atomically — all at once or not at all.


Automate it. Set and forget.

The weekly schedule is intentional — context rot happens even when AGENTS.md hasn't changed.

# .github/workflows/agents-lint.yml
name: agents-lint
on:
  push:
    paths: ['AGENTS.md', 'package.json']
  schedule:
    - cron: '0 9 * * 1' # Weekly Monday

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx agents-lint --max-warnings 5