Agent Skills › AIEraDev/Clypra › code-review

code-review

GitHub

指导AI代理对Clypra项目的PR、Git Diff及架构提案进行系统化代码审查,优先关注功能缺陷、并发竞态、资源泄漏及安全性,而非样式问题。

.agents/skills/code-review/SKILL.md AIEraDev/Clypra

触发场景

审查Pull Requests 评估AI生成的代码变更 合并前验证Git Diff

安装

npx skills add AIEraDev/Clypra --skill code-review -g -y
更多选项

非标准路径

npx skills add https://github.com/AIEraDev/Clypra/tree/master/.agents/skills/code-review -g -y

不安装直接使用

npx skills use AIEraDev/Clypra@code-review

指定 Agent (Claude Code)

npx skills add AIEraDev/Clypra --skill code-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add AIEraDev/Clypra --all -g -y

预览 repo 内 skill

npx skills add AIEraDev/Clypra --list

SKILL.md

Frontmatter
{
    "name": "code-review",
    "description": "Guides AI agents through systematic, prioritized code reviews in Clypra. Activate when reviewing pull requests, git diffs, architectural proposals, or agent-generated changes. Focuses on correctness, architectural invariants, concurrency bugs, and regression risks over cosmetic styling."
}

Code Review Workflow

Overview

This skill defines the canonical code review standards for Clypra. In a desktop video editor, subtle concurrency glitches, unreleased resources, and violated timeline invariants can lead to permanent render freezes, corrupted projects, or AV desynchronization. Reviews must be technical, evidence-based, and prioritized by risk.


When to Use This Skill

  • Reviewing git diffs or pull requests before merging.
  • Evaluating changes generated by another AI agent.
  • Pre-commit verification of local working-tree modifications.

When NOT to Use This Skill

  • Authoring new features or bug fixes directly (use feature-implementation or bugfix-regression).
  • Measuring performance benchmarks (use benchmark tools).

Review Priorities (Strict Hierarchy)

Reviews must assess changes in this exact order:

  1. Functional Defects & Invariants Violation

    • Does the change break the single time authority (PlaybackClock)?
    • Does any render path bypass evaluateTimelineSceneCached() or EvaluatedScene?
    • Are timeline mutations bypassing historyStore.dispatch(command)?
    • Is asset.path accessed before hydration/probe completes?
    • In NativeProgramPreview.tsx, is renderInFlight guaranteed to reset across all exit paths?
  2. Asynchronous Races & Lifecycle Errors

    • Can out-of-order IPC responses or promise resolutions overwrite fresher state?
    • Are Web Workers or native resources leaking on unmount/dispose?
    • Is cancellation handled when user scrubs or switches projects rapidly?
  3. Error Handling & Resource Leakage

    • Are errors silently caught without fallback or logging?
    • Are GPU textures, buffers, or audio nodes disposed cleanly?
  4. Security & Data Integrity

    • Does Tauri IPC path handling validate incoming file paths against traversal attacks?
    • Is project JSON deserialization robust against corrupted or legacy schemas?
  5. Test Coverage & Verification

    • Does a bug fix include a corresponding automated regression test?
    • Are assertions meaningful rather than trivial existence checks?
    • Do all modified files compile clean under npx tsc --noEmit?
  6. Performance & Compute Boundaries

    • Are heavy computations (>2ms) kept off the main UI thread?
    • Are IPC calls batched or debounced rather than called per animation frame?
    • Is frame batching used for export rendering?
  7. Maintainability & Documentation

    • Were existing comments and docstrings preserved?
    • Are public types well-documented and backward-compatible?

Review Procedure

1. Diff Inspection

  • Run git diff against base branch (master or target commit).
  • Check modified files, deleted lines, and new dependencies.
  • Ensure no accidental edits, leftover debug statements, or secrets were committed.

2. Static Analysis & Compilation Check

Verify compiler diagnostics:

npx tsc --noEmit
npm run docs:check

3. Verification of Tests

Verify that test assertions directly exercise the changed behavior and that existing suites still pass:

npx vitest run src/components/editor/preview/__tests__/ProgramPreview.renderLoop.test.ts

4. Structure the Review Report

Format findings clearly:

  • Summary: Concise overview of the change and overall recommendation (Approve, Request Changes, Discuss).
  • Critical Issues (Blockers): Confirmed bugs, invariant violations, data-loss risks, or broken tests. Include file and line numbers.
  • Risks & Edge Cases: Potential race conditions or lifecycle concerns requiring verification.
  • Improvements (Non-blocking): Suggestions for clarity, maintainability, or performance.

Important Rule: The default review mode must never modify code or push commits unless explicitly authorized by the user.

版本历史

  • b371446 当前 2026-10-18 23:25

同 Skill 集合

.agents/skills/architecture-design-review/SKILL.md
.agents/skills/behavior-coverage/SKILL.md
.agents/skills/bugfix-regression/SKILL.md
.agents/skills/clypra-codebase-optimization-research/SKILL.md
.agents/skills/clypra-dev/SKILL.md
.agents/skills/clypra-media-regression-testing/SKILL.md
.agents/skills/clypra-performance-log-analysis/SKILL.md
.agents/skills/clypra-preview-performance-engineering/SKILL.md
.agents/skills/clypra-ui-ux-engineering/SKILL.md
.agents/skills/feature-implementation/SKILL.md
.agents/skills/i18n-localization-engineering/SKILL.md
.agents/skills/nle-domain-engineering/SKILL.md
.agents/skills/performance-reliability-engineering/SKILL.md
.agents/skills/release-readiness/SKILL.md
.agents/skills/senior-engineer-decision-making/SKILL.md
.agents/skills/tauri-cross-platform-engineering/SKILL.md
.kiro/skills/architecture-design-review/SKILL.md
.kiro/skills/behavior-coverage/SKILL.md
.kiro/skills/bugfix-regression/SKILL.md
.kiro/skills/clypra-codebase-optimization-research/SKILL.md
.kiro/skills/clypra-dev/SKILL.md
.kiro/skills/clypra-media-regression-testing/SKILL.md
.kiro/skills/clypra-performance-log-analysis/SKILL.md
.kiro/skills/clypra-preview-performance-engineering/SKILL.md
.kiro/skills/clypra-ui-ux-engineering/SKILL.md
.kiro/skills/code-review/SKILL.md
.kiro/skills/feature-implementation/SKILL.md
.kiro/skills/i18n-localization-engineering/SKILL.md
.kiro/skills/nle-domain-engineering/SKILL.md
.kiro/skills/performance-reliability-engineering/SKILL.md
.kiro/skills/release-readiness/SKILL.md
.kiro/skills/senior-engineer-decision-making/SKILL.md
.kiro/skills/tauri-cross-platform-engineering/SKILL.md
.agents/skills/clypra-bug-hunter/SKILL.md
.agents/skills/tauri-native-thread-safety/SKILL.md
.kiro/skills/clypra-bug-hunter/SKILL.md
.kiro/skills/tauri-native-thread-safety/SKILL.md

元信息

文件数
0
版本
b371446
Hash
894f9b90
收录时间
2026-10-18 23:25

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 00:08
浙ICP备14020137号-1