AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Lsprag Deep Think

skill-gwihwan-go-lsprag-skills-lsprag-deep-think · by Gwihwan-Go

BFS dependency expansion — one of several lsprag analysis skills. See the main lsprag skill for the full adaptive analysis framework including when to use deep-think vs getDefinition, getTokens, getReference, listSymbols, and callChain.

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-gwihwan-go-lsprag-skills-lsprag-deep-think

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-gwihwan-go-lsprag-skills-lsprag-deep-think)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Lsprag Deep Think? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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:

  1. Retrieves the full source of the starting symbol
  2. Lists every token dependency (what that symbol calls/uses)
  3. For each dependency, retrieves its source and its own dependencies
  4. Continues until the configured depth is reached or all symbols are visited
  5. 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_PROVIDER must be set. Run bash install.sh to configure it automatically.
  • BFS visits each (file, symbol) pair at most once — cycles are automatically prevented.
  • Output grows quickly with depth. Prefer --depth 1 for initial exploration.
  • The Agent Instructions section suggests getTokens for branches that hit the depth limit and getDefinition for leaf nodes.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.