codebase-audit-pattern

📁 chipagosfinest/claude-meta-learning 📅 7 days ago
1
总安装量
1
周安装量
#53979
全站排名
安装命令
npx skills add https://github.com/chipagosfinest/claude-meta-learning --skill codebase-audit-pattern

Agent 安装分布

replit 1
openclaw 1
opencode 1
codex 1
claude-code 1

Skill 文档

Codebase Audit Pattern

Problem

Understanding a complex codebase’s full architecture, finding gaps, and identifying enhancement opportunities requires analyzing multiple dimensions simultaneously: data models, API integrations, and feature implementations.

Context / Trigger Conditions

  • User asks to “audit” or “analyze” a codebase
  • Need to find unused tables, underutilized APIs, or redundant features
  • Preparing for major enhancements or refactoring
  • Onboarding to a new project and need comprehensive understanding

Solution

Launch 3 parallel Opus agents, each specialized for one dimension:

Agent 1: Data Architecture Audit

Explore the data architecture comprehensively:

1. Find all database schemas (check migrations, models, types)
2. Identify what data is being collected and stored
3. Map relationships between tables/collections
4. Find unused or underutilized tables

Create a summary of:
- All tables and their purposes
- Data flow (what features write to what tables)
- Gaps (tables that exist but aren't used)

Agent 2: API Integrations Audit

Explore external API integrations:

1. Search for all API calls, fetch requests, external services
2. Check environment config for all API keys
3. Map which features use which APIs
4. Identify APIs configured but underutilized

Focus on categorizing by domain:
- Financial APIs
- Search/Intelligence APIs
- Social APIs
- Infrastructure APIs

Agent 3: Feature/Skill Effectiveness Audit

Analyze feature implementations for effectiveness:

1. Check all feature directories for implementation depth
2. Look for minimal vs comprehensive implementations
3. Identify features that could be enhanced with better data
4. Find features that overlap or could be consolidated

Look specifically at core features and their data sources.

Synthesis

After all agents complete, synthesize findings into:

  1. Dead Infrastructure – Tables/APIs configured but unused
  2. Underutilized Resources – Partially implemented features
  3. Consolidation Opportunities – Redundant/overlapping features
  4. Enhancement Opportunities – Missing data sources or integrations
  5. Priority Roadmap – Phased implementation plan

Example Output Structure

# Enhancement Plan

## Part 1: Dead Infrastructure to Remove or Implement
- Unused tables: [list with recommendations]
- Unused APIs: [list with opportunities]

## Part 2: API Enhancements
- Currently underutilized: [table]
- APIs to add: [table]

## Part 3: Feature Consolidations
- Merge candidates: [list]
- Deprecation candidates: [list]

## Part 4: High-Value Data Gathering Enhancements
- Enhancement 1: [description + implementation]
- Enhancement 2: [description + implementation]

## Part 5: Implementation Priority
- Phase 1: Quick Wins
- Phase 2: High-Value Data
- Phase 3: New Capabilities

Verification

After audit:

  1. Dead infrastructure count matches actual codebase
  2. API coverage is comprehensive
  3. Feature overlap analysis makes sense
  4. Priority roadmap is actionable

Key Insights from ClawdBot Audit

  1. ~70% of skills were documentation-only – specifications without implementation
  2. 10 database tables had zero code references – dead infrastructure
  3. 5 APIs were configured but underutilized – missed opportunities
  4. 3 major feature clusters had significant overlap – consolidation opportunities
  5. Parallel agents completed in ~2 minutes – faster than sequential

Notes

  • Use Opus model for agents – better reasoning for architectural analysis
  • Run agents in parallel (run_in_background: true) for efficiency
  • Create output file (ENHANCEMENT_PLAN.md) for persistence
  • Commit the plan to track progress over time

References

  • Verified working on ClawdBot codebase (2026-01-19)
  • 77 skills, 40+ tables, 20+ APIs analyzed in single session