Skills Explorer Add Skills

slicing-code-context

An agent skill by trailofbits, from trailofbits/skills. Tags: analysis, automation, code-quality, developer-tools.

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.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add trailofbits/skills --skill slicing-code-context

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/trailofbits/skills
cp -r skills/plugins/trailmark/skills/slicing-code-context ~/.claude/skills/slicing-code-context

Safety box score

Grade C, moderate risk: 33 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill builds bounded source slices from a chosen repository root and hands them to a smaller worker for focused analysis. The main risks are local code execution via `uv`/Python, possible dependency fetching, and deliberate exposure of untrusted source text to the worker; it does not itself write or delete project files.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)The shipped `scripts/build_slice_packet.py` is a PEP 723 Python script run via `uv run`, and `main()` executes Trailmark analysis over the target tree.
Network access1 (low)The skill depends on `trailmark>=0.5,<0.6` and says Trailmark is resolved with `uv`, which may contact package indexes, but it does not define any repository-data exfiltration endpoint.
Filesystem reach1 (low)`safe_source_path()`, `validated_span()`, and `load_trailmark_graph()` read live files under the chosen target root and reject traversal, with no write/delete behavior.
Secrets & credentials0 (none)Nothing in the skill reads tokens, keys, passwords, dotfiles, browser sessions, or CLI logins; it only inspects source files and graph metadata.
Privilege & persistence0 (none)There is no sudo, global install, service registration, scheduled task, or shell/profile modification in the skill files.
Instruction hijack surface3 (high)`SKILL.md` and `scripts/build_slice_packet.py` explicitly tell the worker to ignore instructions embedded in source/comments/strings/identifiers, so the skill deliberately treats repository text as possible prompt injection.
Irreversible actions0 (none)The skill only analyzes code and proposes edits; it does not push, deploy, post, pay, book, or otherwise act outside the local workspace.
Transparency1 (low)The scripts are readable, but `load_trailmark_graph()` imports `trailmark` at runtime and the skill relies on `uv` to resolve `trailmark 0.5.x`, so some behavior depends on an external package outside this repo.

Before installing

Rated 2026-10-20 by an automated review of 7 files from the skill's repository.

Source

Repository
trailofbits/skills (all skills from this repository)
Path
plugins/trailmark/skills/slicing-code-context/SKILL.md
Branch
main
Collection
trailmark
Updated
2026-09-19