ソース情報
- リポジトリ
- videojs/v10
- ソースの最終更新活動
- 2026年8月21日 21:56
- 検出された SKILL.md の言語
- 英語
- スター
- 933
- フォーク
- 91
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SOC 職業分類に基づく
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/videojs/v10 --skill transform-rolldown-codeコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
| name | transform-rolldown-code |
| description | Transform code. Use for Rolldown. |
Use the incoming Oxc AST for analysis and its paired MagicString for source edits.
code.includes(...) guard before accessing meta.ast so parsing stays lazy.meta.ast only when syntax analysis is required. It is a read-only Oxc Program parsed according to meta.moduleType and supports JavaScript, JSX, TypeScript, and TSX syntax.start and end offsets with meta.magicString.overwrite, remove, appendLeft, or related edits. Both values describe the same incoming code string.{ code: magicString }. Edits are ignored when the hook does not return it. Return null when nothing changed.transform. Use renderChunk only when the replacement depends on final generated code, chunk filenames, output format, or the rendered chunk graph; never move ordinary AST transforms there.Treat meta.ast as read-only. Mutating its nodes does not change output because Rolldown does not print the modified JavaScript AST.
The Oxc AST is syntactic. It includes TS and TSX nodes but has no TypeScript Program, TypeChecker, resolved symbols, inferred types, or cross-file semantics.
For true AST-to-AST transforms, use an appropriate parser, transformer, and code generator, then return generated code with a source map. Every source-changing transform should provide a map unless it intentionally documents a sourceMap: false option; returning native MagicString provides one automatically. Use map: null only when the edit does not move code.
Treat meta.ast and meta.magicString as a required contract in repository-owned Rolldown builds and fail clearly when either is unexpectedly unavailable. Only synthesize or guard the metadata in an intentional compatibility adapter, such as the Vite adapter.
Explicitly enable Rolldown's native implementation in every repository-owned input config that runs these transforms:
experimental: {
nativeMagicString: true,
}
For tsdown, put the same option under inputOptions.experimental. Keep returning the native object directly so Rolldown can generate and compose source maps off the main thread. Enable output sourcemap: true when the build should emit map files. See the native MagicString guide and source transformation guide.
Vite does not forward Rolldown's ast or magicString transform metadata in the pinned version, even when its build enables native MagicString. Continue to adapt these transforms through packages/vjsc/src/vite/oxc.ts for Vite serve and build.
import { walk } from 'oxc-walker';
export const plugin = {
name: 'example-transform',
transform(code, id, meta) {
if (!code.includes('$compile')) return null;
const ast = meta.ast;
const magicString = meta.magicString;
if (!ast || !magicString) {
throw new Error('example-transform requires Rolldown AST metadata and native MagicString.');
}
let changed = false;
walk(ast, {
enter(node) {
if (
node.type === 'CallExpression' &&
node.callee.type === 'Identifier' &&
node.callee.name === '$compile'
) {
magicString.overwrite(node.callee.start, node.callee.end, 'compile');
changed = true;
}
},
});
return changed ? { code: magicString } : null;
},
};
Think of the hook as:
incoming code
-> Oxc AST: find and understand syntax
-> MagicString: edit source using AST ranges
-> return edited code
Run the transform through a real Rolldown build with native MagicString explicitly enabled. Assert changed and unchanged modules, relevant JS/JSX/TS/TSX forms, source maps when consumers need them, and a clear failure when required metadata is unavailable.
Input: "Rename $compile() calls without changing matching strings or comments."
Output: A filtered transform that finds call expressions through meta.ast, overwrites the callee ranges through meta.magicString, returns the edited value, and passes a real Rolldown build test.
Write generated Video.js API reference pages. Use for components, hooks, controllers, factories, builder compatibility, demos, or extracted JSDoc.
Create VJSC modules. Use for UI and styles.
Implement an SPF use-case composition. Use when a delivery scenario combines feature variants and requires composition, tests, and status updates.