# context-surfing

context-surfing monitors context coherence during extended coding sessions, saving state and performing clean handoffs before hallucinations ruin output.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 272 installs · ★ 341 repo stars
- Author: pskoett
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pskoett/pskoett-ai-skills/tree/HEAD/skills/context-surfing/SKILL.md
- Updated: 2026-10-19
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/context-surfing

## What it does

The skill acts as an execution guard during long, multi-turn coding assignments. Instead of trusting internal model recall, it anchors checks to external project artifacts: user goals, instruction files, and explicit implementation plans. Execution halts before bad writes occur whenever hedging, contradictions, or invented facts surface.

When paired with `intent-framed-agent`, this tool specifically watches cognitive quality while the other prevents scope creep. If both trigger simultaneously, context exit takes precedence because degraded context makes scope validation unreliable.

It optionally queries Entire CLI via `entire status` to inspect persistent state across sessions. If Entire is missing, the tool degrades cleanly without errors, relying strictly on disk-based anchors and plan files.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pskoett/pskoett-ai-skills --skill context-surfing -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/context-surfing/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/context-surfing/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pskoett/pskoett-ai-skills --skill context-surfing -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/context-surfing/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pskoett/pskoett-ai-skills --skill context-surfing -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/context-surfing/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pskoett/pskoett-ai-skills skills/context-surfing
```

2. **Manually: put the files in place**
- File: `.github/skills/context-surfing/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pskoett/pskoett-ai-skills --skill context-surfing -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pskoett/pskoett-ai-skills --path skills/context-surfing
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/context-surfing/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pskoett/pskoett-ai-skills --skill context-surfing -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pskoett/pskoett-ai-skills/tree/HEAD/skills/context-surfing/SKILL.md

## When to use it
- catch context degradation during large multi-session refactoring jobs
- generate clean state handoffs before session close-out occurs
- block writes and commits when hallucinated details appear
- leverage Entire CLI session records without breaking when tools are missing

## Example prompts
- Monitor context health while refactoring the entire authentication layer
- Activate context-surfing for this long-running migration task
- Check context drift against our approved plan before committing files

## Similar
- [context-engineering](https://affpapa.org/en/nevibecode/skills/rohit-ghumare-context-engineering.md) — skill · ★ 2966 repo stars
- [context-mode](https://affpapa.org/en/nevibecode/rules/mert-koseoglu-context-mode.md) — rule · ★ 34370 repo stars
- [context-optimizer](https://affpapa.org/en/nevibecode/commands/context-optimizer.md) — command · ★ 2966 repo stars
- [context-budget](https://affpapa.org/en/nevibecode/skills/context-budget.md) — skill · 7000 installs
- [context-compression](https://affpapa.org/en/nevibecode/skills/muratcankoylan-context-compression.md) — skill · 669 installs
- [codex-1m-context-window-setup](https://affpapa.org/en/nevibecode/skills/codex-1m-context-window-setup.md) — skill · 211 installs

From the same set: [pskoett/pskoett-ai-skills](https://affpapa.org/en/nevibecode/by/pskoett/pskoett-ai-skills.md) — 10 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
