ychampion/cskill-agents/forked-skill-execution-with-isolated-context

Claude Code and agent skill by ychampion/cskill-agents

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Run SkillTool slash commands inside a forked sub-agent so the skill has isolated budget, telemetry, and lifecycle.

Install

npx vskill@latest install ychampion/cskill-agents/forked-skill-execution-with-isolated-context

SKILL.md

SKILL: Forked Skill Execution With Isolated Context

Domain: agentic-loop Trigger: Load this skill when SkillTool needs to wrap a prompt command marked with context:'fork' into a sub-agent run that cannot touch the parent session state. Source Pattern: Distilled from reviewed subagent orchestration, isolation, and lifecycle implementations.

Core Method

Merge the command metadata (model, effort, telemetry tags) into a cloned agent definition, record the forked skill invocation, and run the skill prompt through run agent so it executes in a dedicated loop with its own agent id. Buffer the streaming messages, emit progress when tool content appears, and once run agent completes extract and return a clean result string after releasing the temporary message buffer and invoked-skill state. The parent context still honors overrides (allowed tools, effort, model suffix) via context modifier, while telemetry uses sanitized names and agent IDs so the forked execution is auditable separately.

Key Rules

  • Only fork a skill when command context 'fork'; treat every other slash command as inline to avoid extra sub-agents.
  • Feed the prepared prompt messages, modified get app state, and context options tools into run agent, tagging emitted messages with tool use id so downstream renderers can tie progress to this tool call.
  • Emit progress events for every normalized message that contains tool_use/tool_result content so UI components can show streaming updates even though SkillTool owns the loop.
  • After completion, clear invoked skills for the forked agent, compute result text defensively, and include the agent id in the returned tool result so callers can correlate logs or diagnostics.

Example Application

If a CLI-style review skill needs to spawn its own interpreter to run analysis on a repo snapshot, mark it as context:'fork', let SkillTool merge its effort override, and rely on this method to keep the review sub-agent separate while streaming progress back to the caller.

Anti-Patterns (What NOT to do)

  • Do not reuse run agent from the parent loop without copying the context; that leaks token budget and prompt state between skills.
  • Do not skip clear invoked skills for agent after forked completion, otherwise compaction will unexpectedly rehydrate stale skill content.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
36
Repository forks
7
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ychampion/cskill-agents/forked-skill-execution-with-isolated-context/badge)](https://verified-skill.com/skills/ychampion/cskill-agents/forked-skill-execution-with-isolated-context)

Something wrong with this skill or its page? Tell us.