genesis-tools:codebase-analysis
Codebase Analysis
Perform deep codebase exploration and analysis in an isolated sub-agent context. Heavy Grep/Glob operations stay separate from your main work.
Built-in Analysis Types
| Type | What it finds |
|---|---|
dependencies |
Import/require graph, circular dependencies, unused imports |
dead-code |
Exported but never-imported functions, unreachable code paths |
api-surface |
Public exports, REST endpoints, RPC methods |
type-safety |
any types, type assertions, missing return types |
error-handling |
Uncaught promises, empty catch blocks, missing error boundaries |
test-coverage |
Files without corresponding test files, untested exports |
security |
Hardcoded secrets, unsanitized inputs, eval usage |
patterns |
Custom pattern matching (permissions, money, DTOs, etc.) |
Usage
/codebase-analysis --type=<type> [--output=summary|detailed]
Examples:
/codebase-analysis --type=type-safety # Find all `any` types and unsafe casts
/codebase-analysis --type=dead-code # Find unused exports
/codebase-analysis --type=error-handling # Audit error handling patterns
/codebase-analysis --type=patterns # Custom pattern (prompted interactively)
Tools Available in Fork Context
| Tool | Purpose |
|---|---|
tools mcp-tsc <file> |
TypeScript diagnostics per file via persistent LSP |
tools mcp-ripgrep |
Code search MCP server for structured queries |
tools collect-files-for-ai <dir> -c N |
Gather top N relevant files for analysis |
tools files-to-prompt <dir> --cxml |
Generate structured context XML |
How It Works
- Launches isolated agent -- intensive searching runs in parallel
- Performs extensive Grep/Glob without blocking main session
- Analyzes patterns and cross-references findings
- Returns structured report to main session
- You continue working while analysis runs
Report Format
## [Analysis Type] Report
**Scanned:** N files | **Findings:** N issues | **Severity:** High/Medium/Low
### Finding 1: [description]
- **File:** `src/utils/format.ts:L45`
- **Issue:** [what's wrong]
- **Suggestion:** [how to fix]
### Summary
| Severity | Count |
|----------|-------|
| High | N |
| Medium | N |
| Low | N |
More from genesiscz/genesistools
genesis-tools:github
|
18gt:analyze-har
|
2gt:claude-history
Find or reference a past Claude Code conversation — fixes, decisions, or discussions from earlier sessions ("you helped me fix", "we debugged", "I remember asking"). Locate sessions by topic, file, or date. Not for codebase/git/Slack history.
2gt:github
|
1debugging-master
|
1gt:git-rebaser
Guided git rebase cascade for branch hierarchies. Use when rebasing a parent feature branch onto master/main and then updating child branches. Triggers on "rebase branches", "cascade rebase", "rebase onto master", "update child branches after rebase", "rebase feature branch hierarchy", "git rebaser". Handles reflog lookup, --onto mechanics, commit reporting, and user confirmation before any destructive action.
1