Agent skill

slicing-code-context

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.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeships scriptsCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill slicing-code-context --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 8
SKILL.md size: 8 KB
Bundled scripts: yes
Path: plugins/trailmark/skills/slicing-code-context/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 ## Rationalizations to Reject |

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Rationalizations to Reject
  4. Workflow
  5. 1. Define the worker task and anchors
  6. 2. Build the packet
  7. 3. Delegate without leaking context
  8. 4. Validate the response
  9. 5. Permit one focused expansion
  10. Error Handling
  11. Example Requests
  12. Input to Output Example
Ships with 7 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/slice-packet.md
  • scripts/build_slice_packet.py
  • scripts/pyproject.toml
  • scripts/test_build_slice_packet.py
  • scripts/uv.lock
Commands it runs
uv run "{baseDir}/scripts/build_slice_packet.py" \
More from skills
All skills →
About this skill
What does the slicing-code-context skill do?

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.

How do I install it?

Run `npx skills add trailofbits/skills --skill slicing-code-context --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going