codebase-analyzer-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +31 -0
- package/.claude-plugin/plugin.json +29 -0
- package/AGENTS.md +112 -0
- package/CLAUDE.md +150 -0
- package/LICENSE +21 -0
- package/README.md +252 -0
- package/agents/analysis/architecture-analyzer.md +115 -0
- package/agents/analysis/dataflow-tracer.md +120 -0
- package/agents/analysis/pattern-detective.md +110 -0
- package/agents/research/codebase-explorer.md +106 -0
- package/commands/analyze.md +74 -0
- package/commands/compare.md +66 -0
- package/commands/explore.md +64 -0
- package/commands/patterns.md +75 -0
- package/commands/trace.md +65 -0
- package/dist/cli/index.js +73758 -0
- package/dist/mcp/server.js +70931 -0
- package/package.json +75 -0
- package/skills/add-mcp-tool/SKILL.md +209 -0
- package/skills/codebase-analysis/SKILL.md +128 -0
- package/skills/codebase-analysis/references/api-reference.md +201 -0
- package/skills/debugging-analysis/SKILL.md +213 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: patterns
|
|
3
|
+
description: Detect design and architecture patterns in a codebase
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Find Patterns
|
|
8
|
+
|
|
9
|
+
Detect design patterns, architectural patterns, and anti-patterns in a codebase.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/patterns [source] [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Arguments:**
|
|
18
|
+
- `source` - Local path or GitHub URL (default: current directory)
|
|
19
|
+
|
|
20
|
+
**Options:**
|
|
21
|
+
- `--types <patterns>` - Specific patterns to look for
|
|
22
|
+
- `--anti` - Focus on anti-patterns
|
|
23
|
+
|
|
24
|
+
## Available Patterns
|
|
25
|
+
|
|
26
|
+
**Design Patterns:**
|
|
27
|
+
- singleton, factory, observer, strategy, decorator
|
|
28
|
+
- adapter, facade, repository, dependency-injection
|
|
29
|
+
|
|
30
|
+
**Architectural Patterns:**
|
|
31
|
+
- event-driven, pub-sub, middleware, mvc, mvvm
|
|
32
|
+
- clean-architecture, hexagonal, cqrs, saga
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Find all patterns in current directory
|
|
38
|
+
/patterns
|
|
39
|
+
|
|
40
|
+
# Look for specific patterns
|
|
41
|
+
/patterns --types singleton,factory,repository
|
|
42
|
+
|
|
43
|
+
# Find anti-patterns
|
|
44
|
+
/patterns --anti
|
|
45
|
+
|
|
46
|
+
# Analyze GitHub repo
|
|
47
|
+
/patterns https://github.com/user/repo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Workflow
|
|
51
|
+
|
|
52
|
+
1. **Parse arguments** from user input
|
|
53
|
+
2. **Run detection** using pattern-detective agent
|
|
54
|
+
3. **Present findings** with confidence levels
|
|
55
|
+
4. **Map locations** for each pattern
|
|
56
|
+
|
|
57
|
+
## Implementation
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
const source = args.source || ".";
|
|
61
|
+
const types = args.types?.split(",");
|
|
62
|
+
const antiPatterns = args.anti || false;
|
|
63
|
+
|
|
64
|
+
Task("pattern-detective", {
|
|
65
|
+
prompt: `Find ${antiPatterns ? "anti-patterns" : "patterns"} in ${source}${types ? ` focusing on ${types.join(", ")}` : ""}`
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Output
|
|
70
|
+
|
|
71
|
+
Returns pattern analysis with:
|
|
72
|
+
- Detected patterns with confidence scores
|
|
73
|
+
- File locations for each pattern
|
|
74
|
+
- Anti-pattern warnings
|
|
75
|
+
- Recommendations for improvement
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trace
|
|
3
|
+
description: Trace data flow through a codebase
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trace Dataflow
|
|
8
|
+
|
|
9
|
+
Trace how data flows from an entry point through the system.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/trace <from> [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Arguments:**
|
|
18
|
+
- `from` - Entry point (function name, file, or description)
|
|
19
|
+
|
|
20
|
+
**Options:**
|
|
21
|
+
- `--to <destination>` - Trace to specific destination
|
|
22
|
+
- `--source <path>` - Repository path (default: current directory)
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Trace from user login
|
|
28
|
+
/trace "user login"
|
|
29
|
+
|
|
30
|
+
# Trace from specific function to database
|
|
31
|
+
/trace processPayment --to database
|
|
32
|
+
|
|
33
|
+
# Trace API endpoint
|
|
34
|
+
/trace "POST /api/users"
|
|
35
|
+
|
|
36
|
+
# Trace in specific repo
|
|
37
|
+
/trace checkout --source ./ecommerce-app
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
1. **Identify entry point** from user input
|
|
43
|
+
2. **Run trace** using dataflow-tracer agent
|
|
44
|
+
3. **Map transformations** at each step
|
|
45
|
+
4. **Identify risks** and security concerns
|
|
46
|
+
|
|
47
|
+
## Implementation
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
const from = args.from;
|
|
51
|
+
const to = args.to;
|
|
52
|
+
const source = args.source || ".";
|
|
53
|
+
|
|
54
|
+
Task("dataflow-tracer", {
|
|
55
|
+
prompt: `Trace data flow from "${from}"${to ? ` to "${to}"` : ""} in ${source}`
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
Returns dataflow analysis with:
|
|
62
|
+
- Step-by-step trace through the system
|
|
63
|
+
- Data transformations at each point
|
|
64
|
+
- Security observations
|
|
65
|
+
- Trust boundary crossings
|