Repository navigation
Conversation
Angle brackets aren’t allowed in a skill description, so claude.ai and Claude Code end up seeing two different descriptions. Add when to use the skill, which helps it trigger.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
descriptioninSKILL.mdcontains<important if>, which triggers:claude.ai saves the description with the angle brackets removed, while Claude Code reads the original text from the file. The two products end up with different descriptions, which can change when the skill triggers.
Why descriptions can't contain XML-like tags
Skill names and descriptions are loaded into the system prompt at startup, and the Agent Skills standard recommends an XML format for Claude models, roughly:
Anthropic doesn't document the reason for the rule, but a raw tag like
<important if>inside that block would read as markup rather than text. In practice, claude.ai strips the brackets while Claude Code keeps them, so the two products end up with different descriptions. Removing the tag avoids both problems.Why it matters
Anthropic's skill authoring guide lists "Cannot contain XML tags" as a requirement for
description(alongside non-empty and max 1,024 characters). The description is loaded into the system prompt at startup and is what Claude uses to decide whether to trigger the skill, so it needs to be valid and identical everywhere.Change
<important if>with"important if"in the frontmatter description.<important if>blocks are still valid there, since the rule applies only to frontmatter fields.Reference
https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#skill-structure