/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 routing |
Quick health score only (use /health:check) |
| Want machine-readable attribute JSON |
Human-readable report (use /attributes:dashboard) |
| Planning which agents to invoke |
Already know what needs fixing |
| Comparing health across repos |
Checking specific component only |
Parameters
| Parameter |
Description |
--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:
| Check |
Attribute ID |
Severity |
| README.md exists |
missing-readme |
high |
| README.md > 200 chars |
short-readme |
low |
| CLAUDE.md exists |
missing-claude-md |
medium |
| docs/ directory exists |
no-docs-directory |
low |
| LICENSE file exists |
missing-license |
low |
Score: Start at 0, add points per check (max 20).
Step 2: Testing Attributes
| Check |
Attribute ID |
Severity |
| tests/ or test/ directory exists |
no-test-directory |
high |
| Test config file exists (vitest, jest, pytest, etc.) |
no-test-config |
medium |
| CI workflow runs tests |
no-ci-tests |
high |
Test configs to look for: vitest.config.{ts,js}, jest.config.{js,ts}, pytest.ini, conftest.py, playwright.config.ts
Step 3: Security Attributes
| Check |
Attribute ID |
Severity |
| .gitignore exists |
missing-gitignore |
high |
| .env file NOT committed |
env-file-committed |
critical |
| Pre-commit hooks configured |
no-pre-commit-hooks |
medium |
| Security scanning in CI |
no-security-scanning |
high |
| Dependabot configured |
no-dependabot |
low |
Step 4: Code Quality Attributes
| Check |
Attribute ID |
Severity |
| Linter configured (eslint, biome, ruff) |
no-linter-configured |
medium |
| Formatter configured (prettier, biome, ruff) |
no-formatter |
medium |
| Type checking (tsconfig, pyright, mypy) |
no-type-checking |
low |
Step 5: CI/CD Attributes
| Check |
Attribute ID |
Severity |
| CI workflows exist |
no-ci-workflows |
high |
| Workflows dir has files |
empty-workflows-dir |
medium |
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
| Context |
Command |
| Full attribute collection |
/attributes:collect |
| Save to file |
/attributes:collect --output .claude/attributes.json |
| Specific categories |
/attributes:collect --categories security,tests |
| Check README exists |
test -f README.md && echo exists || echo missing |
| Check test dir |
test -d tests || test -d test && echo exists || echo missing |
| Count README chars |
wc -c < README.md 2>/dev/null || echo 0 |
1---
2name: attributes-collect
3description: Collect codebase health attributes as structured JSON. Use when assessing project health before routing to specialized agents via attributes-route.
4allowed-tools: Bash(test *), Bash(wc *), Read, Glob, Grep, TodoWrite
5args: "[--output <path>] [--categories <list>]"
6argument-hint: "[--output .claude/attributes.json]"
7created: 2026-03-15
8modified: 2026-03-15
9reviewed: 2026-03-15
10---
11
12# /attributes:collect
13
14Collect structured codebase health attributes with severity and remediation actions.
15
16## When to Use This Skill
17
18| Use this skill when... | Use another approach when... |
19|------------------------|------------------------------|
20| Need structured health assessment before routing | Quick health score only (use `/health:check`) |
21| Want machine-readable attribute JSON | Human-readable report (use `/attributes:dashboard`) |
22| Planning which agents to invoke | Already know what needs fixing |
23| Comparing health across repos | Checking specific component only |
24
25## Parameters
26
27| Parameter | Description |
28|-----------|-------------|
29| `--output <path>` | Write JSON to file (default: stdout) |
30| `--categories <list>` | Comma-separated categories to check: docs,tests,security,quality,ci |
31
32## Execution
33
34Perform these checks and output structured JSON.
35
36### Step 1: Documentation Attributes
37
38Check for these files and emit attributes:
39
40| Check | Attribute ID | Severity |
41|-------|-------------|----------|
42| README.md exists | `missing-readme` | high |
43| README.md > 200 chars | `short-readme` | low |
44| CLAUDE.md exists | `missing-claude-md` | medium |
45| docs/ directory exists | `no-docs-directory` | low |
46| LICENSE file exists | `missing-license` | low |
47
48Score: Start at 0, add points per check (max 20).
49
50### Step 2: Testing Attributes
51
52| Check | Attribute ID | Severity |
53|-------|-------------|----------|
54| tests/ or test/ directory exists | `no-test-directory` | high |
55| Test config file exists (vitest, jest, pytest, etc.) | `no-test-config` | medium |
56| CI workflow runs tests | `no-ci-tests` | high |
57
58Test configs to look for: `vitest.config.{ts,js}`, `jest.config.{js,ts}`, `pytest.ini`, `conftest.py`, `playwright.config.ts`
59
60### Step 3: Security Attributes
61
62| Check | Attribute ID | Severity |
63|-------|-------------|----------|
64| .gitignore exists | `missing-gitignore` | high |
65| .env file NOT committed | `env-file-committed` | critical |
66| Pre-commit hooks configured | `no-pre-commit-hooks` | medium |
67| Security scanning in CI | `no-security-scanning` | high |
68| Dependabot configured | `no-dependabot` | low |
69
70### Step 4: Code Quality Attributes
71
72| Check | Attribute ID | Severity |
73|-------|-------------|----------|
74| Linter configured (eslint, biome, ruff) | `no-linter-configured` | medium |
75| Formatter configured (prettier, biome, ruff) | `no-formatter` | medium |
76| Type checking (tsconfig, pyright, mypy) | `no-type-checking` | low |
77
78### Step 5: CI/CD Attributes
79
80| Check | Attribute ID | Severity |
81|-------|-------------|----------|
82| CI workflows exist | `no-ci-workflows` | high |
83| Workflows dir has files | `empty-workflows-dir` | medium |
84
85### Step 6: Output
86
87Output JSON matching this schema:
88
89```json
90{
91 "version": "1",
92 "repo": "<path>",
93 "timestamp": "<ISO 8601>",
94 "attributes": [
95 {
96 "id": "missing-readme",
97 "category": "docs",
98 "severity": "high",
99 "description": "Missing README.md",
100 "source": "attributes-collect",
101 "actions": [
102 {"type": "agent", "target": "docs", "args": "create README.md", "auto_fixable": true}
103 ]
104 }
105 ],
106 "scores": {
107 "overall": 72,
108 "grade": "C",
109 "max_score": 100,
110 "categories": {"docs": 15, "tests": 12, "security": 8, "quality": 17, "ci": 20}
111 }
112}
113```
114
115If `--output` is specified, write the JSON to that file.
116
117## Agentic Optimizations
118
119| Context | Command |
120|---------|---------|
121| Full attribute collection | `/attributes:collect` |
122| Save to file | `/attributes:collect --output .claude/attributes.json` |
123| Specific categories | `/attributes:collect --categories security,tests` |
124| Check README exists | `test -f README.md && echo exists \|\| echo missing` |
125| Check test dir | `test -d tests \|\| test -d test && echo exists \|\| echo missing` |
126| Count README chars | `wc -c < README.md 2>/dev/null \|\| echo 0` |