Skip to content

Feature request: Skill tool should honor context: fork and agent: frontmatter fields #17283

Description

@robingedda

Summary

When a skill is invoked via the Skill tool, the context: fork and agent: frontmatter fields are ignored. The skill runs in the main conversation context instead of spawning the specified subagent.

Current Behavior

Given a SKILL.md with:

---
description: ...
context: fork
agent: Explore
user-invocable: true
---

When invoked via the Skill tool (e.g., /skill-name or programmatically), the skill instructions execute in the current conversation context. The agent: Explore specification is not honored.

Expected Behavior

When a skill specifies context: fork and agent: Explore (or another agent type), invoking that skill should spawn the specified subagent and run the skill instructions within that forked context.

Use Case

Skills that perform extensive codebase exploration benefit from running in an Explore agent context:

  • Keeps exploration results out of main conversation
  • Uses optimized model (Haiku) for read-only operations
  • Provides isolated conversation history

Currently, users must manually restructure skills as custom agents to achieve this behavior.

Environment

  • Claude Code CLI
  • Skills with context: fork and agent: frontmatter fields

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions