skills: frontmatter field in custom agents does not inject skill content into subagent context

Resolved 💬 6 comments Opened Apr 10, 2026 by 100parik Closed May 12, 2026

Description

The skills: frontmatter field in custom agent .md files does not inject skill content into the subagent's system prompt/context, despite documentation stating it should.

Steps to reproduce

  1. Create a skill at ~/.claude/skills/ui-ux-pro-max/SKILL.md with valid frontmatter:
---
name: ui-ux-pro-max
description: "UI/UX design intelligence..."
---

# UI/UX Pro Max - Design Intelligence

Comprehensive design guide for web and mobile applications...
  1. Create a custom agent at ~/.claude/agents/frontend.md:
---
name: frontend
description: "Frontend agent..."
tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet
maxTurns: 30
skills:
  - ui-ux-pro-max
---

# Frontend Agent
You are a frontend agent with UI/UX skills.
  1. Spawn the agent via Agent tool with subagent_type: "frontend"
  1. Ask the agent: "Do you see the content of skill ui-ux-pro-max in your context? Search for 'Comprehensive design guide'"

Expected behavior

Per documentation:

"The full content of each skill is injected into the subagent's context"

The subagent should have the full SKILL.md content in its system prompt.

Actual behavior

The subagent reports:

  • No skill content found in context
  • Only sees references to skill file paths from the agent's body text
  • Skill tool is not available to the subagent
  • Specific strings from SKILL.md ("Comprehensive design guide", "161 color palettes", "bento grid") are not present

Environment

  • Claude Code: latest (as of 2026-04-10)
  • OS: Ubuntu 24.04
  • Model: opus (parent) → sonnet (subagent)
  • Skill location: ~/.claude/skills/ui-ux-pro-max/SKILL.md
  • Agent location: ~/.claude/agents/frontend.md

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗