Agent skill
code-analysis
Deep code analysis with metrics, patterns, and recommendations. Use for architecture review, tech debt assessment, codebase exploration, or when asked 'analyze this code/project'.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/code-analysis-alexandrbasis-wythm-claude-workflo
SKILL.md
Deep Code Analysis
Overview
Perform comprehensive code analysis returning structured findings. Since this runs in a forked context, explore extensively - only the final report returns to the main conversation.
Analysis Process
1. Scope Discovery
# Understand project structure
find . -type f -name "*.ts" | head -50
cloc . --exclude-dir=node_modules,dist,coverage --json 2>/dev/null || wc -l **/*.ts
2. Architecture Analysis
- Identify layers and boundaries (DDD patterns for Wythm)
- Map module dependencies
- Find circular dependencies or violations
- Check adherence to project patterns (
backend/docs/project-structure.md)
3. Code Quality Metrics
- File sizes and complexity hotspots
- Test coverage gaps
- Code duplication patterns
- Naming consistency
4. Tech Debt Assessment
- TODO/FIXME comments
- Deprecated patterns
- Missing error handling
- Incomplete implementations
5. Git History Insights
# Most changed files (churn)
git log --format=format: --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -20
# Recent contributors
git shortlog -sn --since="3 months ago"
Output Format
Return a structured report:
# Code Analysis Report
**Scope**: [what was analyzed]
**Date**: [ISO date]
## Executive Summary
[2-3 sentence overview]
## Metrics
| Metric | Value |
|--------|-------|
| Total Files | X |
| Lines of Code | X |
| Test Coverage | X% |
| Tech Debt Items | X |
## Architecture Findings
### Strengths
- [finding]
### Concerns
- [finding with severity: HIGH/MEDIUM/LOW]
## Recommendations
1. [actionable recommendation]
2. [actionable recommendation]
## Detailed Findings
[expandable sections for each area]
Wythm-Specific Checks
For this project, also verify:
- DDD layer separation (domain → application → infrastructure)
- Prisma schema consistency
- NestJS module boundaries
- Service injection patterns
- Error handling with domain exceptions
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?