Skip to content

fix: add allowed-tools frontmatter so AskUserQuestion works in Claude Code#66

Open
MageByte-Zero wants to merge 1 commit into
zarazhangrui:mainfrom
MageByte-Zero:fix/allowed-tools-frontmatter
Open

fix: add allowed-tools frontmatter so AskUserQuestion works in Claude Code#66
MageByte-Zero wants to merge 1 commit into
zarazhangrui:mainfrom
MageByte-Zero:fix/allowed-tools-frontmatter

Conversation

@MageByte-Zero

Copy link
Copy Markdown

Problem

In newer versions of Claude Code, skills cannot use tools like AskUserQuestion unless they are explicitly declared in the allowed-tools frontmatter field. Without this, the skill runs in a restricted environment where interactive questions silently fail.

This means the presentation design phase — where the skill asks users to choose themes, color schemes, and visual styles — stops working entirely.

Fix

Add one line to the SKILL.md frontmatter:

allowed-tools: Read, Write, Edit, Bash, AskUserQuestion

Relation to PR #37

PR #37 (open) addresses the same symptom by clarifying text references in the skill body. This PR takes the correct approach: adding the YAML frontmatter that Claude Code enforces at the runtime permission level. Both could coexist but this fix addresses the root cause.

Testing

Tested locally: after adding this frontmatter, AskUserQuestion invocations in the skill correctly present multiple-choice prompts to the user. Without it, the tool calls are silently skipped.

… Code

In newer versions of Claude Code, tools like AskUserQuestion are not
available to skills unless explicitly listed in the allowed-tools
frontmatter field. Without it, the skill cannot prompt users with
multiple-choice questions during the presentation design phase.

Differs from PR zarazhangrui#37: that PR only clarifies text — this PR adds the
required YAML frontmatter that Claude Code enforces at the runtime level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant