grepai-trace-callees

yoanbernabeu/grepai-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-trace-callees
0 commentsdiscussion
summary

This skill covers using grepai trace callees to find all functions called by a specific function.

skill.md

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" --json

Output:

{
  "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 --compact

Output:

{
  "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" --toon

Note: --json and --toon are mutually exclusive.

Extraction Modes

Fast Mode (Default)

grepai trace callees "ProcessOrder" --mode fast

Precise 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 smell

Documentation

# 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:

  • validateOrder
  • Validate (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 3

Scripting Examples

List All Callees

grepai trace callees "main" --json | jq -r '.results[].callee' | sort -u

Check 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
    
how to use grepai-trace-callees

How to use grepai-trace-callees on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add grepai-trace-callees
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-trace-callees

The skills CLI fetches grepai-trace-callees from GitHub repository yoanbernabeu/grepai-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/grepai-trace-callees

Reload or restart Cursor to activate grepai-trace-callees. Access the skill through slash commands (e.g., /grepai-trace-callees) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.772 reviews
  • Zara Sanchez· Dec 28, 2024

    grepai-trace-callees is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Soo Liu· Dec 16, 2024

    Useful defaults in grepai-trace-callees — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kofi Abbas· Dec 12, 2024

    Solid pick for teams standardizing on skills: grepai-trace-callees is focused, and the summary matches what you get after install.

  • Lucas Chawla· Dec 12, 2024

    grepai-trace-callees fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 19, 2024

    Keeps context tight: grepai-trace-callees is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Mia Gupta· Nov 19, 2024

    Useful defaults in grepai-trace-callees — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Arjun Choi· Nov 7, 2024

    grepai-trace-callees is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Lucas Bhatia· Nov 3, 2024

    grepai-trace-callees has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Arjun Kim· Nov 3, 2024

    I recommend grepai-trace-callees for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Arjun Robinson· Oct 26, 2024

    grepai-trace-callees reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 72

1 / 8