一键导入
land-pr
Validate, branch, commit, and create PR following Hephaestus conventions. Runs local CI mirror before pushing to prevent remote CI failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate, branch, commit, and create PR following Hephaestus conventions. Runs local CI mirror before pushing to prevent remote CI failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Diagnose and fix ALL failing CI checks on the current PR in a single pass. Collects all failures first, then prescribes fixes. Use when CI is failing, tests are broken, GitHub Actions report errors, or PR checks show red.
React performance optimization guidelines from Vercel Engineering. Contains 45 rules across 8 categories. Use when optimizing React components, bundle size, or data fetching patterns. IMPORTANT: This codebase uses Vite + TanStack Router (SPA), NOT Next.js. See applicability notes below for which rules apply.
Fetch, analyze, and resolve PR review comments with full code context. Use when addressing review feedback, resolving threads, or responding to reviewers.
| name | land-pr |
| description | Validate, branch, commit, and create PR following Hephaestus conventions. Runs local CI mirror before pushing to prevent remote CI failures. |
| disable-model-invocation | true |
| allowed-tools | ["Bash(gh *)","Bash(git *)","Bash(pnpm *)","Bash(./mvnw *)","Read","Grep","Glob"] |
| metadata | {"source":"internal","version":"2.0.0"} |
git status --short
If empty, nothing to commit - stop.
git diff --name-only HEAD
Map paths to components (mirrors CI's dorny/paths-filter config):
webapp/** → webapp changedserver/** OR scripts/db-utils.sh → app-server changedpackage.json OR package-lock.json OR .node-version → webapp changeddocs/** → docs-only (skip all validation if nothing else changed)pnpm run format
Formatting must NEVER be a reason for remote CI failure. This applies formatting in write mode, not just check mode.
pnpm run check
Must pass. Fix issues before continuing.
API endpoints changed (app-server controllers/DTOs):
pnpm run generate:api:application-server:specs
pnpm run generate:api:application-server:client
Database entities changed:
pnpm run db:draft-changelog
pnpm run db:generate-erd-docs
Run ONLY tests for changed components. Order: fastest first.
If webapp changed:
pnpm run test:webapp
If app-server changed (and mvn available):
cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q && cd ../..
ALL tests must pass before proceeding.
If app-server changed:
pnpm run generate:api
git diff --quiet || echo "WARNING: OpenAPI specs were out of sync - staging changes"
Stage any drift that was caught.
Regeneration can produce unformatted code. Run one final pass:
pnpm run format
pnpm run check
Both must pass.
If this PR changes server/, webapp/, or docker/, it must carry a changeset or CI (verify-changesets) fails:
pnpm changeset # user-facing change: pick the bump, describe it for operators
pnpm changeset --empty # no user-facing effect (refactor/test/docs-only)
Pre-1.0: never pick major. Stage the generated .changeset/*.md before committing. pnpm changeset is
interactive — with no TTY, write .changeset/<slug>.md by hand (.changeset/README.md shows the format).
git branch --show-current
If main, create branch:
git checkout -b <type>/<description>
Types: feat, fix, docs, refactor, test, ci, chore
git add -A
git commit -m "<type>(<scope>): <description>"
Scopes:
webapp, server, docsci, config, deps, deps-dev, docker, scripts, security, db, releaseauth, integration, scm, leaderboard, mentor, notifications, profile, teams, workspacegit push -u origin HEAD
PAGER=cat gh pr view --json number,url 2>/dev/null && echo "PR exists - skip creation" || echo "No PR - create one"
Skip if step 13 showed "PR exists".
PAGER=cat gh pr create --base main \
--title "<type>(<scope>): <description>" \
--body "## Description
<1-2 sentences describing what and why>
## How to Test
<steps to verify, or 'CI covers this'>"
PAGER=cat gh pr view --json url,title -q '"PR: \(.title)\nURL: \(.url)"'