Skip to content

feat(validate): guard skills against T3 provider discovery pitfalls - #34

Merged
3metaJun merged 6 commits into
mainfrom
feat/t3code-skill-compat-and-session-context
Oct 6, 2026
Merged

3metaJun merged 6 commits into
mainfrom
feat/t3code-skill-compat-and-session-context

Conversation

@3metaJun

@3metaJun 3metaJun commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Problem

T3 Code lists provider-discovered skills. Cursor's and Antigravity's scanners silently drop a skill whose frontmatter YAML fails to parse (for example an unquoted description: foo: bar); only Claude repairs it. T3's composer also only forms a skill chip for names matching [a-zA-Z0-9][a-zA-Z0-9:_-]* that contain a letter. Nothing in mstack stopped a canonical skill from shipping frontmatter that these providers drop. T3 sessions also had no mstack guidance for preferring the app-owned t3-code MCP tools.

Solution

  • scripts/skill-compat-lib.mjs exports skillCompatProblems, a dependency-free check that flags plain name/description scalars that are invalid YAML (: , #, leading indicator) and names outside the T3 chip pattern. Quoted and block scalars are accepted. validate.mjs calls it in the existing frontmatter loop (one import, one line), and scripts/skill-compat.test.mjs covers it table-driven and is added to npm test.
  • docs/session-context/T3-CODE.md is advisory, opt-in routing for sessions where the t3-code MCP tools are present: delegate_task over run-role, link_pull_request + watch_pull_request (and unwatch_pull_request before handback) over the Bun watcher, no t3_thread_launch/create_threads for plain subagent requests, plus the T3 AGENTS.md hazards when the task is T3 Code itself. Tool names and rules were checked against the T3 source. It ships through the existing session-context artifact directory; no installer, profile, or skill changes.

Verification

  • npm test: 314 tests pass; validator passes all 53 skills.
  • npm run check-package: 274 files.

Model: Claude Sonnet 5.5
Harness: Claude Code

🤖 Generated with Claude Code

3metaJun and others added 6 commits October 6, 2026 13:28
T3 Code lists provider-discovered skills. Cursor and Antigravity drop a
skill whose frontmatter YAML fails to parse (only Claude repairs it), and
T3's composer only forms a skill chip for names matching
[a-zA-Z0-9][a-zA-Z0-9:_-]* with a letter. validate.mjs now rejects plain
name/description scalars that are invalid YAML (': ', ' #', leading
indicator) and names outside the chip pattern, leaving quoted and block
scalars alone.

Also add docs/session-context/T3-CODE.md, an opt-in advisory routing note
for sessions where the t3-code MCP tools are present.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Flag conditional indicators (-, ?, : followed by a space or tab), validate
continuation lines of multi-line plain scalars, and use [ \t] instead of \s
so Unicode spaces such as NBSP are not misread as YAML separators. Replace
the nested-mapping fixture with a genuine multiline string and add
regression cases including CRLF.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…alars

Report comment-only or empty name/description values, require quoted
scalars to terminate with only a comment after the closing quote, and
require block scalar headers to carry only indent/chomp indicators.
Reword the ' #' problem to say it truncates the value and document that
this is deliberately stricter than YAML.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reject double-quoted escapes outside the YAML 1.2 set (and \x, \u, \U with
the wrong digit count), and check that a block scalar has a non-empty body
indented under its key and at least as deep as an explicit indentation
indicator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When the key's own line holds no value, treat a leading | or > on the next
value-bearing line as the block header and validate its body.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A comment-only line indented below the block body ends the scalar instead
of failing as under-indented body text. Comment lines between a key and its
value are also ignored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@3metaJun
3metaJun merged commit d8f09ed into main Oct 6, 2026
9 checks passed
@3metaJun
3metaJun deleted the feat/t3code-skill-compat-and-session-context branch October 6, 2026 05:47
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