Skip to content

Remove XML tags from skill descriptions for Claude compatibility - #1259

Closed
YuliiaKovalova wants to merge 2 commits into
dotnet:mainfrom
YuliiaKovalova:fix/skill-description-xml-tags
Closed

YuliiaKovalova wants to merge 2 commits into
dotnet:mainfrom
YuliiaKovalova:fix/skill-description-xml-tags

Conversation

@YuliiaKovalova

Copy link
Copy Markdown
Member

Summary

Claude (claude.ai and Claude Code marketplace sync) rejects skill descriptions that contain XML tags and stores them with the angle brackets stripped. Four skills were reported after a marketplace sync.

  • Reworded the tag-like text in the four affected descriptions in plain language (no change to routing intent):
    • dotnet-advanced/vectorization: Vector<T> -> "the generic Vector type"
    • dotnet-blazor/configure-auth: <NotAuthorized> -> "NotAuthorized"
    • dotnet-msbuild/msbuild-modernization: <Compile Include> / <Import Project=...> reworded; > 50 lines -> "over 50 lines"
    • dotnet11/system-text-json-net11: GetTypeInfo<T>() / TryGetTypeInfo<T>(out ...) -> generic GetTypeInfo / TryGetTypeInfo overloads
  • Added a skill-validator check rule that errors on XML-like tags in a skill description, so this cannot regress. Plain comparisons such as >5s or >20 levels are not flagged.
  • Documented the rule in the create-skill authoring guide (description rules + checklist).

Descriptions that use >/< only as comparison operators (build-perf-diagnostics, eval-performance) are intentionally unchanged; they are not tags and were not reported.

Related issue

Fixes #1251

Validation

  • dotnet test in eng/skill-validator: 871 passed, 0 failed (includes 7 new tests for the XML-tag rule).
  • skill-validator check --plugin plugins/* with the repo's allow-lists: all checks passed (100 skills, 16 agents, 17 plugins).
  • Scanned every SKILL.md description (parsed YAML) for tag-like text: 0 remaining; all descriptions are still under 1,024 characters.

Checklist

  • I searched existing issues and pull requests to avoid duplicates.
  • I kept this pull request focused and avoided unrelated refactors.
  • I added or updated tests, evals, or documentation when changing skill or agent behavior.
  • I updated CODEOWNERS when adding or moving owned content. (N/A: no new content)
  • I updated all marketplace manifests when plugin metadata changed. (N/A: no manifest metadata changed)
  • I updated eng/known-domains.txt for any new external domains referenced by skill content. (N/A: no new domains)

Claude (claude.ai and Claude Code marketplace sync) rejects skill
descriptions that contain XML tags and strips the angle brackets. Reword
the four affected descriptions in plain language:

- dotnet-advanced/vectorization
- dotnet-blazor/configure-auth
- dotnet-msbuild/msbuild-modernization
- dotnet11/system-text-json-net11

Add a skill-validator check that errors on XML-like tags in a skill
description so this cannot regress, with tests, and document the rule in
the create-skill authoring guide.

Fixes dotnet#1251

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bcd44b69-8a83-470f-a43b-41606d2b67de
Copilot AI balanced review requested due to automatic review settings October 5, 2026 09:03
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Note

This PR is from a fork and modifies infrastructure files (eng/ or .github/).

Changes to infrastructure typically need to be submitted from a branch in dotnet/skills (not a fork) so that CI workflows run with the correct permissions and secrets.

Please consider recreating this PR from an upstream branch. If you don't have push access to dotnet/skills, ask a maintainer to push your branch for you.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The validator rejects some plain comparisons and misses valid underscore-prefixed XML tags.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Addresses Claude marketplace compatibility by removing XML-like text from skill descriptions and adding validation against recurrence.

Changes:

  • Rewords four descriptions while preserving routing intent.
  • Adds XML-like tag detection and seven test cases.
  • Documents the restriction in the authoring guide.
File Description
plugins/​dotnet11/​skills/​system-text-json-net11/​SKILL.md Rewords generic API references.
plugins/​dotnet-msbuild/​skills/​msbuild-modernization/​SKILL.md Replaces XML examples with plain language.
plugins/​dotnet-blazor/​skills/​configure-auth/​SKILL.md Removes NotAuthorized tag brackets.
plugins/​dotnet-advanced/​skills/​vectorization/​SKILL.md Rewords the generic Vector reference.
eng/​skill-validator/​tests/​Check/​SkillProfileTests.cs Tests tag rejection and comparison acceptance.
eng/​skill-validator/​src/​Check/​SkillProfiler.cs Adds description tag validation.
.agents/​skills/​create-skill/​SKILL.md Documents the rule and checklist item.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/skill-validator/src/Check/SkillProfiler.cs Outdated
Comment thread eng/skill-validator/src/Check/SkillProfiler.cs Outdated
…arisons

Address review feedback:
- Accept '_' as an XML name start so tags like <_Root /> are flagged.
- Match a tag name followed only by bare words or name=value attributes
  (plus comments, PIs and CDATA) instead of arbitrary text between
  brackets, so unspaced comparisons such as i<length && count>0 no longer
  fail the check.

Add regression cases for both.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bcd44b69-8a83-470f-a43b-41606d2b67de
Copilot AI balanced review requested due to automatic review settings October 5, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The validator still accepts XML tags containing Unicode element or attribute names.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment on lines +438 to +439
@"|</?[A-Za-z_][\w.:-]*(?:\[\]|\?)*" +
@"(?:[\s,]+[A-Za-z_][\w.:-]*(?:\[\]|\?)*(?:\s*=\s*(?:""[^""]*""|'[^']*'|[^\s""'<>=,]+))?)*" +
@YuliiaKovalova

Copy link
Copy Markdown
Member Author

Superseded by #1260, which is opened from a branch in dotnet/skills (this PR came from a fork and touches eng/ files). Review feedback from this PR is already included.

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.

Claude Code marketplace integration reports issues

2 participants