本文へ移動
cccskills
無料GitHub で公開

project-health-auditor

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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/

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit and organize AI coding-agent instructions, including AGENTS.md, CLAUDE.md, skills, and agent definitions. Use when the user asks to diagnose conflicting instructions, excessive approval pauses, broad skill triggers, duplicate guidance, or broken instruction references, or to clean up that instruction set. Ordinary code review, Markdown editing, or application debugging alone does not trigger this workflow. Inspection stays read-only; apply changes when authorized.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

Generate or update repository-specific AGENTS.md instruction files from real repo evidence. Use when asked to create, design, scaffold, split, or improve root or scoped AGENTS.md files for Codex/Claude/agent workflows, especially when a repo needs directory-specific rules, validation commands, generated-file boundaries, or a short agent onboarding router.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

REST/GraphQL/gRPC API design best practices. Use when designing APIs, defining contracts, handling versioning. Covers OpenAPI 3.2, GraphQL Federation, gRPC streaming.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring accessibility, or following platform guidelines. Covers Material Design 3, Human Interface Guidelines, color theory, typography, and 2025 trends.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

Design architecture foundations before implementation. Use when asked to design or refactor architecture, choose Rust/Go crate, package, module, runtime, workflow, or service boundaries, compare mature project architecture, prevent stacked one-off PRs, audit migration debt in existing repos, or produce a spec before coding.

日本語の概要は準備中です。原文の説明を表示しています。

majiayu000/spellbook2872026年10月8日 更新

majiayu000 のスキルをすべて見る

このスキルの問題を報告する