Skip to content
Agentmart
Submit a tool

context-fork

Checkpoint, inspect, and return through session tree branches.

Skill by szokeasaurusrex

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/szokeasaurusrex-context-fork

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Checkpoint, inspect, and return through session tree branches. Use when exploring uncertain approaches, investigating code, or when the user asks for a forked agent.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/context-fork

What's inside

Skill name
context-fork
Description
Checkpoint, inspect, and return through session tree branches. Use when exploring uncertain approaches, investigating code, or when the user asks for a forked agent.
License
MIT
Instructions
59 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: "context-fork" does not match folder "skill-context-fork"

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Context Fork

Tools: `ctx_checkpoint`, `ctx_inspect`, `ctx_return`

## When to Checkpoint

Set a checkpoint before:
- Exploring uncertain approaches or implementation strategies.
- Reading files that might be large or irrelevant.
- Running long commands that might produce verbose errors.
- Investigations that load substantial context (reading multiple files, running diagnostic commands, exploring unfamiliar code).

## Investigations

Checkpoints are ideal for investigation tasks. Load files, run commands, build deep understanding — all of which consumes context. Checkpoint before the investigation, return with a distilled summary afterward. The agent gets the conclusions without the context cost. This is the primary mechanism for keeping context lean during complex tasks.

## Writing Good Summaries

The summary is the **only** information that survives navigation. Include:
- What was attempted and what was learned.
- File paths modified or relevant.
- Key decisions made.
- Concrete answers to the question that motivated the fork.

Exclude:
- Verbose command output.
- Full file contents.
- Stack traces (summarize the error instead).

## Forked Agent Pattern

When the user asks for a "forked agent" (or "fork off and do X", "investigate X in a fork"):
1. Checkpoint the current position immediately.
2. Perform the requested work (the agent is now "in the fork").
3. Return to the checkpoint with a summary of the results.

The user does not need to say "checkpoint first" — "forked agent" or "fork" implies the full checkpoint → work → return cycle.

## Workflow Patterns

**Investigate-and-return**: Checkpoint → read files, run commands, build understanding → return with distilled findings. Keeps investigation artifacts out of main context.

**Explore-and-return**: Checkpoint → try an approach → return with what was learned.

**Discard irrelevant context**: Checkpoint → read a file / run a command → realize it's not useful → return with a one-line note ("File X was irrelevant, contains only Y").

**Sequential exploration**: Checkpoint → try approach A → return → try approach B → return → decide.

## Anti-patterns

- Don't checkpoint every turn (overhead, clutters the tree).
- Don't write empty or vague summaries.
- Don't forget to return — always close your forks.

## ctx_inspect Usage

Use when you need to find a specific point to return to (e.g., "before I read that file"). Default count of 5 is usually enough; increase for long explorations.

From szokeasaurusrex/pi-agent, MIT.

More from szokeasaurusrex/pi-agent

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Mar 19, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from szokeasaurusrex

Cite this page

context-fork skill. Agent Mart. https://agentmart.dev/skills/szokeasaurusrex-context-fork (last updated 2026-10-24)