repo-verify
Discover every registry hard skill (and which run in check:all), then run the full repo verification pipeline — preferring package.json verify, else TypeScript, lint, format check, test:coverage (or test), check:all, build. Uses hard/.no-auto-run; invoke via npm run repo-verify, not as part of check:all.
- License 许可
- MIT
- 所属仓库
- midyan/skissue
- 最近更新
- 2026-05-18
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- repo-verify
- description
- Discover every registry hard skill (and which run in check:all), then run the full repo verification pipeline — preferring package.json verify, else TypeScript, lint, format check, test:coverage (or test), check:all, build. Uses hard/.no-auto-run; invoke via npm run repo-verify, not as part of check:all.
02 资源文件 1
- 参考文档INDEX.md463 B
03 SKILL.md 正文
repo-verify
Meta verification for repositories that use this registry pattern:
- Discover — scan
registry/*/hard/index.tsand report which skills are included innpm run check:all(viaregistry/runner.ts) vs excluded byhard/.no-auto-run. - Plan — if
package.jsondefinesscripts.verify, use that as the single source of truth for static checks, tests with coverage, harness, and build. Otherwise run a fallback chain:tsc --noEmit(whentsconfig.jsonexists), thenlint,format:check,test:coverageif defined elsetest,check:all,build— only for scripts that exist. - Execute — run the plan (unless
--plan/--dry-run).
This skill does not replace individual validators; it orchestrates them so agents and humans have one entry point that matches CI when verify is defined.
CI and local gate
Run the full pipeline before sharing commits: npm run verify, or npm run repo-verify when you want the discovery table plus the same run (this registry defines both).
Git hooks: run verification on pre-push
Agents should configure Husky pre-push so the repo-verify / verify pipeline runs automatically before git push, not only when invoked manually or from pre-commit.
| Hook | Typical use |
|---|---|
| pre-commit | Fast, commit-local steps (formatters, update-skill-checksums, lint-staged) |
| pre-push | Full gate: npm run repo-verify (or npm run verify if repo-verify is absent) |
Setup (Husky already installed with a prepare script):
- Add an executable
.husky/pre-pushat the repo root. - Run
npm run repo-verifywhenpackage.jsondefinesscripts.repo-verify; otherwise runnpm run verify(or the closest aggregate your project uses).
Example .husky/pre-push:
#!/usr/bin/env sh
set -eu
npm run repo-verify
If the project has no repo-verify script, use:
#!/usr/bin/env sh
set -eu
npm run verify
Why pre-push: repo-verify can be slower than a minimal pre-commit (discovery + tests + coverage + check:all). Blocking push catches CI failures before the remote updates while keeping commits lightweight.
If adding this hook in a repo that lacks it: create the file, chmod +x .husky/pre-push, and confirm git push triggers the script (a failing step must exit non-zero so the push aborts).
When to use
- Before a PR or release when you want everything (not only
check:all). - When onboarding: see which hard skills exist and which are in the default harness runner.
- After adding a new
registry/<id>/hard/skill — confirm it appears in discovery output.
Invocation
npm run repo-verify
npx tsx registry/repo-verify/hard/index.ts
| Flag | Meaning |
|---|---|
--plan, -n, --dry-run |
Print what would run; do not execute |
--discover, --list-skills |
Only print the skill discovery table; exit 0 |
Why hard/.no-auto-run?
If this script were auto-run by check:all, it would typically invoke npm run verify, which already runs check:all — recursion. Keeping repo-verify out of the runner avoids that. npm run verify remains the CI/local aggregate; repo-verify adds discovery + the same run with explicit reporting.
See also
- docs/HARNESS.md — harness commands and invariants for this repo
- hard/README.md — executable contract
- hard-skills — authoring
hard/checks - implement-ai-harness — harness rollout
04 同仓库更多 Skills
validate-shell-exec
Restrict child_process.spawn/exec to approved modules (e.g. shell/tmux helpers) so subprocess usage stays centralized.
validate-registry-hard
Validates registry.json shape and that each skill path contains SKILL.md at the skill root.
validate-registry
Keep root registry.json consistent with on-disk skill folders so installs and docs do not drift.
validate-naming
Enforce kebab-case filenames and PascalCase type names under src/; reports naming drift for consistency.
validate-logging
Prefer structured logging over raw console.* outside approved CLI entrypoints; keeps observability consistent.
validate-links
Scan markdown for broken relative links across the repo. Run via npm run check:links or the harness hard skill.