Dynamic content expansion is not recursive in skill/command files

Resolved 💬 2 comments Opened Jan 26, 2026 by sstraus Closed Feb 28, 2026

Description

Dynamic content expansion using the !command`` syntax does not work recursively. When a command file dynamically includes a skill file, any dynamic content within that skill file is not expanded.

Steps to Reproduce

  1. Create a skill file with dynamic content:

skills/test-dynamic/SKILL.md:

---
name: test-dynamic
description: Test skill
---

# Dynamic Test

## Test 1: Simple echo
!`echo "DYNAMIC_WORKS_1"`

## Test 2: Date
!`date +%Y-%m-%d`
  1. Create a command wrapper that includes it:

commands/test-dynamic.md:

---
name: wiz:test-dynamic
description: Test command
---

!`cat ${CLAUDE_PLUGIN_ROOT}/skills/test-dynamic/SKILL.md`
  1. Invoke the command: /wiz:test-dynamic

Expected Behavior

The dynamic content inside the skill file should be expanded:

# Dynamic Test

## Test 1: Simple echo
DYNAMIC_WORKS_1

## Test 2: Date
2026-01-26

## Test 3: Hostname
my-hostname

Actual Behavior

Only the first level of dynamic content (the cat command) is expanded. The skill file's content is included, but its own dynamic content remains as raw template syntax:

# Dynamic Test

## Test 1: Simple echo
!`echo "DYNAMIC_WORKS_1"`

## Test 2: Date
!`date +%Y-%m-%d`

Impact

This affects plugin architectures where:

  • Command wrappers dynamically include skill files (this works)
  • Skills need to include dynamic content like dates, environment info, or other computed values (this does NOT work)

Environment

  • Claude Code CLI
  • macOS (Darwin 25.2.0)

Suggested Fix

Dynamic content expansion should be applied recursively to fully expand all !command`` syntax in the final composed content before presenting it to the model.

View original on GitHub ↗

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