一键导入
verification-loop
Verification loop tailored to opnConfigGenerator — wraps `just ci-check`, `mise exec`, and this repo's gate policies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verification loop tailored to opnConfigGenerator — wraps `just ci-check`, `mise exec`, and this repo's gate policies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
基于 SOC 职业分类
| name | verification-loop |
| description | Verification loop tailored to opnConfigGenerator — wraps `just ci-check`, `mise exec`, and this repo's gate policies. |
| origin | ECC |
| customized | 2026-04-18 (opnConfigGenerator) |
This is a Go CLI project. All verification runs through just recipes, and all Go commands go through mise exec -- so the mise-pinned toolchain is used — not whatever Go happens to be on PATH.
just ci-check BEFORE committing")go.mod/go.sum)just release-snapshot, etc.)mise exec -- just ci-check
Expands to: check format-check lint test test-integration test-race. AGENTS.md §Code Quality Policy is zero-tolerance — if any step fails, investigate and fix it, including anything labelled "pre-existing."
| Recipe | Purpose |
|---|---|
mise exec -- just check | pre-commit run --all-files (pre-commit gate) |
mise exec -- just format-check | gofumpt / goimports check |
mise exec -- just lint | golangci-lint (see .golangci.yml) |
mise exec -- just test | go test ./... |
mise exec -- just test-race | go test -race -timeout 10m ./... (timeout owned by justfile) |
mise exec -- just test-integration | go test -tags=integration ./... |
mise exec -- just test-coverage | writes coverage.txt |
mise exec -- just security-all | gosec + govulncheck + secret scan |
ci-check fails)gofumpt + goimports. Note: //nolint: directives must be on a SEPARATE LINE above the call — inline //nolint: gets stripped by gofumpt. See AGENTS.md §Mandatory Practices #6..golangci.yml. Never suppress a finding without a specific //nolint:<linter> and a justification comment. testifylint enforces require for error assertions and noctx enforces exec.CommandContext over exec.Command.-race in CI via test-race. New tests use table-driven patterns — see internal/opnsensegen/*_test.go for canonical examples.test-integration runs suites tagged integration.mise exec -- just security-all runs gosec, govulncheck, and a secret scan. Gosec exclusions live in justfile (the -exclude=G... flags on the gosec recipe) and in .golangci.yml under linters.settings.gosec. Do not add an exclusion without a reference to SECURITY.md or a documented rationale.
git diff --stat
git diff <base>...HEAD
Review each changed file for:
mise.toml/mise.lock, go.mod/go.sum, .golangci.yml)fmt.Errorf("context: %w", err)PrivateKey/Password/PSK fields when exporting CommonDevice. See docs/solutions/best-practices/opndossier-pkg-consumer-integration-2026-04-18.md for the redaction footgun.VERIFICATION REPORT (opnConfigGenerator)
========================================
just ci-check: [PASS/FAIL]
- format-check: [PASS/FAIL]
- lint: [PASS/FAIL] (N findings)
- test: [PASS/FAIL] (X/Y passed)
- test-integration: [PASS/FAIL]
- test-race: [PASS/FAIL]
Security (if run): [PASS/FAIL]
Overall: [READY/NOT READY] for PR
Blockers: ...
AGENTS.md §Mandatory Practices — the canonical project contractGOTCHAS.md — non-obvious behaviors and hard-won lessonsCONTRIBUTING.md — PR process and commit conventionsjustfile — every verification recipe lives here