Forked auto memory extraction

From ychampion/cskill-agents · View interactive version

Forked auto memory extraction is an AI agent skill from the GitHub repository ychampion/cskill-agents. Run a forked agent that captures stable session context and writes auto memories when the main agent finishes a turn.

How to use this skill

Skill file

SKILL: Forked Auto Memory Extraction

Domain: background-extraction

Trigger: Use whenever memory harvesting must run in a background agent after the main turn completes so the main prompt stays responsive.

Source Pattern: Distilled from reviewed background memory extraction and forked-agent isolation implementations.

Core Method

Spawn a forked memory-extraction agent after the parent turn finishes so the main session can stay responsive. Give the fork enough inherited context to understand the completed turn, but restrict its tools to a fenced set of read operations plus tightly scoped writes into the memory directory. The fork should save memories only when the main agent did not already persist the same content. This moves memory harvesting off the hot path without letting the background agent roam the rest of the workspace.

Key Rules

Example Application

When the user’s turn finishes with memory-worthy insights, dispatch this skill: the forked agent copies the last assistant message, runs the extraction prompt, and writes structured entries into memory/*.md while the parent stays in the REPL and accepts the next user question.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.