agentsclimarketplace

Project health auditor

Skill majiayu000/spellbook/skills/project-health-auditor

Comprehensive codebase health analysis. Use when reviewing code quality, identifying technical debt, checking dependencies, or assessing project structure.From its SKILL.md

Install
npx -y skills add majiayu000/spellbook --skill project-health-auditor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

6.7 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Project Health Auditor

Inspired by claude-code-plugins-plus

Purpose

Analyze codebase health across multiple dimensions: code quality, dependencies, security, testing, documentation, and architecture.

Audit Categories

1. Code Quality

Complexity Analysis

# Count lines per file (identify large files)
find src -name "*.ts" -o -name "*.js" | xargs wc -l | sort -n

# Find long functions (over 50 lines)
# Check for deeply nested code
# Identify duplicate code patterns

Code Smells

SmellIndicatorAction
Long files>500 linesSplit into modules
Long functions>50 linesExtract methods
Deep nesting>4 levelsFlatten logic
Many parameters>5 paramsUse objects
Duplicate codeSimilar blocksExtract shared
Dead codeUnused exportsRemove
Magic numbersHardcoded valuesUse constants

Checklist

## Code Quality Audit
- [ ] No files over 500 lines
- [ ] No functions over 50 lines
- [ ] No nesting deeper than 4 levels
- [ ] No functions with >5 parameters
- [ ] No obvious code duplication
- [ ] No dead/unused code
- [ ] Consistent naming conventions
- [ ] Proper error handling

2. Dependencies

Dependency Health

# Check outdated packages (npm)
npm outdated

# Check for vulnerabilities
npm audit

# Analyze bundle size
npx webpack-bundle-analyzer

# Check unused dependencies
npx depcheck

Evaluation Criteria

MetricHealthyWarningCritical
Outdated (major)01-3>3
Outdated (minor)<55-10>10
Vulnerabilities0Low/MedHigh/Crit
Unused deps01-3>3
Bundle size<500KB500KB-1MB>1MB

Checklist

## Dependencies Audit
- [ ] No critical vulnerabilities
- [ ] No high vulnerabilities
- [ ] <3 major version updates pending
- [ ] No unused dependencies
- [ ] Lock file in sync
- [ ] Bundle size reasonable

3. Security

Security Checks

# Check for secrets in code
grep -r "password\|secret\|api_key\|token" --include="*.ts" --include="*.js"

# Check for hardcoded credentials
grep -r "Bearer \|Basic " --include="*.ts"

# Check .env is gitignored
cat .gitignore | grep ".env"

Security Audit Points

CheckConcernSolution
Secrets in codeCredential exposureUse env vars
.env committedSecret leakAdd to .gitignore
SQL stringsSQL injectionUse parameterized queries
User input in HTMLXSSSanitize/escape
Outdated depsKnown vulnsUpdate regularly
No rate limitingDoSAdd rate limits
No input validationInjectionValidate all inputs

Checklist

## Security Audit
- [ ] No hardcoded secrets
- [ ] .env files gitignored
- [ ] Dependencies scanned for vulns
- [ ] Input validation in place
- [ ] Output encoding for XSS
- [ ] SQL injection prevention
- [ ] Authentication implemented
- [ ] Authorization checks exist

4. Testing

Test Coverage Analysis

# Run tests with coverage (npm/jest)
npm test -- --coverage

# Run tests with coverage (pytest)
pytest --cov=src --cov-report=html

Coverage Standards

MetricGoodAcceptablePoor
Line coverage>80%60-80%<60%
Branch coverage>70%50-70%<50%
Function coverage>80%60-80%<60%

Checklist

## Testing Audit
- [ ] Unit tests exist
- [ ] Integration tests exist
- [ ] Line coverage >60%
- [ ] Critical paths tested
- [ ] Edge cases covered
- [ ] Tests run in CI
- [ ] Test execution <5 min
- [ ] No flaky tests

5. Documentation

Documentation Inventory

# Check for README
ls README.md

# Check for API docs
ls docs/ || ls documentation/

# Check for inline docs (JSDoc, docstrings)
grep -r "@param\|@returns\|Args:\|Returns:" src/

Documentation Standards

Doc TypePurposeRequired
README.mdProject overviewAlways
CONTRIBUTING.mdContribution guideOpen source
API docsEndpoint referenceAPIs
Code commentsComplex logicAs needed
Architecture docsSystem designLarge projects
CHANGELOG.mdVersion historyLibraries

Checklist

## Documentation Audit
- [ ] README exists and current
- [ ] Installation instructions
- [ ] Usage examples
- [ ] API documentation
- [ ] Contributing guide
- [ ] License specified
- [ ] Complex code documented

6. Architecture

Architecture Review

AspectCheckConcern
CouplingImport chainsTight coupling
CohesionModule sizeGod modules
LayersDirectory structureLayer violations
DependenciesPackage.jsonCircular deps
ConfigHardcoded valuesEnvironment issues

Common Issues

## Architecture Smells
- Circular dependencies
- God classes/modules
- Feature envy (cross-module reaching)
- Shotgun surgery (changes touch many files)
- Inappropriate intimacy (modules know too much)

Checklist

## Architecture Audit
- [ ] Clear module boundaries
- [ ] No circular dependencies
- [ ] Proper layer separation
- [ ] Configuration externalized
- [ ] Environment-specific settings
- [ ] Scalability considered
- [ ] Single responsibility

Health Report Template

# Project Health Report

**Project:** [Name]
**Date:** [Date]
**Auditor:** Claude

## Summary

| Category | Score | Status |
|----------|-------|--------|
| Code Quality | X/10 | 🟒/🟑/πŸ”΄ |
| Dependencies | X/10 | 🟒/🟑/πŸ”΄ |
| Security | X/10 | 🟒/🟑/πŸ”΄ |
| Testing | X/10 | 🟒/🟑/πŸ”΄ |
| Documentation | X/10 | 🟒/🟑/πŸ”΄ |
| Architecture | X/10 | 🟒/🟑/πŸ”΄ |
| **Overall** | **X/10** | **Status** |

## Critical Issues (Fix Immediately)
1. [Issue description]
2. [Issue description]

## High Priority (Fix Soon)
1. [Issue description]
2. [Issue description]

## Recommendations
1. [Recommendation]
2. [Recommendation]

## Technical Debt
- [Debt item with estimated effort]
- [Debt item with estimated effort]

Quick Commands

# Full audit script
echo "=== Code Stats ===" && cloc src/
echo "=== Dependencies ===" && npm outdated
echo "=== Security ===" && npm audit
echo "=== Test Coverage ===" && npm test -- --coverage
echo "=== TODO/FIXME ===" && grep -r "TODO\|FIXME" src/

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.