Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Verify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/enorm-labs-verify)
---
name: verify
description: "The full pre-PR sequence; the prompt is the check list, and it runs every gate the diff touches"
---
# Verify
Run the full pre-PR verification sequence — backend, frontend, documents, infrastructure, chart — then report what passed, what failed, and the first
actionable failure. **This file is the check list**; a subset chosen by hand has cost a CI cycle before.
## What it runs
### Backend (from repo root)
```bash
./gradlew ktlintCheck detekt detektMain detektTest build koverLog -PwarningsAsErrors
```
`build` depends on `check`, so this covers compile, ktlint, all three detekt analyses, tests and the Kover floors; `koverLog` prints the coverage. **All three
detekt tasks**: `detekt` alone skips every type-resolution rule (#407). **`-PwarningsAsErrors`** matches `build-backend.yml`, which fails on a Kotlin warning
where a plain local build does not.
### Frontend (from `events-frontend/`)
```bash
npm run type-check
npm run check:lint # what CI runs: oxlint, then eslint, no --fix; `npm run lint` repairs what it reports
npm run check:format # what CI runs: oxfmt --check src; `npm run format` repairs what it reports
npm run check:knip # unused files, exports and dependencies; knip.jsonc names the exceptions
npm run test:unit -- --run
npm run test:e2e -- --project=chromium
```
The e2e suite mocks the BFF and Playwright starts the Vite server itself, so no backend or database is needed. Chromium only keeps the gate fast; CI runs
the full matrix. **In a worktree, port 5173 may be the other checkout's dev server** — `CI=1` builds and serves `dist/` instead, so build first.
### Always (from repo root)
```bash
scripts/comment-lint.sh check # any comment-lint violation in .tf, .sh, .yaml, .py — no baseline
scripts/skill-parity.sh # each skill's name + description ↔ the AGENTS.md list, the .claude/skills symlink
scripts/rules-parity.sh # applyTo ↔ paths per rule, symlinks resolve, no @ pointer bodies, every glob hits a file
scripts/collector-parity.sh # LogFields ↔ LogContextConfiguration ↔ collector.yaml ↔ PLATFORM_SETUP §7
scripts/schedule-guard-parity.sh # every scheduled job carries the enorm-labs/event-junkie guard, so no fork runs a cron
scripts/scope-parity.sh # the feat scope list, nine copies, labeller's is canonical
scripts/secrets-parity.sh # the secret count SECRETS.md states ↔ the rows its table lists; the summary ↔ exposure table names
scripts/sources-parity.sh # the status counts in EVENT_DATA_SOURCES.md ↔ the rows of the tables they link to
scripts/features-parity.sh # PRODUCT_OVERVIEW.md § Surfaces ↔ routes, API paths, public files, e2e specs
scripts/admin-vocabulary-parity.sh # events-admin's EVENT_FEATURES ↔ the events-core enum; the compiler holds the other lists
scripts/index-parity.sh # scripts/README.md ↔ scripts/, every referenced script exists and answers --help
scripts/migration-versions.sh # no two Flyway migrations share a version (#2183); release.yml runs it before it builds
scripts/dev-seed-parity.sh check # dev-seed.http ↔ the venue files under http/importer/seed/venues/ it is generated from (#2824)
```
Each takes under a second and reaches no network; `--help` on any of them says what it checks and why. `scripts/comment-density.sh` measures and gates nothing.
### Markdown (only when the diff touches any `.md` file)
```bash
scripts/format-markdown.sh check # fix: scripts/format-markdown.sh with no argument
scripts/ste-lint.sh check # docs/** against scripts/ste-baseline.txt; report --top 20 to locate; <!-- ste-lint: allow <reason> --> to keep
```
Do not reach for `oxfmt` directly — the script pins the version and the scope. **`ste-lint` sees tracked files only**: `git add` a new document first, or it
passes locally and fails CI. `validate-docs.yml` runs both.
### Infrastructure (only when the diff touches `infra/`)
```bash
tofu fmt -recursive -check -diff infra
export TF_DATA_DIR="$(mktemp -d)" # required locally: a used .terraform sends init to the state bucket, InvalidAccessKeyId
for s in bootstrap environments/production environments/staging; do tofu -chdir=infra/$s init -backend=false && tofu -chdir=infra/$s validate; done
unset TF_DATA_DIR
shellcheck -x infra/modules/environment/cloud-init/*.sh
python3 infra/check_user_data.py # validate does not render templatefile; this does, and measures the 32 KiB cap
```
All three stacks even for a one-line change — they share `modules/environment`. **Never `tofu plan` or `apply`** ([infra/AGENTS.md](../../../infra/AGENTS.md)).
### Helm chart (only when the diff touches `deploy/`)
```bash
scripts/plugin-parity.sh # first; on ✗ stop the chart gate and hand over the printed install command
helm lint --strict deploy/charts/event-junkie --set database.host=10.0.1.2 --set database.existingSecret=events-db
helm lint --strict deploy/charts/event-junkie --values deploy/charts/event-junkie/values-k3d.yaml
helm unittest --strict deploy/charts/event-junkie
scripts/cluster-assertions.sh
scripts/uid-consistency.sh
scripts/architecture-diagram.sh check
helm template t deploy/charts/event-junkie --values deploy/charts/event-junkie/values-k3d.yaml | flux schema validate - -s ecosystem --verbose
flux schema validate deploy/clusters -s ecosystem --verbose --skip-json-path v1/Secret:/sops
```
**A plugin version that differs from CI's is a stop, not a warning.** `plugin-parity.sh` compares the local flux `schema` and helm `unittest` plugins
with `FLUX_SCHEMA_VERSION` and `HELM_UNITTEST_VERSION` in `validate-chart.yml`, and on a mismatch prints the command that installs CI's version. Run the rest
of the block only after it passes: schema plugin 0.12.1 reported six Invalid on a clean `main` (#2412). `cluster-assertions.sh` re-runs the
invariant suites against each cluster's `spec.values`, so the gate covers what Flux deploys.
`architecture-diagram.sh check` fails when a chart change moved what an environment deploys without `docs/architecture/` following; `write` is the
fix, and then read the diagrams in PLATFORM_SETUP.md §1.4 (ADR-034).
**Watch `Skipped:`, not just `Invalid:`** — a resource with no schema is skipped, not failed. **Never `helm install`,
`upgrade`, `uninstall`, `rollback` or `install --dry-run`** ([deploy/AGENTS.md](../../../deploy/AGENTS.md)).
Also when the diff touches `scripts/version.sh`: `scripts/version-deserved-test.sh` (the rule, and what `compute` names a commit, against fabricated
histories) and `scripts/version-test.sh` (snapshot versions still order — a version that lints and publishes can still leave staging on last week's chart, #455).
### Conditional, by path
| When the diff touches | Run |
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `package.json`, `package-lock.json`, `gradle.properties`, `settings.gradle.kts`, any `build.gradle.kts` | `scripts/notices-parity.sh check` — reaches the network; `check` restores the committed file |
| `events-bff/src/main/`, `events-frontend/src/api/schema.d.ts` | `scripts/api-schema-parity.sh check` after the Gradle build, whose `OpenApiDocumentTest` writes the document it reads |
| `events-importer/src/main/`, `events-admin/src/api/schema.d.ts` | `scripts/api-schema-parity.sh importer check` after the Gradle build, the same for the importer's document |
| `docs/LINKS.md`, `docs/ops/DAILY_COMMANDS.md`, `docs/ops/dashboard/` | `scripts/dashboard-parity.sh check` — needs `events-frontend/node_modules` |
| any `.py`, `ruff.toml` | `RUFF="ruff@$(sed -n 's/^ RUFF_VERSION: //p' .github/workflows/validate-python.yml)"; uvx "$RUFF" check && uvx "$RUFF" format --check` |
| `deploy/alerts/`, `deploy/dashboards/` | also `deploy/alerts/test_diff_alerts.py`, `deploy/alerts/test_apply_alerts.py` and `deploy/dashboards/test_lint_dashboard.py` |
| `scripts/apply-licence-review.py` | also `python3 scripts/test_apply_licence_review.py` |
| `scripts/force-import.py` | also `python3 scripts/test_force_import.py` |
| `scripts/limitation-verified.py` | also `python3 scripts/test_limitation_verified.py` |
| `scripts/manual-collisions.py` | also `python3 scripts/test_manual_collisions.py` |
| `scripts/nginx-advisories.py`, `scripts/nginx-advisories-fixture.html` | also `python3 scripts/test_nginx_advisories.py` |
| `scripts/osm-venue-coordinates.py` | also `python3 scripts/test_osm_venue_coordinates.py` |
| `scripts/seed-sources.py` | also `python3 scripts/test_seed_sources.py` |
| `scripts/venue-images.py` | also `python3 scripts/test_venue_images.py` |
| `scripts/musicbrainz-review.py` | also `python3 scripts/test_musicbrainz_review.py` |
| `scripts/match_spike.py`, `scripts/*-match.py` | also `python3 scripts/test_match_spike.py`, and `test_musicbrainz_review.py`, which loads `musicbrainz-match.py` |
| `scripts/artist-cleanup.py` | also `python3 scripts/test_artist_cleanup.py` |
| `scripts/genre-cleanup.py` | also `python3 scripts/test_genre_cleanup.py` |
| `scripts/admin_api.py` | also `test_admin_api.py`, and the `test_*.py` of each script that imports it: `grep -l 'from admin_api' scripts/*.py` |
| `scripts/festival_match.py`, `scripts/festival-match-fixture.html` | also `python3 scripts/test_festival_match.py` |
| any `.sh`, `.editorconfig` | shfmt at `SHFMT_VERSION` (`validate-scripts.yml`), from its Docker image, with `-d` and no style flags; cloud-init stays untouched |
| `deploy/`, `events-frontend/index.html`, `events-frontend/scripts/csp.ts` | `scripts/csp-parity.sh` — the policy is written twice, and the `script-src` hash follows the inline theme script (#846) |
| any Dockerfile | hadolint at `HADOLINT_VERSION` (`validate-dockerfiles.yml`), from its Docker image, over every tracked Dockerfile |
| an added migration under `events-importer/.../db/migration/` | `uvx --from squawk-cli==<SQUAWK_VERSION> squawk <added files>`; the pin is in `validate-migrations.yml` |
| any `.md`, `lychee.toml` | lychee at `LYCHEE_VERSION` (`validate-links.yml`), from its Docker image, `--offline` over `git ls-files '*.md'` |
| `events-admin/` | the frontend block from `events-admin/`, without e2e: there is no admin e2e suite |
## How to run the skill
1. Scope by diff: `git --no-pager diff --name-only origin/main...HEAD`. Frontend-only skips the backend; backend-only skips the frontend; the always block
always runs.
2. Backend first. On failure quote the first failing task and Gradle's actual error lines, then stop; on `ktlintCheck` suggest `./gradlew ktlintFormat` first.
3. Then frontend, then each conditional section the diff touches.
4. Report:
```
Backend: ktlintCheck ✓ detekt ×3 ✓ build ✓ koverLog ✓
Frontend: type-check ✓ lint ✓ format ✓ knip ✓ test:unit ✓ e2e ✓
Always: comment-lint ✓ skill ✓ rules ✓ collector ✓ scope ✓ index ✓
Markdown: format ✓ ste-lint ✓ (omit when no .md moved)
Infra: fmt ✓ validate ×3 ✓ shellcheck ✓ user_data ✓ (omit when infra/ untouched)
Chart: plugins ✓ lint ×2 ✓ unittest ✓ assertions ✓ uid ✓ schema ✓ (omit when deploy/ untouched)
```
On failure, ✗ on the failing step, the rest skipped, the first useful error line below.
## Gotchas
- **Java 25, the build `.sdkmanrc` pins**: Claude Code's `SessionStart` hook sets it. Elsewhere, or when `./gradlew` reports a bad `JAVA_HOME`,
prefix the call with `eval "$(scripts/jdk-env.sh)" &&`. No database needed (Testcontainers). No `NVD_API_KEY` needed (`dependencyCheckAggregate` is not in `build`).
- **`Executable doesn't exist`** on the first e2e run: `npx playwright install chromium` from `events-frontend/`.
- **Two Gradle daemons clobber `build/classes`**: a full test run while `dev-env.sh` is up fails with `NoClassDefFoundError` in untouched packages.
`scripts/dev-env.sh down`, then `./gradlew --no-daemon clean build …`. Never `./gradlew --stop`: it stops every session's build, and a hook
refuses it (#5140).
- **Run the backend gate and the e2e suite one after the other.** Side by side, the e2e build starves the gate's Testcontainers, and an unrelated
importer test fails on an SSL handshake.
- **A missing tool is a skipped check, never a passed one**: `brew install opentofu shellcheck helm yq fluxcd/tap/flux`; the chart plugins at the
versions `scripts/plugin-parity.sh` prints.
- **The chart gate proves nothing about a running cluster.** Report it as "renders and passes assertions"; [`/k3d-rehearsal`](../k3d-rehearsal/SKILL.md) is the
runtime counterpart.