# Slicing Code Context

Selects bounded, graph-informed source slices with Trailmark and delegates focused code...

- Repository: https://github.com/trailofbits/skills (7935 stars)
- Category: AI and agents
- License: CC-BY-SA-4.0
- Last updated: 2026-10-28
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add trailofbits/skills --skill slicing-code-context -g -a claude-code -y`
Codex: `npx skills add trailofbits/skills --skill slicing-code-context -g -a codex -y`
Cursor: `npx skills add trailofbits/skills --skill slicing-code-context -g -a cursor -y`
Gemini CLI: `npx skills add trailofbits/skills --skill slicing-code-context -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add trailofbits/skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/trailofbits/skills/blob/HEAD/plugins/trailmark/skills/slicing-code-context/SKILL.md
