Skip to content

Add ctxlint - CLI linter for AI agent context files #1394

Description

@vamshidhar199

Display Name

Ctxlint

Category

Tooling

Sub-Category

General

Primary Link

https://github.com/vamshidhar199/Ctxlint

Author Name

Vamshidhar Parupally

Author Link

https://github.com/vamshidhar199

License

MIT

Other License

No response

Description

CLI linter for AI agent context files (AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, .mcp.json and more). Catches stale file refs, dead build commands, hardcoded secrets, directory trees, and token waste. Five commands: check, mcp, init, slim (auto-fix), diff (drift detection). SARIF output, watch mode, .ctxlintrc config. 1 runtime dependency. Validated at ~91% precision on real-world repos.

Validate Claims

Clone any repo with an AGENTS.md or CLAUDE.md, then run:
npx @ctxlint/ctxlint check
Reports stale references, inferable content, and a token budget breakdown in milliseconds. No configuration needed. To verify MCP config linting, run:
npx @ctxlint/ctxlint mcp
To verify stale-file-ref detection specifically, add a line referencing a non-existent file to any context file and re-run check.

Specific Task(s)

Run ctxlint against the awesome-claude-code repo itself:

npx @ctxlint/ctxlint check .
npx @ctxlint/ctxlint mcp .

Specific Prompt(s)

npx @ctxlint/ctxlint check .

Additional Comments

  • 1 runtime dependency (commander only) — no chalk, glob, yaml, or bloat
  • 118 passing tests
  • SARIF output integrates directly with GitHub Code Scanning
  • .ctxlintrc supports per-project rule whitelists, custom context file names, and token thresholds
  • --watch mode re-lints on save with 300ms debounce (no new deps — uses Node's built-in fs.watch)

Recommendation Checklist

  • I have checked that this resource hasn't already been submitted
  • It has been over one week since the first public commit to the repo I am recommending
  • All provided links are working and publicly accessible
  • I do NOT have any other open issues in this repository
  • I am primarily composed of human-y stuff and not electrical circuits

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions