grepai-trace-callerslisted
Install: claude install-skill NNIIKKKKII/grepai-skills
# GrepAI Trace Callers
This skill covers using `grepai trace callers` to find all code locations that call a specific function or method.
## When to Use This Skill
- Finding all usages of a function before refactoring
- Understanding function dependencies
- Impact analysis before changes
- Code navigation and exploration
## What is Trace Callers?
`grepai trace callers` answers: **"Who calls this function?"**
```
func Login(user, pass) {...}
↑
│
┌───────┴───────────────────┐
│ Who calls Login()? │
├───────────────────────────┤
│ • HandleAuth (auth.go:42) │
│ • TestLogin (test.go:15) │
│ • CLI (main.go:88) │
└───────────────────────────┘
```
## Basic Usage
```bash
grepai trace callers "FunctionName"
```
### Example
```bash
grepai trace callers "Login"
```
Output:
```
🔍 Callers of "Login"
Found 3 callers:
1. HandleAuth
File: handlers/auth.go:42
Context: user.Login(ctx, credentials)
2. TestLoginSuccess
File: handlers/auth_test.go:15
Context: result := Login(testUser, testPass)
3. RunCLI
File: cmd/main.go:88
Context: err := auth.Login(username, password)
```
## JSON Output
For programmatic use:
```bash
grepai trace callers "Login" --json
```
Output:
```json
{
"query": "Login",
"mode": "callers",
"count": 3,
"results": [
{
"file": "handlers/auth.go",
"line": 42,
"caller": "HandleAuth",
"context": "user.Login(ctx, credentials)"
},
{
"file": "handlers/auth_test.go",