本文へ移動
cccskills
無料GitHub で公開

bikeshed-conversion

Guidelines for converting W3C specs to Bikeshed format. Covers anchor ID preservation, dfn handling, and common pitfalls. Read this before any Bikeshed conversion or migration work.

日本語の概要は準備中です。原文の説明を表示しています。

w3c/web-performanceスター 430(GitHub 430 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(3)

  • SKILL.md2.8 KB
  • bikeshed-conversion/SKILL.md3.6 KB
  • publish-wg-minutes/SKILL.md2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Bikeshed Conversion

Preserving Anchor IDs

When converting a spec to Bikeshed, anchor IDs used by other specifications must be preserved. Bikeshed auto-generates IDs for <dfn> elements based on their text content, but these auto-generated IDs often differ from the IDs that were in the original spec. Other specs link to these IDs, so changing them silently breaks cross-spec references.

The Problem

Bikeshed generates IDs like dfn-wall-clock from <dfn>wall clock</dfn>, but the original spec may have used a different ID or no explicit ID (relying on the HTML spec's own ID generation). When other W3C specs reference anchors like #dfn-wall-clock, #dom-performance, or #dfn-coarsen-time, those links break if the IDs change.

The Fix

Always add explicit id attributes to <dfn> elements to preserve the anchors other specs depend on:

<!-- BAD: Bikeshed auto-generates an ID that may differ from the original -->
<dfn data-export>wall clock</dfn>

<!-- GOOD: Explicit ID preserves the anchor -->
<dfn data-export id=dfn-wall-clock>wall clock</dfn>

Common ID Patterns to Preserve

Based on w3c/hr-time#173, these are typical ID patterns that get lost:

TypePatternExample
Concept definitionsdfn-{name}id=dfn-wall-clock, id=dfn-monotonic-clock, id=dfn-duration
Algorithm definitionsdfn-{algorithm-name}id=dfn-coarsen-time, id=dfn-duration-from
IDL typedefsdom-{typename}id=dom-domhighrestimestamp, id=dom-epochtimestamp
IDL interfacesdom-{interface}id=dom-performance
IDL blocksidl-def-{name}id=idl-def-domhighrestimestamp
Compound conceptsdfn-{hyphenated}id=dfn-current-high-resolution-time, id=dfn-relative-high-resolution-coarse-time

Checklist

When converting a spec to Bikeshed:

  1. Inventory all <dfn> elements in the original spec and note their IDs
  2. Check for cross-spec references — search other W3C specs that link to this spec's anchors (use xref or grep the spec's URL in other repos)
  3. Add explicit id attributes to every <dfn> that had an ID in the original, matching the original ID exactly
  4. Verify after conversion — build the Bikeshed output and confirm all anchors from the original spec still resolve
  5. Check data-dfn-for scoping — Bikeshed uses data-dfn-for to scope definitions; make sure scoped dfns also retain their original IDs (e.g., id="wall-clock-unsafe-current-time" for <dfn data-dfn-for="wall clock">unsafe current time</dfn>)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Process and publish WebPerfWG meeting minutes from Google Docs zip exports. Read this before handling any WebPerfWG meeting minute zip files.

日本語の概要は準備中です。原文の説明を表示しています。

w3c/web-performance4302026年10月8日 更新

w3c のスキルをすべて見る

このスキルの問題を報告する