New advertisers: 50% off your first month with code FIRSTMONTHSee slots
laurigates avatar

codebase-attributes-plugin

Structured codebase health attributes that route findings to specialized agents by severity.

version
1.3.4
GitHub stars
60
View on GitHub

What it does

  • Adds /attributes:collect, /attributes:route, and /attributes:dashboard for scanning health signals and acting on them
  • Collects findings for docs, tests, security, quality, and CI into JSON with severity and remediation actions
  • Routes each attribute to security-audit, test, docs, or refactor agents, prioritized from critical down to info
  • Injects a one-line SessionStart cue, at most once per session, naming the top severity and category when .claude/attributes.json exists

Structured codebase health attributes with severity-based agent routing and dashboard

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install codebase-attributes-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

/attributes:collect

Collect structured codebase health attributes with severity and remediation actions.

When to Use This Skill

Use this skill when...Use another approach when...
Need structured health assessment before routingQuick health score only (use /health:check)
Want machine-readable attribute JSONHuman-readable report (use /attributes:dashboard)
Planning which agents to invokeAlready know what needs fixing
Comparing health across reposChecking specific component only

Parameters

ParameterDescription
--output <path>Write JSON to file (default: stdout)
--categories <list>Comma-separated categories to check: docs,tests,security,quality,ci

Execution

Perform these checks and output structured JSON.

Step 1: Documentation Attributes

Check for these files and emit attributes:

CheckAttribute IDSeverity
README.md existsmissing-readmehigh
README.md > 200 charsshort-readmelow
CLAUDE.md existsmissing-claude-mdmedium
docs/ directory existsno-docs-directorylow
LICENSE file existsmissing-licenselow

Score: Start at 0, add points per check (max 20).

Step 2: Testing Attributes

CheckAttribute IDSeverity
tests/ or test/ directory existsno-test-directoryhigh
Test config file exists (vitest, jest, pytest, etc.)no-test-configmedium
CI workflow runs testsno-ci-testshigh

Test configs to look for: vitest.config.{ts,js}, jest.config.{js,ts}, pytest.ini, conftest.py, playwright.config.ts

Step 3: Security Attributes

CheckAttribute IDSeverity
.gitignore existsmissing-gitignorehigh
.env file NOT committedenv-file-committedcritical
Pre-commit hooks configuredno-pre-commit-hooksmedium
Security scanning in CIno-security-scanninghigh
Dependabot configuredno-dependabotlow

Step 4: Code Quality Attributes

CheckAttribute IDSeverity
Linter configured (eslint, biome, ruff)no-linter-configuredmedium
Formatter configured (prettier, biome, ruff)no-formattermedium
Type checking (tsconfig, pyright, mypy)no-type-checkinglow

Step 5: CI/CD Attributes

CheckAttribute IDSeverity
CI workflows existno-ci-workflowshigh
Workflows dir has filesempty-workflows-dirmedium

Step 6: Output

Output JSON matching this schema:

{
  "version": "1",
  "repo": "<path>",
  "timestamp": "<ISO 8601>",
  "attributes": [
    {
      "id": "missing-readme",
      "category": "docs",
      "severity": "high",
      "description": "Missing README.md",
      "source": "attributes-collect",
      "actions": [
        {"type": "agent", "target": "docs", "args": "create README.md", "auto_fixable": true}
      ]
    }
  ],
  "scores": {
    "overall": 72,
    "grade": "C",
    "max_score": 100,
    "categories": {"docs": 15, "tests": 12, "security": 8, "quality": 17, "ci": 20}
  }
}

If --output is specified, write the JSON to that file.

Agentic Optimizations

ContextCommand
Full attribute collection/attributes:collect
Save to file/attributes:collect --output .claude/attributes.json
Specific categories/attributes:collect --categories security,tests
Check README existstest -f README.md && echo exists || echo missing
Check test dirtest -d tests || test -d test && echo exists || echo missing
Count README charswc -c < README.md 2>/dev/null || echo 0

Readme

codebase-attributes-plugin

Structured codebase health attributes with severity-based agent routing.

Flow

See docs/flow.md for a diagram of how the skills fit together.

SessionStart Cue

When .claude/attributes.json exists in a repo, the plugin injects a one-line additionalContext cue at session startup/resume offering to run /attributes:route or /attributes:dashboard. The cue fires at most once per session and names the highest severity and category found. It never blocks — it is purely informational.

Skills

SkillDescription
/attributes:collectCollect codebase health attributes as structured JSON
/attributes:routeRoute to specialized agents based on attribute severity
/attributes:dashboardCompact text-based health dashboard with findings

How It Works

  1. Collect — /attributes:collect scans the codebase for health signals (README, tests, linter, CI, security) and emits structured JSON with severity and remediation actions
  2. Route — /attributes:route reads the attributes and delegates to the right agents (security-audit, test, docs, etc.) based on priority
  3. Dashboard — /attributes:dashboard renders a compact terminal-style health overview

Attribute Schema

Each attribute contains:

FieldTypeDescription
idstringKebab-case identifier (e.g., missing-readme)
categorystringdocs, tests, security, quality, ci
severitystringcritical, high, medium, low, info
descriptionstringHuman-readable finding
sourcestringCollector that produced this attribute
actionsarrayRemediation actions with agent targets

Integration

Works with the git-repo-agent Python tool (which produces the same JSON schema) and the agents-plugin router agents.

Details

Marketplace
laurigates/claude-plugins
Source
codebase-attributes-plugin
Author
Lauri Gates
Category
Quality
License
MIT
Keywords
attributes, health, routing, agents, diagnostics, dashboard
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to codebase-attributes-plugin

More Code Review & Quality