Slicing Code Context
Selects bounded, graph-informed source slices with Trailmark and delegates focused code...
Install
npx skills add trailofbits/skills --skill slicing-code-context -g -a claude-code -y- Repository
- trailofbits/skills7.9k
- Category
- AI and agents
- Updated
- 7d ago
- License
- CC-BY-SA-4.0
- Context cost
- Mediumabout 2,044 tokens
- Runs scripts
- Yes, review before use
What it does
Selects bounded, graph-informed source slices with Trailmark and delegates focused code analysis or patch-proposal work to a smaller subagent. Use when offloading function-, class-, caller-, callee-, call-path-, entrypoint-, or line-focused code tasks to constrained or locally hosted models without exposing the full repository.
Slicing Code Context
Use the capable coordinator to choose relevant code. Give an external/local worker only the task and a deterministic Trailmark slice packet, then verify its response. The bundled Claude agent is a bounded-source fallback, not a strict empty-context process: Claude Code also injects repository instructions, git status, environment data, and a composed delegation prompt.
When to Use
- Offload explanation, classification, review, or mechanical edit proposals for a function or class
- Trace callers, callees, shortest call paths, or entrypoint-to-target paths within a small context window
- Focus a local or lower-cost model on explicit source lines and their graph neighborhood
- Keep repository access and final judgment with the coordinator
When NOT to Use
- The worker must explore the repository or discover its own scope
- Runtime behavior, generated code, macros, or dynamic dispatch dominate what Trailmark can see
- The anchor alone cannot fit and no meaningful line range is known
- The task requires direct worker edits; workers may only propose changes
- A small file can be read safely without graph selection or delegation

