用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/carrot-foundation/schemas --skill check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | check |
| description | Use when running quality gates before committing, creating a PR, or validating the project builds correctly |
Run the full quality-gate pipeline for the schemas package and report any failures with context and suggested fixes.
Run the canonical command that executes every gate in order:
pnpm check
This runs the following steps sequentially via run-s:
eslint . --fix)prettier --write .)tsc --noEmit)cspell lint --no-must-find-files "src/**/*")npmPkgJsonLint .)pnpm build && node scripts/generate-ipfs-schemas.js)node scripts/hash-schemas.js)node scripts/update-examples.js)node scripts/validate-schemas.js)node scripts/verify-schema-versions.js)$ref pointers (node scripts/check-refs.js)node scripts/validate-schemas.js --data-only)vitest run)For faster execution when iterating:
pnpm check:parallel
This runs the same gates using run-p (parallel). Useful during development but may produce interleaved output.
If any files under .ai/ were modified, also run:
pnpm ai:check
This validates that canonical AI instructions are consistent across tool adapters.
| Step | Common Cause | Fix |
|---|---|---|
| lint:fix | Unused imports, missing semicolons | Usually auto-fixed; re-run to confirm |
| format | Formatting drift | Auto-fixed by the step; commit the changes |
| type-check | Type errors in Zod schemas or exports | Read the error, fix the source .ts file |
| spell-check | Unknown words in source | Add to .cspell.json words list or fix the typo |
| pkgJsonLint | Invalid package.json fields | Check npmpackagejsonlint.config.js for rules |
| generate-schemas | Zod schema errors or missing .meta() | Fix the Zod source schema; ensure every field has .meta() |
| hash-schemas | Stale hashes after schema change | Regenerate; this step updates hashes automatically |
| update-examples | Example JSON out of sync with schemas | Auto-updated; commit the changes |
| validate-schemas | Generated JSON schema is structurally invalid | Fix the Zod source; check $id URLs and $ref pointers |
| verify-schema-versions | Version mismatch between schema files | Align version fields in the Zod source |
| check-refs | Broken $ref pointers in generated schemas | Ensure referenced schemas exist and paths are correct |
| validate-examples | Generated example data doesn't match schema | Fix Zod source or generation logic, then rerun regeneration |
| test | Test failures or coverage below 100% | Fix failing tests; add missing coverage |
When a step fails:
pnpm <step-name>pnpm checkHusky runs lint-staged on pre-commit which covers a subset of these gates. Running pnpm check manually catches everything CI will check.