Skip to content

fix(hub): read the same tags for drafts and the index - #909

Merged
runkids merged 2 commits into
mainfrom
runkids/hub-draft-root-tags
Nov 14, 2026
Merged

runkids merged 2 commits into
mainfrom
runkids/hub-draft-root-tags

Conversation

@runkids

@runkids runkids commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label)

Linked Issue

Follow-up to #901. No issue.

What changed

skillshare hub index and the dashboard hub builder's draft candidates now read a skill's tags with one reader, readSkillTags.

SKILL.md Index before Draft before Both now
tags: git, review git, review none git, review
tags: [git, review] [git, review] git, review git, review
tags: block list none git, review git, review
metadata.tags: [hidden] only none hidden none
tags: [git, review] with another line YAML rejects [git, review] none git, review
  • The reader takes the root tags field only. A list comes from the decoded frontmatter; the comma form comes from the existing line scan, which now also unwraps a one-line list.
  • skill-format.md gains one sentence in en, ja, ko, zh-Hans and zh-Hant: a YAML list works too, and tags under metadata is custom data.

Why

The same skill could publish different tags depending on whether it went through hub index or a draft. The documented comma form did not reach drafts at all. After #901 the index ignores metadata, while drafts still let metadata.tags replace the root field.

Behaviour change

A draft no longer takes tags from metadata.tags. That placement was never documented. Move such tags to the top-level tags field.

Validation

In a temporary container from the devcontainer image, mounted on this branch's worktree:

  • TestDraftAndIndexReadSameTags failed on every row before the change and passes after it.
  • make check passed on the committed tree.
  • python3 scripts/ai-context.py check passed on the host.

Not run: the website production build (one added sentence per locale) and a manual check in the dashboard hub builder.

Not covered

  • A SKILL.md with a blank line before the opening ---. Drafts used to read a tag list from it; the index never did, and now neither does. The Agent Skills format requires the file to begin with the frontmatter.
  • The search preview of a remote skill (internal/search/preview.go) reads the comma form and a one-line list, not a block list. Unchanged here.
  • A comma-form value with a trailing # comment keeps the comment in the last tag. Unchanged here.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

The index and the draft builder read a skill's tags with different readers,
so the same SKILL.md could publish different tags depending on the path:

- The index accepted only the comma form (tags: git, workflow). A YAML list
  became "[git" and "review]", and a block list produced nothing.
- Drafts accepted only a YAML list, so the documented comma form produced no
  tags, and metadata.tags replaced the root field. After #901 the index
  ignores metadata, which made the two disagree there as well.

Both now call readSkillTags. It reads the root field only, in either form:
a list comes from the decoded frontmatter, and the comma form from the
existing line scan. The scan also unwraps a one-line list, so a skill whose
frontmatter YAML rejects on another line (for example an unquoted colon in
the description) no longer publishes bracketed fragments.

Tags under metadata are custom data and are not read by either path. The
skill format page says so in all five locales.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T15:42:56.773817Z 9abdadc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runkids
runkids merged commit be8f8b2 into main Nov 14, 2026
9 checks passed
@runkids
runkids deleted the runkids/hub-draft-root-tags branch November 14, 2026 15:52
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