skills/call-graph-diff/SKILL.md
Use when the user wants to compare function call relationships between branches, see what functions were added, removed, or rewired across a diff, or generate a call graph diff visualization.
npx skillsauth add goofansu/pi-stuff call-graph-diffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a self-contained call-graph-diff.html from call graph diff data. The audience is the coding agent: proceed directly, ask only for blocking information, and report the generated artifact path when done.
Determine the base branch to compare against:
gh pr view --json baseRefName in the repo to get the PR's declared base branch.git remote show origin | grep 'HEAD branch'.master or develop — always look it up.origin/ (e.g. origin/develop) to compare against the remote ref, not a potentially stale local branch.git fetch origin <baseRefName> before diffing to ensure the remote ref is up to date.If call graph diff output is not available, run the call-graph-diff subagent with the given branch and the resolved base branch.
Check the subagent output before proceeding:
Normalize the output into this JSON shape:
{
meta: {
featureBranch: string,
baseBranch: string
},
summary: {
files_changed: number,
added: number,
removed: number,
rewired: number,
unchanged: number
},
nodes: [
{ id: string, status: "added" | "removed" | "rewired" | "unchanged", file: string }
],
edges: [
{ src: string, dst: string, status: "added" | "removed" | "both" }
]
}
Check if the JSON indicates no call-graph changes:
nodes is empty and edges is empty (or both arrays contain only unchanged entries), stop here and tell the user there are no call-graph changes to visualise. Do not create the HTML file.Write the JSON to /tmp/call-graph-diff-data.json.
Render the HTML:
bash <skill-dir>/scripts/render.sh /tmp/call-graph-diff-data.json /tmp/call-graph-diff.html
The script injects the JSON into examples/call-graph-diff-template.html and writes the HTML to /tmp/call-graph-diff.html.
added: function or call edge exists only in the new version.removed: function or call edge existed only in the old version.rewired: function exists in both versions, but incoming or outgoing calls changed.unchanged: function exists in both versions with no material call-edge change.both: call edge exists in both old and new versions.group or groupLabels; the template derives groups from each node's file value.Return:
call-graph-diff.html.development
Use when the user asks to research a topic online, find current information, compare options, or produce a research report.
content-media
Use when the user asks to transcribe audio files to text.
documentation
Use when the user asks to convert a URL or local document into Markdown or summarize it.
development
Use when the user asks to simplify, clean up, or improve changed code.