
Grepai Trace Callees
- 651 installs
- 18 repo stars
- Updated February 1, 2026
- yoanbernabeu/grepai-skills
grepai-trace-callees is a Claude Code skill that maps every function a target function calls inside a large codebase using the grepai trace callees CLI for developers tracing call graphs.
About
grepai-trace-callees is a yoanbernabeu/grepai-skills package that teaches agents to run grepai trace callees against a named function and list all downstream calls. Given a function like ProcessOrder that invokes validateOrder, calculateTotal, and sendConfirmation, the command expands the full callee tree for dependency analysis. Developers reach for grepai-trace-callees when onboarding to unfamiliar modules, documenting behavior before refactors, or finding deeply nested dependencies without manual ripgrep chains. The skill answers the direct question what does this function call and pairs with other GrepAI trace skills for upstream caller analysis.
- Answers the question 'What does this function call?' with precise callee lists
- Returns file location and surrounding context for every callee
- Supports deeply nested dependency discovery across Go, Python, and other languages
- Designed for rapid code comprehension during refactoring or onboarding
- CLI-first agent skill that works inside Cursor, Claude Code, and terminal workflows
Grepai Trace Callees by the numbers
- 651 all-time installs (skills.sh)
- +6 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #68 of 596 Debugging skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-trace-calleesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 651 |
|---|---|
| repo stars | ★ 18 |
| Security audit | 3 / 3 scanners passed |
| Last updated | February 1, 2026 |
| Repository | yoanbernabeu/grepai-skills ↗ |
How do you find all functions a function calls?
Instantly map every function a target function calls inside a large codebase.
Who is it for?
Developers exploring unfamiliar functions in large repositories who need fast callee dependency maps before refactoring or documenting behavior.
Skip if: Developers who already need upstream caller analysis, full runtime stack traces, or languages unsupported by the grepai CLI.
When should I use this skill?
The user asks what a function calls, needs callee dependencies mapped, or wants to understand nested function behavior in a large codebase.
What you get
Callee dependency trees showing every function invoked by a target function, including nested calls.
- callee dependency trees
- function call maps
Files
GrepAI Trace Callees
This skill covers using grepai trace callees to find all functions called by a specific function.
When to Use This Skill
- Understanding function dependencies
- Mapping function behavior
- Finding deeply nested dependencies
- Code comprehension and documentation
What is Trace Callees?
grepai trace callees answers: "What does this function call?"
func ProcessOrder(order) {
validateOrder(order)
calculateTotal(order)
sendConfirmation(order.email)
}
│
↓
┌───────┴───────────────────┐
│ What does ProcessOrder │
│ call? │
├───────────────────────────┤
│ • validateOrder │
│ • calculateTotal │
│ • sendConfirmation │
└───────────────────────────┘Basic Usage
grepai trace callees "FunctionName"Example
grepai trace callees "ProcessOrder"Output:
🔍 Callees of "ProcessOrder"
Found 4 callees:
1. validateOrder
File: services/order.go:45
Context: validateOrder(order)
2. calculateTotal
File: services/order.go:48
Context: total := calculateTotal(order.Items)
3. applyDiscount
File: services/order.go:51
Context: total = applyDiscount(total, order.Coupon)
4. sendConfirmation
File: services/order.go:55
Context: sendConfirmation(order.Email, total)JSON Output
grepai trace callees "ProcessOrder" --jsonOutput:
{
"query": "ProcessOrder",
"mode": "callees",
"count": 4,
"results": [
{
"file": "services/order.go",
"line": 45,
"callee": "validateOrder",
"context": "validateOrder(order)"
},
{
"file": "services/order.go",
"line": 48,
"callee": "calculateTotal",
"context": "total := calculateTotal(order.Items)"
},
{
"file": "services/order.go",
"line": 51,
"callee": "applyDiscount",
"context": "total = applyDiscount(total, order.Coupon)"
},
{
"file": "services/order.go",
"line": 55,
"callee": "sendConfirmation",
"context": "sendConfirmation(order.Email, total)"
}
]
}Compact JSON (AI Optimized)
grepai trace callees "ProcessOrder" --json --compactOutput:
{
"q": "ProcessOrder",
"m": "callees",
"c": 4,
"r": [
{"f": "services/order.go", "l": 45, "fn": "validateOrder"},
{"f": "services/order.go", "l": 48, "fn": "calculateTotal"},
{"f": "services/order.go", "l": 51, "fn": "applyDiscount"},
{"f": "services/order.go", "l": 55, "fn": "sendConfirmation"}
]
}TOON Output (v0.26.0+)
TOON format offers ~50% fewer tokens than JSON:
grepai trace callees "ProcessOrder" --toonNote:--jsonand--toonare mutually exclusive.
Extraction Modes
Fast Mode (Default)
grepai trace callees "ProcessOrder" --mode fastPrecise Mode
grepai trace callees "ProcessOrder" --mode precise| Mode | Speed | Accuracy | Dependencies |
|---|---|---|---|
fast | ⚡⚡⚡ | Good | None |
precise | ⚡⚡ | Excellent | tree-sitter |
Use Cases
Understanding Function Behavior
# What does this complex function do?
grepai trace callees "handleRequest"
# Map the data flow
grepai trace callees "processPayment"Finding Dependencies
# What external services does this call?
grepai trace callees "syncData"
# What database operations happen?
grepai trace callees "saveUser"Code Review
# What side effects does this function have?
grepai trace callees "updateProfile"
# Is this function doing too much?
grepai trace callees "doEverything" # Lots of callees = code smellDocumentation
# Generate dependency list for docs
grepai trace callees "initialize" --json | jq '.results[].callee'Callers vs Callees
| Command | Question | Use Case |
|---|---|---|
trace callers | Who calls me? | Impact analysis |
trace callees | What do I call? | Behavior analysis |
# Combined analysis
grepai trace callers "processOrder" # Who uses this?
grepai trace callees "processOrder" # What does it do?Filtering Results
By File Type
# Get callees and filter to only .go files
grepai trace callees "main" --json | jq '.results[] | select(.file | endswith(".go"))'Exclude Test Functions
grepai trace callees "Login" --json | jq '.results[] | select(.callee | startswith("Test") | not)'Count by Category
# Count how many database vs. API calls
grepai trace callees "processOrder" --json | jq '.results[].callee' | grep -c "db"What Callees Includes
The trace finds:
- Direct function calls
- Method calls
- Built-in function calls (depending on mode)
Example
func ProcessOrder(order Order) error {
// Direct call
validateOrder(order)
// Method call
order.Validate()
// Package function
utils.Log("processing")
// Built-in (may or may not be captured)
fmt.Println("done")
return nil
}Callees found:
validateOrderValidate(method)Log(from utils)Println(depending on mode)
Limitations
What Callees Might Miss
- Dynamic/runtime calls
- Callbacks and closures
- Interface method calls (may show interface, not implementation)
- Reflection-based calls
Example of Undetected Call
func process(fn func()) {
fn() // Callee is unknown at static analysis time
}Combining with Trace Graph
For recursive dependency analysis, use trace graph:
# Direct callees only
grepai trace callees "main"
# Full dependency tree (recursive)
grepai trace graph "main" --depth 3Scripting Examples
List All Callees
grepai trace callees "main" --json | jq -r '.results[].callee' | sort -uCheck for Specific Callee
# Does processOrder call sendEmail?
grepai trace callees "processOrder" --json | jq -e '.results[] | select(.callee == "sendEmail")' && echo "Yes" || echo "No"Generate Dependency Report
#!/bin/bash
echo "# Function Dependencies Report"
echo ""
for fn in main initialize processOrder; do
echo "## $fn"
grepai trace callees "$fn" --json | jq -r '.results[].callee' | sed 's/^/- /'
echo ""
doneCommon Issues
❌ Problem: Function not found ✅ Solution: Check spelling and ensure function exists in indexed files
❌ Problem: No callees found (but function has calls) ✅ Solutions:
- Try
--mode precise - Check language is in
enabled_languages - Ensure symbols.gob is up to date (
grepai watch)
❌ Problem: Missing some callees ✅ Solution: Use --mode precise for better accuracy
Best Practices
1. Use for understanding: Great for learning new codebases 2. Combine with callers: Full dependency picture 3. Use graph for deep analysis: When you need recursion 4. Filter results: Focus on relevant callees 5. Document findings: Export to markdown for docs
Output Format
Trace callees result:
🔍 Callees of "ProcessOrder"
Mode: fast
Function found in: services/order.go:40
Found 4 callees:
1. validateOrder
File: services/order.go:45
Context: validateOrder(order)
2. calculateTotal
File: services/order.go:48
Context: total := calculateTotal(order.Items)
3. applyDiscount
File: services/order.go:51
Context: total = applyDiscount(total, order.Coupon)
4. sendConfirmation
File: services/order.go:55
Context: sendConfirmation(order.Email, total)
Tip: Use 'grepai trace graph ProcessOrder' for recursive analysisRelated skills
How it compares
Use grepai-trace-callees for downstream callee maps; pair with caller-trace skills when you need who invokes a function instead.
FAQ
What does grepai trace callees return?
grepai trace callees returns every function called by a specified target function, including nested downstream dependencies. The grepai-trace-callees skill teaches agents to run this CLI for code comprehension and refactor planning.
When should grepai-trace-callees be used?
grepai-trace-callees applies when understanding function behavior, mapping dependencies, or finding deeply nested callees before documentation or refactors. Agents invoke the grepai trace callees command against a named function.
Is Grepai Trace Callees safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.