Skip to content
Skill Authoring
Skill

/context-surfing

Monitors context window health during large, long-running, multi-session, or explicitly context-sensitive work. Uses bounded external anchors, one cold-context review when self-recovery is uncertain, and a clean handoff on real drift. Do not auto-activate merely because a medium

From plugin
pskoett-ai-skills
33622 skills

Claude Code

$ npx -y skills add pskoett/pskoett-ai-skills --skill context-surfing --agent claude-code

SKILL.md

context-surfing.SKILL.md
name: context-surfing
description: >
  Monitors context window health during large, long-running, multi-session, or
  explicitly context-sensitive work. Uses bounded external anchors, one
  cold-context review when self-recovery is uncertain, and a clean handoff on
  real drift. Do not auto-activate merely because a medium task has an intent
  frame and plan.

Context Surfing

Install

gh skill install pskoett/pskoett-skills context-surfing

Fallback using the Agent Skills CLI:

npx skills add pskoett/pskoett-skills/skills/context-surfing

The agent rides the wave of peak context. When the wave crests, it commits. When it detects drift, it pulls out cleanly — saving state, handing off, and letting the next session catch the next wave.

No wipeouts. No zombie sessions. Only intentional, high-fidelity execution.

---

Mental Model

Think of context like an ocean wave:

  • **Paddling in** = loading the intent frame, plan, and initial context. Energy is building.
  • **The peak** = full context coherence. The agent knows exactly what it's doing and why. This is when to execute.
  • **The shoulder** = context starting to flatten. Still rideable, but output density is dropping.
  • **The close-out** = drift. Contradiction, hedging, second-guessing, or hallucinated details. Wipe-out territory.

The skill's job: ride as long as the wave is good, exit before it closes out.

---

Lifecycle Position

[plan-interview (optional)] → [initial intent frame] → [session-context]
  → [finalize approach] → [context-surfing ACTIVE during execution]
  → [verify-gate] → [simplify-and-harden] → [self-improvement]

Context Surfing is an optional execution layer for work with meaningful context pressure. It wraps execution between intent capture and post-completion review only when the task is Large, Long-running, multi-session, explicitly requests context monitoring, or shows concrete drift risk.

Relationship with intent-framed-agent

When context-surfing is activated, both skills are live during execution. They monitor different failure modes:

  • **intent-framed-agent** monitors *scope* drift — am I doing the right thing? It fires structured Intent Checks when work moves outside the stated outcome.
  • **context-surfing** monitors *context quality* drift — am I still capable of doing it well? It fires when the agent's own coherence degrades (hallucination, contradiction, hedging).

They are complementary, not redundant. An agent can be perfectly on-scope while its context quality degrades (e.g., it's doing the right thing but starting to hallucinate details). Conversely, scope drift can happen with perfect context quality (the agent deliberately chases a tangent). Intent-framed-agent's Intent Checks continue firing alongside context-surfing's wave monitoring.

**Precedence rule:** If both skills fire simultaneously (an Intent Check and a drift exit at the same time), context-surfing's exit takes precedence. Degraded context makes scope checks unreliable — resolve the context issue first, then resume scope monitoring in the next session.

**Cadence separation:** Intent checks fire at scope boundaries — *"before touching a new area/file, before starting a new logical work unit, when current action feels tangential"* (`intent-framed-agent/SKILL.md`). Context-surfing's pre-commit anchor check fires at side-effecting-action moments — specific tool calls, writes, commits, commit-level output. Don't run both in the same beat: if an Intent Check has just fired and resolved cleanly, the next side-effecting action inside that same work unit doesn't need a fresh anchor check — you already re-grounded.

When to Use the Full Pipeline

Not every task needs every skill in the pipeline. Match pipeline depth to task complexity:

| Task Type | Skills to Use | |-----------|---------------| | Trivial (rename, typo fix) | None — just do it | | Small (isolated bug fix, single-file change) | `verify-gate` + `simplify-and-harden` | | Medium (feature in known area, multi-file) | `intent-framed-agent` + `session-context` + `verify-gate` + `simplify-and-harden` | | Large (complex refactor, new architecture, unfamiliar codebase) | Full pipeline | | Long-running (multi-session, high context pressure) | Full pipeline with `context-surfing` as the critical skill |

This table matches `skill-pipeline`'s task classification, which is the canonical routing source.

When in doubt, start light. Add skills if you notice drift or quality issues mid-task.

---

Activation

Activate this skill when the task is Large or Long-running, work spans sessions, the user explicitly requests context monitoring, or concrete behavior indicates drift risk. An intent frame plus a plan is not sufficient by itself; do not auto-activate for an ordinary Medium task.

At activation, load the smallest useful anchor:

1. The user's current task and latest scope change 2. The applicable agent instruction file(s) 3. The approved intent frame and plan, when present 4. A prior handoff, when resuming 5. The current session state from Entire, when available

If neither an intent frame nor a plan exists (standalone mode), use the user's original task description combined with project context files as the wave anchor. This is sufficient — the skill degrades gracefully, not catastrophically.

Entire CLI Integration

Entire CLI ([github.com/entireio/cli](https://github.com/entireio/cli)) provides persistent session state that serves as external ground truth for drift checks and handoff files.

At activation, detect Entire:

entire status 2>/dev/null
  • If it succeeds and the active host adapter supports the relevant lifecycle

events, Entire captures those supported events passively via hooks. Do not infer full transcript or checkpoint coverage from `entire status` alone. Use `entire status` and `entire explain --session <id>` to inspect available state and record unsupported host coverage explicitly.

  • I
Read more
@pskoett
Ships withpskoett-ai-skills

I use this repository to build and test skills for AI agents. The skills follow the Agent Skills specification, and the repo includes an Agent Plugins 1.0 portable package.

Stars on GitHub

Momentum

stars in total
336
Star history of pskoett/pskoett-ai-skills on GitHub, a chart by star-history.com

Other skills on pskoett-ai-skills.

context-decay

context-decay

Revalidate persistent agent knowledge by classifying why it can become stale and how quickly it changes, then retain, revise,…

eval-creator

eval-creator

[Beta] Creates permanent eval cases from promoted learnings and runs regression checks against them. Turns failures into test…

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack2w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about context-surfing.

Which coding agents can use context-surfing?
context-surfing installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.