Install
$ agentstack add skill-gwihwan-go-lsprag-skills-lsprag-deep-think ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
LSPRAG Deep Think — BFS Code Understanding
> Note: deep-think is one tool in the lsprag analysis toolkit. See the main lsprag skill for the full adaptive analysis loop, decision framework, and when to use each skill.
If lsprag is not found, ask the user to run bash install.sh from the lsprag-skills root directory.
Overview
lsprag deep-think performs BFS expansion of a symbol's entire dependency graph:
- Retrieves the full source of the starting symbol
- Lists every token dependency (what that symbol calls/uses)
- For each dependency, retrieves its source and its own dependencies
- Continues until the configured depth is reached or all symbols are visited
- Outputs a Summary and Agent Instructions with concrete follow-up commands
When to Use
| Situation | Use deep-think? | |-----------|----------------| | Writing a test for a function you haven't seen before | Yes — depth 1 or 2 | | Refactoring a function with many dependencies | Yes — depth 2 | | Pre-audit before a large change | Yes — depth 2-3 | | Just need one function's source | No — use getDefinition | | Need token-level dependency map | No — use getTokens |
Start at depth 1. Follow the Agent Instructions in the output to dig into specific branches.
Command
lsprag deep-think --file --symbol [--depth ]
| Arg | Description | Default | |-----|-------------|---------| | --file | Absolute path to source file | required | | --symbol | Starting symbol name | required | | --depth | Max BFS depth (0 = root only, 1 = root + direct deps, 2 = +their deps) | 2 |
Always use absolute paths:
lsprag deep-think --file "$(realpath src/server.ts)" --symbol handleRequest --depth 2
Example Output
# Deep Think: 'handleRequest' (max depth: 2)
# File: src/server.ts
## Level 0: handleRequest (src/server.ts:15:10)
function handleRequest(req, res) {
const body = parseBody(req);
sendResponse(res, formatJSON(body));
}
**Dependencies:**
L 16:C 7 parseBody -> src/server.ts:42:10
L 17:C 3 sendResponse -> src/server.ts:58:10
L 17:C 16 formatJSON -> src/server.ts:73:10
---
## Level 1: parseBody (src/server.ts:42:10)
...
---
## Summary
| Metric | Value |
|--------|-------|
| Root symbol | `handleRequest` (src/server.ts) |
| Symbols visited | 5 |
| Max depth reached | 2 |
| Leaf nodes | formatJSON |
| Truncated (depth limit) | sendResponse |
## Agent Instructions
Continue exploring with these commands:
### Look up leaf node definitions
`lsprag getDefinition --file "$(realpath src/server.ts)" --symbol formatJSON`
### Explore truncated branches (hit depth limit)
`lsprag getTokens --file "$(realpath src/server.ts)" --symbol sendResponse`
### Find callers of the root symbol
`lsprag getReference --file "$(realpath src/server.ts)" --symbol handleRequest`
### Search for related patterns
`rg -n "handleRequest" . --type ts`
Recommended Workflow
# Step 1: expand the function's dependency graph
lsprag deep-think --file "$(realpath src/server.ts)" --symbol handleRequest --depth 1
# Step 2: follow the Agent Instructions to dig into specific branches
# (the output tells you exactly which commands to run next)
# Step 3: find who calls this function
lsprag getReference --file "$(realpath src/server.ts)" --symbol handleRequest
Notes
LSPRAG_LSP_PROVIDERmust be set. Runbash install.shto configure it automatically.- BFS visits each
(file, symbol)pair at most once — cycles are automatically prevented. - Output grows quickly with depth. Prefer
--depth 1for initial exploration. - The Agent Instructions section suggests
getTokensfor branches that hit the depth limit andgetDefinitionfor leaf nodes.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Gwihwan-Go
- Source: Gwihwan-Go/lsprag-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.