用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/carrot-foundation/schemas --skill rule-commit命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Schema version injection, $id format, and SCHEMA_VERSION environment variable
Generated JSON Schema structure — required fields, validation patterns, and $ref usage
Use when a task is complete and needs the full check, commit, and PR workflow
基于 SOC 职业分类
正在显示 SKILL.md
| name | rule-commit |
| description | Conventional commit messages with schemas-specific scopes |
Apply this rule whenever work touches:
*All commits must follow the Conventional Commits specification. This is enforced by commitlint via Husky commit-msg hook.
<type>(optional scope): <description>
[optional body]
[optional footer(s)]
| Type | When to use |
|---|---|
feat | New schema, field, or capability |
fix | Bug fix in schema validation or generation |
refactor | Code restructuring without behavior change |
docs | Documentation only (README, TSDoc, comments) |
test | Adding or updating tests |
chore | Maintenance (deps, config, CI scripts) |
build | Build system changes (tsup, scripts) |
ci | CI/CD pipeline changes |
perf | Performance improvements |
style | Formatting, whitespace, semicolons |
revert | Reverting a previous commit |
Use scopes to indicate which area of the codebase is affected:
schema — changes to Zod schema definitions or generated JSON schemasshared — changes to shared utilities, helpers, or base schemasScope is optional but encouraged for feat and fix types.
feat(schema): add mass-id data schema
feat(schema): add certificate nft ipfs schema definition
fix(shared): resolve UUID validation edge case for nil UUIDs
refactor(schema): extract location schema to shared module
test(schema): add boundary value tests for coordinates
docs: update installation instructions in README
chore: upgrade zod to 4.x
build: configure tsup for dual ESM/CJS output
ci: add schema validation step to pipeline
perf(shared): optimize uniqueBy for large arrays
style: fix formatting in shared schemas
Write the description as a command — what the commit does when applied:
GOOD: add mass-id data schema
GOOD: fix UUID validation for nil values
GOOD: remove deprecated legacy schema
BAD: added mass-id data schema
BAD: fixing UUID validation
BAD: removed deprecated legacy schema
The description starts with a lowercase letter:
GOOD: feat(schema): add participant role enum
BAD: feat(schema): Add participant role enum
GOOD: fix(shared): handle empty array in uniqueBy
BAD: fix(shared): handle empty array in uniqueBy.
Keep the full header (type + scope + description) under 100 characters. If the description is too long, move details to the commit body.
GOOD: feat(schema): add waste classification properties schema
BAD: feat(schema): add waste classification properties schema with contamination levels and measurement units
Each commit should address a single logical change. Do not mix unrelated changes:
GOOD (two commits):
feat(schema): add location schema with coordinates
test(schema): add location schema validation tests
BAD (one commit):
feat(schema): add location schema and fix UUID validation and update README
Use the body for additional context when the header alone is insufficient:
fix(shared): handle NaN in numeric schema validation
Zod's `.number()` validator accepts NaN by default. Added explicit
`.refine()` to reject NaN values in weight and distance fields,
matching the methodology's requirement for finite measurements.
For breaking changes, add ! after the type/scope and include a BREAKING CHANGE: footer:
feat(schema)!: rename mass_id to mass_id_data in exports
BREAKING CHANGE: The exported schema name changed from `MassIdSchema`
to `MassIDDataSchema`. Update imports accordingly.
Commitlint runs automatically via Husky on every commit. Invalid commit messages will be rejected.