slicing code context

AI Community

Skill notes

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

Rationalization · Why It Fails · Required Action "Let the worker browse if it gets stuck" · That destroys the bounded-context guarantee · Allow one coordinator-generated expansion only "A function name is unique enough" · Repositories commonly reuse method names · Use the exact Trailmark node ID after an ambiguity error "Truncating a large function is close enough" · Missing control flow invalidates conclusions · Use an explicit line range or raise the budget

1. Define the worker task and anchors

Keep the worker task concrete and independently checkable. Infer an exact symbol or line range from the user's request. If a name is ambiguous, run the slicer once, show its candidate IDs, and choose from evidence; never pick the first match. Choose a mode:

2. Build the packet

Replace {targetDir} with the source-tree root chosen for the task. If Claude Code leaves the repository-standard {baseDir} placeholder literal, use "${CLAUDE_SKILL_DIR}/scripts/build_slice_packet.py" for the script path. The PEP 723 script requires Python 3.12+ and resolves Trailmark 0.5.x with uv. If execution fails, report the error. Do not substitute hand-selected

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@trailofbits · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Node.js · Python >=3.12
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview slicing-code-context.preview
# Input to Output Example

{
  "status": "complete",
  "answer": "Verifies the token signature before dispatch.",
  "evidence": [
    {"claim": "Signature verification gates dispatch", "file": "auth.py", "start_line": 42, "end_line": 48}
  ],
  "proposed_edits": [],
  "missing_context": [],
  "uncertainties": ["The cryptographic backend is an unresolved external node"]
}

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.