Agent Skills › videojs/video.js › design-api

design-api

GitHub

用于设计 Video.js TypeScript API,涵盖公共接口、类型推断、状态管理及扩展点等,旨在优化开发者体验与代码质量。

.agents/skills/design-api/SKILL.md videojs/video.js

触发场景

设计新的 TypeScript API 接口 优化现有 API 的类型安全性与推断能力 评估 API 的可组合性与扩展性

安装

npx skills add videojs/video.js --skill design-api -g -y
更多选项

非标准路径

npx skills add https://github.com/videojs/video.js/tree/main/.agents/skills/design-api -g -y

不安装直接使用

npx skills use videojs/video.js@design-api

指定 Agent (Claude Code)

npx skills add videojs/video.js --skill design-api -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": "design-api",
    "description": "Design Video.js TypeScript APIs. Use for public shape, inference, state, extension points, middleware, composition, or ergonomics."
}

API design and DX

Inspect the current call sites, types, tests, exports, and relevant design records before applying general guidance. Existing local contracts beat generic patterns.

Default priorities

  1. Correct observable behavior
  2. Type safety and useful inference
  3. A small, coherent concept set
  4. Consistency with adjacent Video.js APIs
  5. Composable escape hatches and tree-shakable output

Prefer config objects once positional arguments become ambiguous, explicit contracts over hidden coupling, and inference over required annotations. Avoid adding a plugin system when ordinary composition or a narrow extension point solves the problem.

Load references conditionally

  • General API tradeoffs: references/principles.md
  • Type inference or public type shape: references/typescript.md
  • Store, signal, or state architecture: references/state.md
  • Middleware, builders, adapters, or lifecycles: references/extensibility.md
  • Suspected design smell: references/anti-patterns.md
  • Prior-art comparison: references/libraries.md and, only if useful, references/voices.md Do not load every reference by default.

Example

Input: “Design a typed selector API for the store.”

Output: A concrete public shape with inference behavior, compatibility tradeoffs, extension points, and tests to prove the contract.

版本历史

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

同 Skill 集合

.agents/skills/change-spf-behavior/SKILL.md
.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/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
3992b1d0
收录时间
2026-10-20 08:02

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