Skill

From diegopacheco/ai-playground · View interactive version

Skill is an AI agent skill from the GitHub repository diegopacheco/ai-playground. Build a function call-graph flamegraph website for a Java codebase. Parses the sources, extracts every method and the calls between them, and renders a light-theme site where the user picks any class or method and sees its call tree as a hand-drawn SVG flamegraph. Use when the user runs /flamegraph

How to use this skill

Skill file

flamegraph

Generate a static call-graph flamegraph website for the Java project the user is working on.

Steps

  1. Find the Java source root. Prefer src/main/java; if absent, use the directory the user points at or the closest directory containing .java files. If the user names a specific module or subproject, scope to it.
  2. Run the generator that ships with this skill:

```

python3 ~/.claude/skills/flamegraph/build_flamegraph.py <java-src-dir> <out-dir> [title]

```

Use flamegraph-site inside the target project as <out-dir> unless the user asks for another location, and pass the project name as the title.

  1. The script writes a single self-contained index.html. Serve it with python3 -m http.server from <out-dir> (pick a free port) or tell the user to open the file directly, then report the URL or path.
  2. Tell the user how to use the site: the left panel lists every class and method, the search box filters it, clicking any method roots the flamegraph at that method, clicking a frame re-roots into it, and the breadcrumb trail walks back up. Frame width is proportional to the number of distinct call paths underneath, hovering shows file, line, and fan-in/fan-out, and a ↺ mark means a recursive cycle was pruned.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.