code-flow-visualizer
Skill by brycewang-stanford
Converts Python, JavaScript and TypeScript functions into Mermaid flowcharts by analyzing their control flow. Intended for researchers who need to document algorithmic logic, data pipelines and experimental workflows in code.
Install code-flow-visualizer
Built from the published package, never by AI.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.claude/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/43-wentorai-research-plugins/skills/tools/diagram/code-flow-visualizer ~/.claude/skills/code-flow-visualizerRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills /tmp/Auto-Empirical-Research-Skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Auto-Empirical-Research-Skills/skills/43-wentorai-research-plugins/skills/tools/diagram/code-flow-visualizer ~/.gemini/antigravity-cli/skills/code-flow-visualizerAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install code-flow-visualizer in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Code Flow Visualizer converts Python, JavaScript and TypeScript functions into Mermaid flowcharts. It parses control flow structures such as if/else, for and while loops, try/catch, match/switch and return statements. Each structure maps to a flowchart pattern: conditionals become decision diamonds, loops get back-edges, function calls become subroutine nodes and returns become terminal nodes.
The skill performs a lightweight static analysis of the code's abstract syntax tree. Output can be styled for academic papers and exported to PDF with the Mermaid CLI for LaTeX inclusion. The source describes it as aimed at researchers who need to document algorithmic logic, data processing pipelines and experimental workflows. It works best on functions under 100 lines.
Written from the project's SKILL.md and checked against it.
What it can do
- Control flow mappingMaps if/else, loops, try/catch, match/switch and returns to Mermaid flowchart nodes.
- Python supportConverts Python functions into flowcharts, with a worked example in the source.
- JavaScript and TypeScript supportConverts JavaScript and TypeScript functions, including async and await code.
- Nested conditional flatteningTurns deeply nested if/else chains into a labeled decision tree.
- Recursive and generator displayShows recursive calls with a self-edge and Python yield points as output nodes.
- Error handling pathsDraws try/catch errors as parallel paths and finally blocks as converging nodes.
- Academic paper stylingProvides a Mermaid theme configuration for a paper-friendly look.
- LaTeX PDF exportDescribes exporting diagrams to PDF with the Mermaid CLI for LaTeX figures.
What you need
- Mermaid CLI (mmdc) for PDF export
Try asking
- Convert this Python function into a Mermaid flowchart
- Draw a flowchart for this TypeScript async search function
- Export the flowchart to a PDF for my LaTeX paper
Good to know
- Works best for functions under 100 lines.
- Cannot trace dynamic method dispatch or callback chains.
- Async and Promise.all branches are not fully modeled.
- Trivial assignments and logging are usually omitted.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/43-wentorai-research-plugins/skills/tools/diagram/code-flow-visualizer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to code-flow-visualizer
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
code-flow-visualizer: common questions
Which languages does Code Flow Visualizer support?
The source says it converts Python, JavaScript and TypeScript functions into Mermaid flowcharts.
How does it build the flowchart?
It performs a lightweight static analysis of the code's abstract syntax tree and maps each control structure to a flowchart node or pattern.
Can it diagram a whole large codebase?
The source says it works best on functions under 100 lines, and recommends visualizing individual functions or key subroutines for larger code.
How do I install code-flow-visualizer?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is code-flow-visualizer free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is code-flow-visualizer safe to use?
It scores 77 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to code-flow-visualizer?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
