code-review

GitHub

用于代码审查、PR审计及对抗性检查的Skill。涵盖质量、安全、无障碍及规范检查,提供前后端及移动端通用与特定清单,指导如何运行检查并输出修复建议。

.agents/skills/code-review/SKILL.md YosemiteCrew/Yosemite-Crew

Trigger Scenarios

请求审查代码 检查Pull Request 审计代码变更

Install

npx skills add YosemiteCrew/Yosemite-Crew --skill code-review -g -y
More Options

Non-standard path

npx skills add https://github.com/YosemiteCrew/Yosemite-Crew/tree/main/.agents/skills/code-review -g -y

Use without installing

npx skills use YosemiteCrew/Yosemite-Crew@code-review

指定 Agent (Claude Code)

npx skills add YosemiteCrew/Yosemite-Crew --skill code-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add YosemiteCrew/Yosemite-Crew --all -g -y

预览 repo 内 skill

npx skills add YosemiteCrew/Yosemite-Crew --list

SKILL.md

Frontmatter
{
    "name": "code-review",
    "description": "Use when reviewing code, auditing a PR, or doing an adversarial review of a change. Runs quality, security, accessibility, and convention checks specific to this codebase."
}

Code Review — Yosemite Crew

Description

Use this skill when reviewing code, checking a PR, or performing an adversarial review of changes. Runs through quality, security, accessibility, and convention checks specific to this codebase.

TRIGGER: when asked to review code, check a PR, or audit changes in any part of this monorepo.


Review Checklist

Universal (all apps)

  • No secrets, tokens, or .env values in code
  • TypeScript: no any, no unnecessary type assertions
  • Conventional commit message format (scope must match root policy in AGENTS.md and commitlint.config.cjs)
  • No console.log in production code (use Winston for backend, remove for frontend/mobile)
  • No new eslint-disable comments — fix the root cause
  • No new files when editing an existing file would suffice
  • No duplicate imports in any file

Frontend Specific

  • New UI uses existing src/app/ui/ components before creating new ones
  • Tailwind tokens used — no hardcoded colors or arbitrary values without justification
  • No new Bootstrap classes added
  • Sonar rules not violated (see frontend-sonar skill)
  • Semantic HTML — no <div role="..."> where a native element exists
  • Keyboard accessibility — interactive elements have tabIndex and onKeyDown
  • No <button> nested inside <button>
  • Zustand store used correctly — no duplicated state across stores
  • Cognitive complexity ≤ 15 per function/component
  • No nested ternaries inline in JSX
  • useState destructured correctly; no empty first slot

Backend Specific

  • Business logic in service layer, not controller
  • All req.body inputs validated with Zod
  • No raw database queries outside model/service layer
  • Background work enqueued via BullMQ, not processed inline
  • Stripe webhook handlers verify signature

Mobile Specific

  • User-visible strings use t() from i18next
  • Navigation uses typed route names
  • Redux for shared/persisted state; useState for ephemeral UI state
  • Native permissions requested before use

How to Run a Review

  1. Read the changed files.
  2. Run through the relevant checklist sections above.
  3. For frontend changes, run: npx tsc --noemit + pnpm --filter frontend run lint.
  4. For frontend changes, run targeted tests for every modified file: pnpm --filter frontend run test -- --testPathPatterns="<ModifiedFile>". Verify no existing tests are broken by the change.
  5. For each issue found, state: file + line, the rule violated, and the fix.
  6. Summarize: blocking issues vs. suggestions.

Version History

  • 7f92970 Current 2026-08-29 01:14
  • 3726483 2026-08-20 13:37

Same Skill Collection

.agents/skills/agent-loop/SKILL.md
.agents/skills/backend-patterns/SKILL.md
.agents/skills/desktop-sonar/SKILL.md
.agents/skills/frontend-design/SKILL.md
.agents/skills/frontend-sonar/SKILL.md
.agents/skills/frontend-testing/SKILL.md
.agents/skills/mobile-patterns/SKILL.md
.agents/skills/monorepo-ops/SKILL.md
.agents/skills/react-doctor/SKILL.md
.agents/skills/yosemite-client-communications/SKILL.md
.agents/skills/yosemite-data-migration-audit/SKILL.md
.agents/skills/yosemite-inventory-planning/SKILL.md
.agents/skills/yosemite-practice-workflow-audit/SKILL.md
.agents/skills/yosemite-staff-onboarding/SKILL.md
.agents/skills/yosemite-vet-software-buyer/SKILL.md
.agents/skills/yosemite-vet-visit-prep/SKILL.md
.claude/skills/agent-loop/SKILL.md
.claude/skills/backend-patterns/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/desktop-sonar/SKILL.md
.claude/skills/frontend-design/SKILL.md
.claude/skills/frontend-sonar/SKILL.md
.claude/skills/frontend-testing/SKILL.md
.claude/skills/mobile-patterns/SKILL.md
.claude/skills/monorepo-ops/SKILL.md
.claude/skills/react-doctor/SKILL.md
.claude/skills/yosemite-client-communications/SKILL.md
.claude/skills/yosemite-data-migration-audit/SKILL.md
.claude/skills/yosemite-inventory-planning/SKILL.md
.claude/skills/yosemite-practice-workflow-audit/SKILL.md
.claude/skills/yosemite-staff-onboarding/SKILL.md
.claude/skills/yosemite-vet-software-buyer/SKILL.md
.claude/skills/yosemite-vet-visit-prep/SKILL.md

Metadata

Files
0
Version
6932903
Hash
e2338bbc
Indexed
2026-08-20 13:37

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 15:00
浙ICP备14020137号-1