---
title: "Slicing Code Context: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/trailofbits-trailmark-slicing-code-context/
description: "Uses Trailmark to cut a bounded, graph-informed slice of source around a function, class, caller, callee, call path, entry point or line range and hands it to a smaller worker model that may only propose edits."
---

# Slicing Code Context: review, setup & limitations · Undominated.ai

> Uses Trailmark to cut a bounded, graph-informed slice of source around a function, class, caller, callee, call path, entry point or line range and hands it to a smaller worker model that may only propose edits.

[← Explore all skills](/skills/)

SECURITY REVIEW / Trail of Bits

# Slicing Code Context

Uses Trailmark to cut a bounded, graph-informed slice of source around a function, class, caller, callee, call path, entry point or line range and hands it to a smaller worker model that may only propose edits.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/trailofbits/skills/tree/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context)

SOURCE REVIEW

 Reviewed 2026-10-22
 Evidence 6 linked sources
 Publisher Trail of Bits
 Licence [CC-BY-SA-4.0 ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE)
 Revision 8e54050ae63c
 [Read what was—and wasn’t—checked ↓](#review)

“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.”

 [Trail of Bits · upstream description ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - Builds a deterministic Trailmark slice packet and gives a worker only the task and that packet; the worker may propose changes but not apply them.
- The packet script requires Python 3.12+ and resolves Trailmark 0.5.x, and on unsupported_trailmark the skill says to install or select 0.5.x rather than silently use a different schema.

### A good fit for

 - Hand a function-, caller- or call-path-focused task to a smaller or locally hosted model without exposing the whole repository
- Produce a bounded source packet a constrained worker can analyse
- Get a patch proposal back from the worker rather than a direct edit

### Weigh up before choosing

 - Workers may only propose changes; the skill is not for tasks that need direct worker edits.
- build_slice_packet.py requires Python 3.12+ and resolves Trailmark 0.5.x through uv.
- The bundled Claude agent is not an empty-context worker: Claude Code also injects repository instructions, git status, environment data and a delegation prompt. Only an external adapter can guarantee a task-and-packet-only prompt.
- The 8K default budget bounds an estimated packet, not the worker's whole prompt.
- Installs with the whole `trailmark` plugin — and the Trailmark CLI via `uv tool install trailmark` — not as a standalone Slicing Code Context skill.
- Last commit touching plugins/trailmark/skills/slicing-code-context at the pinned revision: 2026-10-09.
- Not executed: it was not installed or run.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - plugins/trailmark/skills/slicing-code-context/SKILL.md
- plugins/trailmark/README.md (prerequisites and version notes)
- plugins/trailmark/agents/code-slice-worker.md (host note)
- README.md (installation and licence sections)
- LICENSE
- plugins/trailmark/skills/slicing-code-context/scripts/build_slice_packet.py

### Our findings

 - Slicing Code Context's SKILL.md frontmatter declares no allowed-tools.
- The packet comes from the bundled scripts/build_slice_packet.py, run with `uv run`, under a token budget (8192 by default), and is passed to the worker byte for byte.
- It prefers the plugin agent trailmark:code-slice-worker, which defaults to Haiku and has no repository-reading or mutation tools.
- Worker output whose cited file or range is absent from the packet is rejected.

### Not established by this review

 - Not executed: it was not installed or run.
- The Slicing Code Context skill and any bundled scripts were not run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md)
 - `/plugin marketplace add trailofbits/skills` (repository README) adds the whole Trail of Bits marketplace, not one skill.
- Install the `trailmark` plugin from `/plugin menu`; it bundles the Slicing Code Context skill with the other trailmark skills listed in the trailmark plugin README.
- This skill runs no `trailmark` CLI command: its scripts/build_slice_packet.py declares `trailmark>=0.5,<0.6` as inline script metadata and is run with `uv run`, which fetches that version.

### Before you start

 - The Trailmark CLI, installed with `uv tool install trailmark` (trailmark plugin README)
- uv
- Python 3.12+ for the bundled build_slice_packet.py
- A worker: the plugin's trailmark:code-slice-worker agent or an external model the user configures

### Compatibility

Claude Code

### Builds a Trailmark slice packet and sends it to a worker model

 - Slicing Code Context declares no allowed-tools, so tool use follows the host's settings
- Run build_slice_packet.py through uv, which resolves Trailmark 0.5.x
- Send the task and the slice packet to a subagent or to an external worker model the user configures
- Read source to check the worker's cited ranges and proposed edits
- When the user's request authorises source changes, apply a proposed edit as coordinator, then run proportionate tests and checks

### Cost model

CC-BY-SA-4.0. The Slicing Code Context skill's files name no paid service; the worker is whichever local or hosted model the user configures.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [Slicing Code Context SKILL.md ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context/SKILL.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context/SKILL.md Supports: upstreamDescription, summary, whySelected, bestFor, limitations, access, review.findings
- [trailmark plugin README ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/README.md Supports: install.prerequisites, install.steps
- [trailmark code-slice-worker agent (names Claude Code as host) ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/agents/code-slice-worker.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/agents/code-slice-worker.md Supports: compatibility
- [trailofbits/skills README ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md Supports: install.steps, license
- [trailofbits/skills LICENSE ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE Supports: license
- [Bundled build_slice_packet.py ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context/scripts/build_slice_packet.py) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/slicing-code-context/scripts/build_slice_packet.py Supports: install.steps, access.permissions

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Trailmark ↗ Parses a codebase into a queryable graph of functions, classes and calls and runs pre-analysis passes for blast radius, taint, privilege boundaries and entry points, so later trailmark skills can ask structural questions instead of reading files.](/skills/trailofbits-trailmark/)[### Trailmark Summary ↗ Runs a Trailmark summary over a codebase and returns the auto-detected languages, an entry-point count and a dependency list as a quick structural overview.](/skills/trailofbits-trailmark-summary/)[### Diagramming Code ↗ Turns a Trailmark code graph into Mermaid diagrams: call graphs, class hierarchies, module-dependency maps, containment diagrams, complexity heatmaps and attack-surface data-flow views.](/skills/trailofbits-trailmark-diagramming-code/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
