@codacy/tools-agentlinter-0
v0.1.4
Published
Agentlinter tool adapter for Codacy analysis
Readme
@codacy/tools-agentlinter-0
Table of Contents
Overview
Agentlinter is "ESLint for AI Agents" — a static analysis tool that scores, diagnoses, and auto-fixes AI agent configuration files (CLAUDE.md, AGENTS.md, SOUL.md, etc.). It checks for vague instructions, security issues, structural problems, inconsistencies, and more across 102+ rules.
| Property | Value |
| ------------- | ---------------------------------------------------------------------------------------------- |
| Tool ID | Agentlinter |
| Codacy UUID | 498c9a6e-5ff8-45de-9bd3-0fef69370617 |
| Strategy | CLI (npm-bundled Node.js tool) |
| Languages | Markdown |
| File patterns | **/CLAUDE.md, **/AGENTS.md, **/SOUL.md, **/USER.md, **/TOOLS.md, **/skills/**/*.md |
Updating patterns
# Re-fetch pattern metadata from the Codacy API
pnpm prefetch
# Commit the result
git add src/patterns.jsonUpdating the Agentlinter version
- Update
agentlinterversion inpackage.json - Update
preferredVersioninsrc/adapter.ts - Run
pnpm installto fetch the new version - Run
pnpm prefetchto check for new/removed rules - Run
pnpm testto verify compatibility - If the major version changes, create a new adapter package (
agentlinter-1/)
Development
pnpm build # Build with tsup
pnpm test # Run tests
pnpm prefetch # Re-fetch patterns from Codacy APITo install agentlinter locally for manual testing:
npm install agentlinterNotes for maintainers
- Workspace-level execution: Agentlinter operates on the entire workspace
directory, not individual files. The adapter passes
ctx.repositoryRootto the tool and filters output byctx.targetFilespost-hoc. - Workspace diagnostics: Some diagnostics have
file = "(workspace)"instead of a real file path. These are attached to the first agent file found in the target list (e.g. CLAUDE.md). If no agent file is in targets, they are skipped. - Non-zero exit code: Agentlinter exits non-zero when diagnostics are found (similar to ESLint). The adapter captures stdout from the error and parses it normally — only a non-zero exit with empty stdout is treated as an error.
- No config files: Agentlinter has no native configuration files. All rule filtering is done post-hoc via enabled patterns in the Codacy config.
- Rule ID mapping: Rule IDs use
/as separator (e.g.clarity/no-vague-instructions). The adapter converts/to_and prefixes with the tool ID to build Codacy pattern IDs (e.g.Agentlinter_clarity_no-vague-instructions).
