AgentSkillsCN

quizapp-pr

为QuizApp的Pull Request遵循仓库模板、AI智能体护栏,以及“完成定义”的标准。触发条件:在处理PR需求时(上下文/描述/待审步骤/检查清单)、PR标题是否符合Conventional Commit规范、变更日志状态,或在检查PR相关工作流(conventional-commit.yml、pr-conflict-checker.yml、labeler.yml)以及CODEOWNERS时。

SKILL.md
--- frontmatter
name: quizapp-pr
description: >
  Creates Pull Requests for QuizApp following the repo template, AI agent guardrails,
  and Definition of Done. Trigger: When working on PR requirements (Context/Description/Steps
  to review/Checklist), PR title Conventional Commit checks, changelog status, or
  when inspecting PR-related workflows (conventional-commit.yml, pr-conflict-checker.yml,
  labeler.yml) and CODEOWNERS.
license: Apache-2.0
metadata:
  author: quizapphq
  version: "1.1"
  scope: [root]
  auto_invoke:
    - "Create a PR with gh pr create"
    - "Review PR requirements: template, title conventions, changelog gate"
    - "Fill Context/Description/Steps to review/Checklist per docs/developer-guide"
    - "Inspect PR CI workflows (.github/workflows/*): conventional-commit, pr-conflict-checker, labeler"
    - "Understand review ownership with CODEOWNERS"
allowed-tools: Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, Task

PR Creation Process

  1. Analyze changes: git diff main...HEAD so you understand all work since the branch diverged.
  2. Determine affected packages: frontend (Next.js), backend (Express API), shared (schemas/types), docs, infra.
  3. Load relevant Skills + AGENTS: follow the instructions in each package and docs/developer-guide/introduction.mdx.
  4. Fill template sections with Context/Description/Steps to review/Checklist.
  5. Create PR with gh pr create (use a heredoc for the body to keep formatting intact).

PR Template Structure

markdown
### Context

{Why this change? Reference docs/use-cases.md and link the GitHub issue with `Closes #XX`}

### Description

{Summary of changes and dependencies}

### Steps to review

{How to test/verify the changes}

### Checklist

<details>

<summary><b>Community Checklist</b></summary>

- [ ] Issue is tracked in https://github.com/quizapphq/quiz-experience/issues and assigned to me (or I volunteered in the thread/Slack).
- [ ] I followed `docs/developer-guide/introduction.mdx` and loaded the Skills for each touched package.

</details>

- [ ] Conventional Commit-style PR title (`feat(frontend): ...`).
- [ ] `pnpm lint`, `pnpm test`, and `pnpm format` ran locally.
- [ ] Screenshots/videos added for UI changes (mobile/tablet/desktop) when visual output changes.
- [ ] Docs updated (e.g., `docs/use-cases.md`, `docs/wireframes.yaml`) if behavior changed.
- [ ] Shared schemas/types updated + consumers refactored when contracts changed.
- [ ] LocalStorage/attempt lifecycle rules validated for quiz domain tweaks.
- [ ] CHANGELOG entries added if the affected package maintains one.

#### Frontend (if applicable)
- [ ] App Router + shadcn/ui patterns follow `quizapp-ui` Skill.
- [ ] Responsive screenshots/videos included when UI differs.
- [ ] Zustand store updates covered by tests under `frontend/`.

#### Backend (if applicable)
- [ ] Inputs/outputs validated with shared Zod schemas.
- [ ] Fixtures/docs updated when quiz JSON/data changes.
- [ ] Supertest coverage added/updated for new routes.

#### Shared (if applicable)
- [ ] `shared/` schemas + types versioned intentionally (avoid breaking existing consumers without coordination).
- [ ] Tests updated to reflect schema changes.

### License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Component-Specific Rules

ComponentCHANGELOGExtra Checks
Frontendfrontend/CHANGELOG.md (if present)Screenshots for all breakpoints, state persistence verified
Backendbackend/CHANGELOG.mdUpdate docs for new endpoints, run Supertest suites
Sharedshared/CHANGELOG.mdEnsure types/schemas synced with consumers
Docsn/aLink back to updated references, regenerate static assets if needed
Infrainfra/CHANGELOG.mdConfirm Docker/devbox instructions still work

Commands

bash
# Check current branch status
git status
git log main..HEAD --oneline

# View full diff
git diff main...HEAD

# Create PR with heredoc for body
gh pr create --title "feat(frontend): description" --body "$(cat <<'EOF'
### Context
...
EOF
)"

# Create draft PR
gh pr create --draft --title "feat: description"

Title Conventions

Follow Conventional Commits + scope prefixes for the touched package:

  • feat(frontend): new UI feature
  • fix(backend): bug fix in Express API
  • docs(intro): documentation change
  • chore(shared): maintenance/refactor
  • test(frontend): new or updated tests
  • infra(devbox): infra changes

Before Creating PR

  1. pnpm test, pnpm lint, and pnpm format succeed (or package-scoped equivalents via pnpm --filter).
  2. ✅ Turborepo caches updated (run pnpm dev/build commands touched by the change).
  3. ✅ CHANGELOG/docs touched where needed.
  4. ✅ Branch rebased on latest main (no merge commits unless required).
  5. ✅ Commits are clean, descriptive, and follow repo conventions.

Resources

  • docs/developer-guide/introduction.mdx – onboarding + PR expectations.
  • AGENTS.md – package-specific guardrails.
  • skills/ – load quizapp-ui, quizapp-api, quizapp-domain, etc., depending on the files you touch.