hp-verify
Use after hp-gen to verify generated homepage code passes all quality gates.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- hp-verify
- description
- Use after hp-gen to verify generated homepage code passes all quality gates.
- allowed-tools
- Read, Write, Edit, Glob, Grep, Bash
- argument-hint
- [page-name]
- user-invocable
- true
03 SKILL.md 正文
Verification Skill
Runs verification gates on generated homepage code. Checks TypeScript, ESLint, Astro build, and Lighthouse CI.
Conventions: ${CLAUDE_PLUGIN_ROOT}/skills/hp-shared/SKILL.md.
Instructions
Step 0: Read Configuration
Read .claude/homepage-plugin.json. If not found, exit with instruction to run /homepage-plugin:hp-init.
Read defaultLocale — all user-facing output in this language.
Step 1: Validate Prerequisites
Check that generated code exists:
src/pages/has.astrofilessrc/components/sections/has section componentssrc/layouts/MarketingLayout.astroexists
If [page-name] provided, check that specific page exists at src/pages/{page-name}.astro (or src/pages/index.astro for home).
Check progress status:
- Accept:
generated,gen-failed,verified,verify-failed,reviewed,review-failed,fixing,escalated,done - Reject:
planned(no code yet — run/homepage-plugin:hp-genfirst) - Warn on demotion from
reviewed/done→verified
Step 2: TypeScript Check
Detect tsconfig structure:
- Read root
tsconfig.json - If
referencesarray present →npx tsc -b 2>&1 - Otherwise →
npx tsc --noEmit 2>&1
Record: pass/fail, error count, error details.
Step 3: ESLint Check
- Check if ESLint config exists (
.eslintrc*oreslint.config.*) - If config exists → run
npx eslint . 2>&1 - If no config and
eslintTemplateistrue:- Read
${CLAUDE_PLUGIN_ROOT}/templates/eslint-config.md - Extract the JavaScript code block from the "Canonical Config" section
- Write it to
{projectRoot}/eslint.config.jsusing the Write tool - Check dependencies:
pnpm ls eslint @eslint/js typescript-eslint eslint-plugin-astro eslint-plugin-react-hooks globals 2>&1 - If any dependency missing: display
pnpm add -D eslint @eslint/js typescript-eslint eslint-plugin-astro eslint-plugin-react-hooks globalsand skip ESLint (do not run) - If all present: run
npx eslint . 2>&1
- Read
- If no config and
eslintTemplateisfalse: skip ESLint entirely
Record: pass/fail, error count, warning count.
Step 4: Astro Build
Run: npx astro build 2>&1
Record: pass/fail, error details, build output size.
Step 5: Lighthouse CI (Optional)
If Lighthouse CI is available (npx lhci --version succeeds):
Run against the build output:
npx lhci autorun --collect.staticDistDir=dist 2>&1
Check scores against thresholds:
- Performance >= 90
- Accessibility >= 90
- Best Practices >= 90
- SEO >= 90
If Lighthouse CI is not installed, display:
Info: Lighthouse CI not installed. Run `pnpm add -D @lhci/cli` to enable performance auditing.
Record: scores per category or "skipped".
Step 6: Update Progress
Update docs/pages/{page-name}/.progress/{page-name}.json:
All checks pass → implementation.status: "verified"
Any check fails → implementation.status: "verify-failed"
Record verification details:
{
"implementation": {
"status": "verified",
"verification": {
"typescript": "pass",
"eslint": "pass",
"build": "pass",
"lighthouse": { "performance": 95, "accessibility": 98, "bestPractices": 100, "seo": 100 },
"verifiedAt": "2026-03-23T..."
}
}
}
Step 7: Display Report
Show verification summary:
Verification Results:
TypeScript: ✓ pass (0 errors)
ESLint: ✓ pass (0 errors, 2 warnings)
Astro Build: ✓ pass (12 pages, 45KB total)
Lighthouse: ✓ pass (P:95 A:98 BP:100 SEO:100)
Next step: Run /homepage-plugin:hp-review for code review.
Or on failure:
Verification Results:
TypeScript: ✗ fail (3 errors)
...
Fix the errors above, then re-run /homepage-plugin:hp-verify.
Communication Language
Read defaultLocale from .claude/homepage-plugin.json for all user-facing output.
04 同仓库更多 Skills
hp-shared
Shared conventions for every homepage-plugin agent and skill — stack, code conventions, state-file writes, check commands and how to report them. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
fe-shared
Shared conventions for every frontend-react-plugin agent and skill — code conventions, state files and locks, accepted deviations, design principles, build working directory, router-mode command matrix, TypeScript check. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
be-spring-shared
Shared conventions for every backend-springboot-plugin agent and skill — tech stack, CQRS architecture, naming, coding standards, TDD, commit and build rules, state files. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.
pp-translate
Use after directly editing the working language spec to sync changes to other supported languages.
pp-sync-stitch
Use when wireframes were manually edited on the Stitch website and need to be re-fetched to the local project.
pp-sync-notion
Use when a specification needs to be published or re-synced to Notion after finalization or manual edits.