grepai-trace-graph

Build recursive call graphs from codebases using GrepAI trace graph.

Updated May 12, 2026
One-click install
npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill grepai-trace-graph-eduardtomasek
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: grepai-trace-graph
Source: https://github.com/eduardtomasek/codex-dev-stack/tree/main/skills/.agents/grepai-trace-graph
Command: npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill grepai-trace-graph-eduardtomasek

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Understanding how functions call each other across a codebase is slow when done manually, especially for impact analysis before refactoring or when mapping unfamiliar application flows. ## Core Features & Use Cases - Recursive Call Graphs: Generate complete dependency trees for any function with configurable depth using grepai trace graph. - Multiple Output Formats: Export results as human-readable trees, JSON, compact JSON, or token-efficient TOON format. - Cycle Detection: Automatically identify and mark circular dependencies in the call graph. - Use Case: Before refactoring a shared utility like validateInput, run a depth-3 trace graph to see every caller and downstream dependency that could break, then export the JSON to generate a Mermaid or Graphviz diagram for documentation. ## Quick Start Ask the assistant to build a call graph for the main function with depth 3 using grepai trace graph and show which functions it depends on.

Frequently Asked Questions about grepai-trace-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a call graph for a function with GrepAI?▼

Run `grepai trace graph "FunctionName"` to build a recursive dependency tree. Control how deep the traversal goes with the `--depth` flag, for example `--depth 3` for three levels of callees.

How to export a GrepAI call graph as JSON?▼

Add the `--json` flag to get machine-readable output, such as `grepai trace graph "main" --depth 2 --json`. Use `--compact` for a shorter JSON form or `--toon` for a format with roughly 50% fewer tokens.

What is the difference between fast and precise mode in grepai trace?▼

Fast mode uses regex-based extraction and runs quicker, while precise mode uses tree-sitter AST parsing for more accurate call detection. Select them with `--mode fast` or `--mode precise`.

Does grepai trace graph detect circular dependencies?▼

Yes, GrepAI detects cycles and marks them in the output. In tree view the node is labeled with [CYCLE], and in JSON output the node includes a `"cycle": true` field.

Why is my grepai call graph too large or timing out?▼

Large codebases produce overwhelming graphs at high depth. Reduce the depth with `--depth 2`, trace a specific subsystem function instead of main, or switch to `--mode fast` for quicker extraction.

Can I convert a GrepAI call graph into a diagram?▼

Yes, pipe the JSON output into a Python script to generate Graphviz DOT format or Mermaid diagram syntax. The skill documentation includes ready-to-use conversion scripts for both formats.