Automatically generate and maintain visual code flow diagrams. This skill analyzes Python module structure, detects import relationships, and generates mermaid diagrams. It also monitors for staleness when code changes but diagrams don't.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncode-visualizerExecute the skills CLI command in your project's root directory to begin installation:
Fetches code-visualizer from rysweet/amplihack and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate code-visualizer. Access via /code-visualizer in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
44
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
44
stars
Automatically generate and maintain visual code flow diagrams. This skill analyzes Python module structure, detects import relationships, and generates mermaid diagrams. It also monitors for staleness when code changes but diagrams don't.
This skill embodies amplihack's core philosophy:
code-visualizer (this skill)
├── Responsibilities:
│ ├── Python module analysis (AST parsing)
│ ├── Import relationship extraction
│ ├── Staleness detection (timestamp-based)
│ └── Orchestration of diagram generation
│
└── Delegates to:
├── mermaid-diagram-generator skill
│ ├── Mermaid syntax generation
│ ├── Diagram formatting and styling
│ └── Markdown embedding
│
└── visualization-architect agent
├── Complex multi-level architecture
├── ASCII art alternatives
└── Cross-module dependency graphs
Invocation Pattern:
# code-visualizer analyzes code structure
modules = analyze_python_modules("src/")
relationships = extract_import_relationships(modules)
# Then delegates to mermaid-diagram-generator for syntax
Skill(skill="mermaid-diagram-generator")
# Provide: Module relationships, diagram type (flowchart/class), styling preferences
# Receive: Valid mermaid syntax ready for embedding
# For complex architectures, delegates to visualization-architect
Task(subagent_type="visualization-architect", prompt="Create multi-level diagram for...")
User: Generate a code flow diagram for the authentication module
User: Are my architecture diagrams up to date?
User: What architecture changes does this PR introduce?
Analyzes Python files to extract:
__all__)Creates mermaid diagrams showing:
Compares:
# Scan target directory for Python modules
modules = glob("**/*.py")
packages = identify_packages(modules)
For each module:
flowchart TD
subgraph core["Core Modules"]
auth[auth.py]
users[users.py]
api[api.py]
end
subgraph utils["Utilities"]
helpers[helpers.py]
validators[validators.py]
end
api --> auth
api --> users
auth --> helpers
users --> validators
Compare diagram timestamps with source files:
Best for: Showing import relationships between files
flowchart LR
main[main.py] --> auth[auth/]
main --> api[api/]
auth --> models[models.py]
api --> auth
Best for: Showing inheritance and composition
classDiagram
class BaseService {
+process()
}
class AuthService {
+login()
+logout()
}
BaseService <|-- AuthService
Best for: Showing how data moves through system
flowchart TD
Request[HTTP Request] --> Validate{Validate}
Validate -->|Valid| Process[Process]
Validate -->|Invalid| Error[Return Error]
Process --> Response[HTTP Response]
## Diagram Freshness Report
### Status: STALE
**Diagrams Checked**: 3
**Fresh**: 1
**Stale**: 2
### Details
| File | Last Updated | Code Changed | Status |
| ------------ | ------------ | ------------ | ------ |
| README.md | 2025-01-01 | 2025-01-15 | STALE |
| docs/ARCH.md | 2025-01-10 | 2025-01-10 | FRESH |
### Missing from Diagrams
- `new_module.py` (added 2025-01-12)
- `api/v2.py` (added 2025-01-14)
### Recommended Actions
1. Update README.md architecture diagram
2. Add new_module.py to dependency graph
For a given PR or set of changes:
flowchart TD
subgraph added["New"]
style added fill:#90EE90
new_api[api/v2.py]
end
subgraph modified["Modified"]
style modified fill:#FFE4B5
auth[auth.py]
end
subgraph existing["Unchanged"]
users[users.py]
models[models.py]
end
new_api --> auth
auth --> models
users --> models
This skill uses mermaid-diagram-generator for:
Delegates to visualization-architect for:
User: I just created a new payment module. Generate an architecture diagram.
Claude:
1. Analyzes payment/ directory
2. Extracts imports and dependencies
3. Generates mermaid flowchart
4. Suggests where to embed (README.md)
User: Are my diagrams up to date?
Claude:
1. Finds all mermaid diagrams in docs
2. Compares with current codebase
3. Reports stale diagrams
4. Lists missing modules
5. Suggests updates
User: Show architecture impact of this PR
Claude:
1. Gets changed files from PR
2. Identifies new/modified/deleted modules
3. Generates impact diagram
4. Highlights dependency changes
# Extract imports from Python file
import ast
def extract_imports(file_path):
"""Extract import statements from Python file."""
tree = ast.parse(Path(file_path).read_text())
imports = []
for node in ast.walk(tree):
if isinstance(node, ast.Import):
for alias in node.names:
imports.append(alias.name)
elif isinstance(node, ast.ImportFrom):
iMake data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
asyrafhussin/agent-skills
shadcn/improve
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
Solid pick for teams standardizing on skills: code-visualizer is focused, and the summary matches what you get after install.
code-visualizer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in code-visualizer — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added code-visualizer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
code-visualizer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
code-visualizer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend code-visualizer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
code-visualizer reduced setup friction for our internal harness; good balance of opinion and flexibility.
code-visualizer has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: code-visualizer is focused, and the summary matches what you get after install.
showing 1-10 of 61