Agent Skillsopen-mercato/open-mercato › om-code-review

om-code-review

GitHub

基于共享代码审查技能,针对Open Mercato仓库定制的扩展。新增Docker与本地环境检测、模板同步校验、分层代码分类及前端性能检查等特定规则,增强代码审查的精准度与自动化程度。

.ai/skills/om-code-review/SKILL.md open-mercato/open-mercato

触发场景

执行代码审查任务 处理涉及模板或前端的变更

安装

npx skills add open-mercato/open-mercato --skill om-code-review -g -y
更多选项

非标准路径

npx skills add https://github.com/open-mercato/open-mercato/tree/main/.ai/skills/om-code-review -g -y

不安装直接使用

npx skills use open-mercato/open-mercato@om-code-review

指定 Agent (Claude Code)

npx skills add open-mercato/open-mercato --skill om-code-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add open-mercato/open-mercato --all -g -y

预览 repo 内 skill

npx skills add open-mercato/open-mercato --list

SKILL.md

Frontmatter
{
    "name": "om-code-review",
    "description": "Open Mercato repo-local extension of the shared `om-code-review` skill (installed from open-mercato\/skills into .agents\/skills\/). Adds the Docker-vs-local gate runner detection, the template parity gate, Open Mercato layer classification, and the repo's severity taxonomy on top of the shared workflow."
}

Code Review — Open Mercato extension

This file extends the shared om-code-review skill from open-mercato/skills (installed at .agents/skills/om-code-review/SKILL.md). Follow the shared skill's full workflow — config loading, validation gate, checklists, breaking-change gate, output format — with the repo-specific rules below layered on top. The validation commands come from .ai/agentic.config.json; the full repo checklist is .ai/review-checklist.md (wired via the config's reviewChecklist field).

Step 0 — Decide where to run the gate (execute ONCE before any gate command)

Before running any validation.commands gate, pick the runner (Docker vs local) using the probe order documented in root AGENTS.md § Validation Commands — probe candidates with docker compose -f <file> ps --status running -q app, honor DOCKER_COMPOSE_FILE first, and in Docker mode map each yarn X to node scripts/docker-exec.mjs X. Record the chosen runner in the review output (e.g. Runner: docker (docker-compose.fullapp.dev.yml) or Runner: local). Never silently fall through to the production compose profile on a parse error — log and try the next candidate.

The same Step 0 applies wherever the validation gate runs (om-check-and-commit, om-auto-create-pr, om-implement-spec, om-smart-test).

Gate-order note: run yarn typecheck and yarn test in parallel (they are independent); the second yarn build:packages run exists to rebuild with the files yarn generate produced.

Template parity gate

After the validation gate, run yarn template:sync. If drift is reported (especially app layout/routes between apps/mercato/src/{app,modules} and packages/create-app/template/src/{app,modules}), ask the user whether to sync now; if approved, run yarn template:sync:fix and include the synced files in the change.

Scope classification (Open Mercato layers)

Classify each changed file by Open Mercato layer: API route, entity, validator, backend page, frontend page, subscriber, worker, command, search config, setup, ACL, events, DI, widget, test. Then read the AGENTS.md of each touched module/package — the task-routing table in the root AGENTS.md maps layers to the files that govern them.

Context sources

  • .ai/specs/ — check for active specs on the touched modules; flag divergence from an active spec.
  • .ai/lessons.md — scan the tagged index by affected module/area/topic, open only matching lesson records, and treat those documented lessons as review rules.
  • BACKWARD_COMPATIBILITY.md — protected contract surfaces (the shared skill already enforces this; violations are Critical).

Frontend performance gate

The shared skill's UI Performance Gate applies with these Open Mercato specifics: run yarn check:client-boundaries when the diff touches web routes, providers, or the app shell (the "use client" boundary ledger — see the Frontend Architecture Contract at .ai/skills/om-spec-writing/references/frontend-architecture-contract.md); watch for backend pages that turn server components into client components, route entry points that import heavy editors/calendars/graphs eagerly instead of dynamic islands, and global providers importing route-specific SDKs. om-ds-guardian and om-backend-ui-design (local skills) define the DS/UI conventions the diff must follow.

Severity taxonomy

This repo historically reports findings as Critical / High / Medium / Low; the shared skill uses blocker / major / minor / nit. They map 1:1 in that order. Use the shared skill's labels in the verdict (callers consume blocker/major) and classify by these repo rules:

Severity Criteria Action
Critical (blocker) Security vulnerability, cross-tenant data leak, data corruption risk, missing auth guard, backward compatibility violation (breaking contract surface without deprecation bridge), failed validation-gate command MUST fix before merge
High (major) Architecture violation, missing required export (openApi, metadata), broken module contract, missing deprecation annotation on contract change MUST fix before merge
Medium (minor) Convention violation, suboptimal pattern, missing best practice Should fix
Low (nit) Style suggestion, minor improvement, readability Nice to have

版本历史

  • 8b49232 当前 2026-08-27 19:04

    新增Docker-vs-local运行环境检测逻辑、模板同步门控、Open Mercato层级分类体系及前端性能检查规则。

  • c915d76 2026-07-24 20:42

同 Skill 集合

.ai/skills/codex/backend-ui-design/SKILL.md
.ai/skills/om-app-spec-writing/SKILL.md
.ai/skills/om-auto-continue-pr-loop/SKILL.md
.ai/skills/om-auto-create-pr-loop/SKILL.md
.ai/skills/om-auto-publish-pr/SKILL.md
.ai/skills/om-auto-qa-scenarios/SKILL.md
.ai/skills/om-auto-review-pr/SKILL.md
.ai/skills/om-auto-sec-report-pr/SKILL.md
.ai/skills/om-auto-sec-report/SKILL.md
.ai/skills/om-auto-upgrade-0.4.10-to-0.5.0/SKILL.md
.ai/skills/om-auto-upgrade-0.6.6-to-0.6.7/SKILL.md
.ai/skills/om-auto-upgrade-0.6.7-to-0.7.0/SKILL.md
.ai/skills/om-backend-ui-design/SKILL.md
.ai/skills/om-create-agents-md/SKILL.md
.ai/skills/om-dev-container-maintenance/SKILL.md
.ai/skills/om-ds-guardian/SKILL.md
.ai/skills/om-fix-specs/SKILL.md
.ai/skills/om-followup-issue-from-pr/SKILL.md
.ai/skills/om-help/SKILL.md
.ai/skills/om-implement-spec/SKILL.md
.ai/skills/om-integration-builder/SKILL.md
.ai/skills/om-integration-tests/SKILL.md
.ai/skills/om-judge-agent-session/SKILL.md
.ai/skills/om-migrate-mikro-orm/SKILL.md
.ai/skills/om-mockup-prototype/SKILL.md
.ai/skills/om-pr-autopilot/SKILL.md
.ai/skills/om-pre-implement-spec/SKILL.md
.ai/skills/om-prepare-issue/SKILL.md
.ai/skills/om-prepare-test-env/SKILL.md
.ai/skills/om-refresh-standalone-harness/SKILL.md
.ai/skills/om-share-this-session/SKILL.md
.ai/skills/om-skill-creator/SKILL.md
.ai/skills/om-smart-test/SKILL.md
.ai/skills/om-spec-writing/SKILL.md
.ai/skills/om-create-ai-agent/SKILL.md
.ai/skills/om-figma-design-with-ds/SKILL.md
.ai/skills/om-gap-analysis/SKILL.md

元信息

文件数
0
版本
8b49232
Hash
545de97e
收录时间
2026-07-24 20:42

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 21:56
浙ICP备14020137号-1 $访客地图$