context-bundle-analysis

Analyzes frozen context-profiler bundles and reports advisory context-failure findings.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/nseng-ai/ns --skill context-bundle-analysis-nseng-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-bundle-analysis
Source: https://github.com/nseng-ai/ns/tree/main/skills/internal/agent-engineering/context-bundle-analysis
Command: npx skills add https://github.com/nseng-ai/ns --skill context-bundle-analysis-nseng-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Long agent sessions accumulate stale, contradictory, or misleading context that silently degrades model behavior. This Skill interprets a frozen context window captured by the /context-profiler extension and diagnoses session-level context-failure modes — poisoning, distraction, confusion, and clash — with turn-cited evidence and a recommended action per finding. ## Core Features & Use Cases - Second-pass bundle interpretation: Reads a profiler bundle (messages.jsonl, manifest.json, system-prompt.md, episodes.json) and maps episode verdicts to Breunig's four context-failure modes without re-segmenting the transcript. - Bounded transcript sampling: Uses the bundled slice-episode.mjs script to extract role-tagged, turn-numbered excerpts with hard output caps, so the analysis never pulls the full transcript into context. - Actionable verdicts: Each finding carries a mode, turn-cited evidence, qualitative concern, one recommended action (prune, quarantine, handoff, or no-action), and a named research grounding, persisted to analysis.md in the bundle. - Use Case: After running /context-profiler on a long debugging session, point this Skill at the captured bundle to learn whether the session's main risk is clash from superseded early attempts or distraction from inert bulk, and what to do about it. ## Quick Start Analyze the context bundle at the path I provide from my context-profiler session and give me the failure-mode findings with recommended actions.

Frequently Asked Questions about context-bundle-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a context-profiler bundle for context rot?

Provide the explicit path to a bundle directory (or a sessionId root, which resolves to the highest ordinal) captured by the /context-profiler extension. The Skill reads the manifest and episodes, samples flagged episodes through the bounded slicer, and returns a verdict with findings and recommended actions.

What files must a context bundle contain for analysis?

A bundle must contain messages.jsonl (one provider-visible message per line), manifest.json (capture metadata), system-prompt.md, and episodes.json with the profiler's episode claims. The episodes.json file is required; without it the Skill stops and asks you to run /context-profiler first.

Can I analyze a raw session transcript without episodes.json?

No. The Skill is strictly a second-pass interpreter of profiler episode claims and never re-segments transcripts. Run /context-profiler in the host session, let the episodes export complete, then re-run this analysis on the resulting bundle.

Does the analysis read the entire messages.jsonl transcript?

No. All transcript excerpts go through the bundled slice-episode.mjs script, which hard-caps output per turn and in total and reports any truncation. Reading the full transcript into context is explicitly forbidden because it would induce the failure mode being diagnosed.

What actions can the analysis recommend for a failing context?

Each finding recommends exactly one of four actions: prune (remove cited content), quarantine (isolate work in a subagent or side session), handoff (distill load-bearing content into a fresh session), or no-action. The Skill only advises; it performs none of these actions itself.

Does the Skill modify the captured context bundle files?

No. The only permitted write is appending the report to analysis.md inside the bundle, and existing analysis.md files require user confirmation before replacement. All profiler-written bundle files are treated as read-only evidence.