AGENT SKILL

verify

An integrated skill that runs the combined validation of build / typecheck / test / lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile/Makefile/lefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).

License 许可
MIT
所属仓库
ozzy-labs/skills
最近更新
2026-07-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
verify
description
An integrated skill that runs the combined validation of build / typecheck / test / lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile/Makefile/lefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).

02 资源文件 2

03 SKILL.md 正文

verify - Integrated validation (discovery chain + execution)

Performs the combined validation of "does build + typecheck + test + lint pass" in one shot. From an agent's perspective these are always needed together, so the former lint / test / lint-rules have been integrated into verify (ADR-0028 R4).

The determinism (the validation command discovery chain, source attribution, serial execution, and rendering of the result summary) is handled by the bundled verify.mjs engine (ADR-0028 R1, following the precedent of health-check.mjs / usage-check.mjs / skill-metrics.mjs). This SKILL.md is confined to the judgment layer — when to call the engine, how to report the results, and where to confirm with a human.

Principles

  • A single combined validation: verify always has the same intent (whether build + typecheck + test + lint pass). Selecting individual commands is left to the engine's discovery chain.
  • Discovery chain, no crossing stages: If a command is found at a higher-priority stage, only that stage is executed — it does not descend to lower stages. All commands found within the same stage are executed.
  • Explicit source attribution: Always include, in the report, which stage (source) each command was found at.
  • Works in consumer repos: Rather than relying solely on AGENTS.md assumptions, it falls back as far as package.json / task runners / language heuristics (#179 is absorbed by this).

Validation command discovery chain

The engine evaluates the following 4 stages in order from top to bottom, and settles on the first stage that produces a command (no crossing stages; everything within the same stage is executed):

Stage Source (source) Discovery target
1 agents-md Fenced code blocks / inline commands in AGENTS.md's 「検証」 section
2 package-json Among package.json's scripts: build / typecheck / test / lint (whichever exist; the package manager is determined from the lockfile to form <pm> run <script>)
3 task-runner The corresponding target (build / typecheck / test / lint; for lefthook, pre-commit / pre-push) in whichever of justfile > Makefile > lefthook.yaml exists first
4 language-heuristic go.mod→go build ./... + go test ./... / pyproject.toml+uv.lock→uv run pytest / Cargo.toml→cargo build + cargo test

If none of the stages find anything, report it as "not found" (do not execute).

Procedure

  1. Execute the verify.mjs in the same directory as this SKILL.md via Bash. In Claude Code that's ~/.claude/skills/verify/verify.mjs (dogfood: <repo>/.claude/skills/verify/verify.mjs):

    node <this skill's directory>/verify.mjs [--dry-run] [--json] [--repo-root=<dir>]
    
  2. By default the engine executes the discovered commands (with source attached) serially and outputs a formatted result summary to stdout. Present that output as-is (do not reformat or reinterpret it — rendering is the engine's responsibility).

  3. --dry-run only discovers (does not execute). Use it when you want to check "which commands are selected, from which source".

  4. If any command fails, present that fact as-is (command, source, error summary). Do not perform automatic fixing (if a lint auto-fix is needed, that's the responsibility of the discovered lint command itself).

Input

  • No arguments → serially executes the commands of the stage settled on by the discovery chain, and presents a result summary
  • --dry-run (alias --discover) → discovery only. Does not execute
  • --json → outputs structured JSON instead of a human-readable report (for programmatic integration / debugging use; can be used for mechanical judgment from drive / implement)
  • --repo-root=<dir> → validates a directory other than cwd

Output (key points of the JSON schema v1)

  • discovery.stage — the settled stage (agents-md / package-json / task-runner / language-heuristic / null)
  • discovery.commands[] — { command, source, kind } (source is the source, kind is build / typecheck / test / lint / other)
  • results[] — only when executed. { command, source, kind, status, ok, error }
  • ok — true if all commands pass, false if any fail, null if not executed (--dry-run / not found)

Per-extension lint rules (absorbed from the former lint-rules)

The discovery chain finds project-level commands. Per-file lint / format rules are absorbed into the engine as LINT_RULES (absorbing the former lint-rules skill):

Extension Command
.ts / .tsx / .js / .jsx / .json biome check --write <file>
.md markdownlint-cli2 --fix <file>
.yaml / .yml yamlfmt <file> && yamllint -c .yamllint.yaml <file>
.toml taplo format <file>
.sh shfmt -w <file> && shellcheck <file>

Notes

  • Does not read .env files.
  • The discovery chain is deterministic. Changes to the stage order / selection rules should be made together in the engine + this SKILL.md.
  • verify only selects and executes commands. It does not perform destructive operations (commit / push / merge).
  • It also works in consumer repos without an AGENTS.md 「検証」 section, since it falls back as far as package.json / task runner / language heuristics.

04 同仓库更多 Skills

ozzy-labs
ozzy-labs/skills

verify

An integrated skill that runs the combined validation of build / typecheck / test / lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile/Makefile/lefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).

★ 0
ozzy-labs
ozzy-labs/skills

usage-guard

Monitors Claude Code's Usage Limit (5-hour = Current / weekly = Weekly), pauses work when it exceeds 95%, and automatically resumes once the reset restores headroom. Bundles an engine form that a caller such as drive Reads at a checkpoint, and a standalone form, `/usage-guard "<continuation command>"`, that guards arbitrary work. Claude-only (depends on the OAuth usage-rate endpoint + ScheduleWakeup).

★ 0
ozzy-labs
ozzy-labs/skills

topics

Selects GitHub topic candidates by having the `topics.mjs` engine perform constraint validation, popularity measurement, broad+narrow / singular-plural comparison, and hardcoded ozzy-labs conventions, then applies them via `gh repo edit --add-topic` following the policy's `externally-visible` gate (default batch-confirm). Scope is limited to use within ozzy-labs.

★ 0
ozzy-labs
ozzy-labs/skills

skill-observability

Defines the skill observability event contract (event.schema.json) and emit substrate (obs-emit.mjs). The SSOT for the measurement layer of the skill improvement loop. Referenced by other skills and hooks.

★ 0
ozzy-labs
ozzy-labs/skills

skill-metrics

Aggregates the local observability event log (~/.agents/observability/events.jsonl) and presents, read-only, per-skill invocation counts and notable events (fallback / HITL rejection / loop cap reached / abort). Fires on "show me the skill metrics," "aggregate the observability results," "which skills get used the most?" Does not send anything.

★ 0
ozzy-labs
ozzy-labs/skills

ship

Runs verification, commit, and PR creation all at once. An integrated pipeline that runs verify (build + type + test + lint) → commit → PR creation in sequence against the changes.

★ 0