一键导入
library-code
Publishable npm packages. Use when designing exports, public API types, package entrypoints, dependencies, tests, or release-facing library code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Publishable npm packages. Use when designing exports, public API types, package entrypoints, dependencies, tests, or release-facing library code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Skill writing principles. Use when creating, editing, or reviewing any SKILL.md.
Skill rule extraction and creation. Use when the user says /learn.
Kysely database queries. Use when writing, reviewing, or debugging Kysely selects, mutations, joins, transactions, filters, or aggregates.
Frontend components and Tailwind. Use when creating, reviewing, refactoring, splitting, or organizing React components, shared components, component folders, or Tailwind classes.
TanStack Query in React. Use when implementing or reviewing queries, mutations, invalidation, or query hooks.
Lint and optimize existing skills. Use when the user says /skill-linter.
| name | library-code |
| description | Publishable npm packages. Use when designing exports, public API types, package entrypoints, dependencies, tests, or release-facing library code. |
Public libraries are contracts. Prefer explicit public surfaces, boring packaging, and zero import-time surprises.
This skill overrides the general preference for inferred return types on exported APIs.
Annotate return types on exported functions and methods that are part of the package API. Internal non-exported functions may rely on inference.
Use controlled named exports. Do not use export *.
Keep one public export point at the package root when the package is small. Internal modules should not add barrel files.
Export public types deliberately. Do not leak internal helper types through convenience exports.
Importing the package must not perform work: no network calls, file reads, config loading, global initialization, timers, listeners, or mutable singleton setup.
Expose constructors, factories, or explicit setup functions so the consumer controls initialization.
Independent features should be independently importable/tree-shakeable when the package has meaningful subdomains. Do not split entrypoints before there is a real public boundary.
Dependencies the consumer must share with the library, such as React, are peer dependencies.
Runtime implementation dependencies are regular dependencies.
Build/test/type tooling stays in devDependencies.
Use optional peer dependencies only when the package can run without that peer and gates the feature at runtime.
Test the public API as consumers use it. Do not test private helpers just to preserve implementation shape.
Every public export should have at least one behavior test or an explicit reason it is type-only.
Edge cases should come from the contract: absent input, empty collections, invalid values, and boundary conversions. Do not invent edge cases unrelated to the domain.
package.json exports must match the intended public surface.
Do not publish files that are not part of runtime, type declarations, docs, or intentional examples.