Agent Skills › videojs/video.js › change-spf-behavior

change-spf-behavior

GitHub

指导修改SPF播放引擎行为,涵盖更新、重构、拆分或合并职责。通过标准化工作流确保状态、生命周期及测试的正确性,并执行相关构建与测试命令。

.agents/skills/change-spf-behavior/SKILL.md videojs/video.js

触发场景

需要更新或重构SPF行为逻辑 拆分或合并SPF职责与信号处理

安装

npx skills add videojs/video.js --skill change-spf-behavior -g -y
更多选项

非标准路径

npx skills add https://github.com/videojs/video.js/tree/main/.agents/skills/change-spf-behavior -g -y

不安装直接使用

npx skills use videojs/video.js@change-spf-behavior

指定 Agent (Claude Code)

npx skills add videojs/video.js --skill change-spf-behavior -a claude-code -g -y

安装 repo 全部 skill

npx skills add videojs/video.js --all -g -y

预览 repo 内 skill

npx skills add videojs/video.js --list

SKILL.md

Frontmatter
{
    "name": "change-spf-behavior",
    "description": "Change SPF playback-engine behaviors. Use when updating, refactoring, splitting, or merging responsibilities, signals, lifecycle, cleanup, or composition."
}

Change an SPF behavior

Treat code and tests as implementation truth. Read the behavior, composition site, state/context slots, helpers, and tests, then load only the relevant file from internal/design/spf/conventions/.

Before acting, read the one detailed workflow that matches the requested change:

  • Purpose expands or changes: references/update.md
  • Purpose stays fixed while implementation improves: references/refactor.md
  • One responsibility splits by type or concern: references/split.md
  • Two responsibilities may become one: references/merge.md
  1. State the current purpose, intended delta, and observable business rules.
  2. Map inputs, writes, lifecycle gates, cleanup, ordering, and source-reset rules.
  3. Choose the smallest destination shape that preserves those constraints.
  4. Pin observable behavior with tests before changing implementation.
  5. Re-read the final behavior without the diff and verify ownership, cleanup, composition, naming, and coverage.

For a split, name the ownership axis and cross-boundary invariants. For a merge, confirm the result owns one coherent purpose; extract a helper when only an algorithm is shared. Ask for direction when alternatives materially change ownership or public contracts.

Run the narrow affected tests, then as applicable:

pnpm -F @videojs/spf test
pnpm -F @videojs/spf build
pnpm -F @videojs/spf size

Example

Input: “Split source cleanup out of the playback lifecycle behavior.”

Output: A documented ownership boundary, pinned invariants, focused implementation changes, and proportional SPF checks.

版本历史

  • 8a0a3d8 当前 2026-10-20 08:02

同 Skill 集合

.agents/skills/commit-pr/SKILL.md
.agents/skills/configure-vite-plus/SKILL.md
.agents/skills/create-html-component/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-react-component/SKILL.md
.agents/skills/create-skill/SKILL.md
.agents/skills/create-spf-behavior/SKILL.md
.agents/skills/design-api/SKILL.md
.agents/skills/document-spf-feature/SKILL.md
.agents/skills/document-spf-use-case/SKILL.md
.agents/skills/implement-accessible-ui/SKILL.md
.agents/skills/implement-spf-feature/SKILL.md
.agents/skills/implement-spf-use-case/SKILL.md
.agents/skills/implement-ui-transition/SKILL.md
.agents/skills/investigate-issue/SKILL.md
.agents/skills/maintain-agent-docs/SKILL.md
.agents/skills/maintain-tests/SKILL.md
.agents/skills/maintain-vjsc-skin-gaps/SKILL.md
.agents/skills/review-accessibility/SKILL.md
.agents/skills/review-api/SKILL.md
.agents/skills/review-branch/SKILL.md
.agents/skills/review-docs/SKILL.md
.agents/skills/review-html-component-design/SKILL.md
.agents/skills/review-html-component/SKILL.md
.agents/skills/review-react-component-design/SKILL.md
.agents/skills/review-react-component/SKILL.md
.agents/skills/write-api-reference/SKILL.md
.agents/skills/write-design-doc/SKILL.md
.agents/skills/write-docs/SKILL.md
.agents/skills/write-html-component-design/SKILL.md
.agents/skills/write-locale-translations/SKILL.md
.agents/skills/write-react-component-design/SKILL.md
.agents/skills/write-rfc/SKILL.md
.agents/skills/create-rolldown-plugin/SKILL.md
.agents/skills/create-vite-plugin/SKILL.md
.agents/skills/create-vjsc-component/SKILL.md
.agents/skills/transform-rolldown-code/SKILL.md

元信息

文件数
0
版本
8a0a3d8
Hash
4eac5c5c
收录时间
2026-10-20 08:02

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-02 11:58
浙ICP备14020137号-1