Agent Skillsopensquilla/opensquilla › meta-codereview-current-diff

meta-codereview-current-diff

GitHub

并行执行安全、测试覆盖和风格三个独立审查器,对当前未提交差异进行多视角代码审查,并仲裁生成最终 verdict。适用于提交前获取多维度代码质量反馈。

src/opensquilla/skills/exp/meta-codereview-current-diff/SKILL.md opensquilla/opensquilla

Trigger Scenarios

multi-reviewer diff codereview my diff

Install

npx skills add opensquilla/opensquilla --skill meta-codereview-current-diff -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/exp/meta-codereview-current-diff -g -y

Use without installing

npx skills use opensquilla/opensquilla@meta-codereview-current-diff

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill meta-codereview-current-diff -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

SKILL.md

Frontmatter
{
    "kind": "meta",
    "name": "meta-codereview-current-diff",
    "always": false,
    "triggers": [
        "multi-reviewer diff",
        "codereview my diff",
        "三路 review",
        "审查当前 diff"
    ],
    "provenance": {
        "origin": "opensquilla-original",
        "license": "Apache-2.0"
    },
    "composition": {
        "steps": [
            {
                "id": "read_diff",
                "kind": "skill_exec",
                "with": {
                    "cwd": "{{ inputs.workspace_dir | default('.') }}",
                    "mode": "cached_fallback_worktree"
                },
                "skill": "git-diff"
            },
            {
                "id": "review_safety",
                "kind": "llm_chat",
                "with": {
                    "task": "You are the *safety reviewer* for a 3-reviewer codereview bundle.\nApply ONLY the rules below; do not invent additional concerns.\n\nDiff under review:\n---\n{{ outputs.read_diff | truncate(8000) }}\n---\n\nRules (in priority order):\n  1. CRITICAL if the diff introduces SQL injection (string\n     concatenation into SQL, unparameterized queries via .format\n     or f-strings into execute\/query).\n  2. CRITICAL if the diff introduces shell-injection\n     (subprocess with shell=True + user input, or os.system on\n     unvalidated strings).\n  3. CRITICAL if the diff hardcodes a credential (sk-…, ghp_…,\n     AKIA…, private key, password=… string literal).\n  4. WARNING if the diff templates user-controlled strings into\n     tool args \/ prompts WITHOUT `xml_escape` (G1.6 contract).\n  5. CLEAR if none of the above apply.\n\nReply with EXACTLY one line, no preamble:\n  CRITICAL: <one-sentence reason>\n  WARNING: <one-sentence reason>\n  CLEAR: no safety concerns found\n",
                    "system": "You are a precise code safety reviewer. Reply with exactly one requested verdict line."
                },
                "depends_on": [
                    "read_diff"
                ]
            },
            {
                "id": "review_tests",
                "kind": "llm_chat",
                "with": {
                    "task": "You are the *test-coverage reviewer* for a 3-reviewer codereview\nbundle. Apply ONLY the rules below.\n\nDiff under review:\n---\n{{ outputs.read_diff | truncate(8000) }}\n---\n\nRules:\n  1. MISSING_TESTS if the diff adds a new public function \/ class \/\n     protocol under `src\/` and does NOT add a corresponding test\n     under `tests\/`.\n  2. MISSING_TESTS if the diff is a bug fix (commit message style\n     `fix(...):`) and does NOT add a regression test.\n  3. PASS if refactor-only (no behaviour change), even without\n     new tests.\n  4. PASS if the diff is doc-only or config-only.\n\nReply with EXACTLY one line, no preamble:\n  MISSING_TESTS: <which functions\/classes lack tests>\n  PASS: tests adequate (or n\/a)\n",
                    "system": "You are a precise test-coverage reviewer. Reply with exactly one requested verdict line."
                },
                "depends_on": [
                    "read_diff"
                ]
            },
            {
                "id": "review_style",
                "kind": "llm_chat",
                "with": {
                    "task": "You are the *style \/ idiom reviewer* for a 3-reviewer codereview\nbundle. Look for project-specific anti-patterns.\n\nDiff under review:\n---\n{{ outputs.read_diff | truncate(8000) }}\n---\n\nAnti-patterns to flag (do not invent others):\n  - Functions > 80 source lines\n  - Conditional nesting > 4 deep\n  - Magic numeric literals without a named constant\n  - Stale TODO\/FIXME comments left in shipped code\n  - Bare `except:` clauses (no exception class)\n  - `print()` calls instead of structlog `log.info(...)`\n\nReply with EXACTLY one line, no preamble:\n  ANTIPATTERNS: <one-line list with line refs>\n  CLEAN: no style issues found\n",
                    "system": "You are a precise style reviewer. Reply with exactly one requested verdict line."
                },
                "depends_on": [
                    "read_diff"
                ]
            },
            {
                "id": "arbitrate",
                "kind": "llm_chat",
                "with": {
                    "task": "Three reviewers ran on the diff:\n  - Safety: {{ outputs.review_safety }}\n  - Tests:  {{ outputs.review_tests }}\n  - Style:  {{ outputs.review_style }}\n\nApply STRICTLY (higher rule wins; do NOT mix or soften):\n  1. If Safety starts with \"CRITICAL\" → final verdict BLOCK.\n     Pass through the safety reviewer's reason verbatim.\n  2. Else if Safety starts with \"WARNING\" OR Tests starts with\n     \"MISSING_TESTS\" → final verdict BLOCK_WITH_OVERRIDE\n     (user may proceed with explicit acknowledgement; pass the\n     warning(s) verbatim).\n  3. Else → PASS_WITH_NOTES. If Style starts with \"ANTIPATTERNS\",\n     append the style notes; if all three are clean, write\n     \"clean\" instead.\n\nReply with EXACTLY this structure on the first line, then\nadditional lines as needed:\n  BLOCK: <safety critical reason>\n  BLOCK_WITH_OVERRIDE: <warning(s); user must confirm>\n  PASS_WITH_NOTES: <style notes; or \"clean\">",
                    "system": "You arbitrate code review verdicts. Follow the priority rules exactly."
                },
                "depends_on": [
                    "review_safety",
                    "review_tests",
                    "review_style"
                ]
            }
        ]
    },
    "description": "Read the current uncommitted diff, run three independent reviewers (safety + tests-coverage + style) in parallel, then arbitrate a single BLOCK \/ BLOCK_WITH_OVERRIDE \/ PASS_WITH_NOTES verdict. Use before commit when you want a multi-perspective second-opinion instead of a single-reviewer agent loop.",
    "meta_priority": 65,
    "final_text_mode": "step:arbitrate"
}

Codereview of Current Diff (Meta-Skill)

A combinator-style meta-skill that runs three independent reviewers in parallel over the currently-uncommitted diff, then arbitrates a single verdict with a strict priority rule.

This is the same combinator + arbitrate pattern as meta-security-review-bundle, applied to a code-review domain. The three reviewers each carry a tight, project-specific rubric — safety focuses on injection / credentials / G1.6 contract; tests focuses on the "new public surface ⇒ corresponding test" expectation; style flags only a fixed list of antipatterns so it doesn't drift into free-form opinions.

Trigger surface

Fire by saying multi-reviewer diff, codereview my diff, or one of the localized triggers listed in the frontmatter. The diff is read from the working tree (git diff --cached HEAD, falling back to git diff HEAD if nothing is staged).

Fallback

If read_diff returns NO_DIFF, the downstream reviewers should reply with their respective clean verdicts ("CLEAR" / "PASS" / "CLEAN") and arbitrate emits PASS_WITH_NOTES: clean. If a reviewer LLM step fails, the orchestrator's partial outputs are visible in step_outputs; operator should manually re-run the failed reviewer.

Version History

  • 7f72a32 Current 2026-07-05 18:40

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/audio-cog/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/git-diff/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-js-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-python-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-rust-probe/SKILL.md
src/opensquilla/skills/bundled/subtitle-burner/SKILL.md
src/opensquilla/skills/bundled/swe-bench/SKILL.md
src/opensquilla/skills/bundled/text-file-read/SKILL.md
src/opensquilla/skills/bundled/title-card-image/SKILL.md
src/opensquilla/skills/bundled/video-merger/SKILL.md
src/opensquilla/skills/bundled/video-still-animator/SKILL.md
src/opensquilla/skills/bundled/voice-clone-lab/SKILL.md
src/opensquilla/skills/bundled/voice-conversion-studio/SKILL.md
src/opensquilla/skills/bundled/voiceover-studio/SKILL.md
src/opensquilla/skills/bundled/weather/SKILL.md
src/opensquilla/skills/bundled/web-search/SKILL.md
src/opensquilla/skills/bundled/xlsx/SKILL.md
src/opensquilla/skills/exp/meta-arxiv-daily-digest-deck/SKILL.md
src/opensquilla/skills/exp/meta-compliance-audit-bundle/SKILL.md
src/opensquilla/skills/exp/meta-diagram-triangulation/SKILL.md
src/opensquilla/skills/exp/meta-github-pr-watch-digest/SKILL.md
src/opensquilla/skills/exp/meta-issue-to-pr-autopilot/SKILL.md
src/opensquilla/skills/exp/meta-knowledge-base-bootstrap/SKILL.md
src/opensquilla/skills/exp/meta-migration-assistant/SKILL.md
src/opensquilla/skills/exp/meta-multi-format-export-pack/SKILL.md
src/opensquilla/skills/exp/meta-pdf-intelligence/SKILL.md
src/opensquilla/skills/exp/meta-pdf-reformat-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-pre-commit-quality-gate/SKILL.md
src/opensquilla/skills/exp/meta-scheduled-morning-digest/SKILL.md
src/opensquilla/skills/exp/meta-security-review-bundle/SKILL.md
src/opensquilla/skills/exp/meta-spreadsheet-insight/SKILL.md
src/opensquilla/skills/exp/meta-stack-trace-investigator/SKILL.md
src/opensquilla/skills/exp/meta-travel-planner/SKILL.md
src/opensquilla/skills/exp/meta-web-to-pdf-briefing/SKILL.md
tests/_fixtures/meta-paper-write-handwritten.SKILL.md
src/opensquilla/skills/bundled/code-task/SKILL.md
src/opensquilla/skills/bundled/deep-research/SKILL.md
src/opensquilla/skills/bundled/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/meta-paper-write/SKILL.md
src/opensquilla/skills/bundled/meta-short-drama/SKILL.md
src/opensquilla/skills/bundled/meta-skill-creator/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/pdf-toolkit/SKILL.md
src/opensquilla/skills/bundled/skill-creator/SKILL.md
src/opensquilla/skills/bundled/sub-agent/SKILL.md
src/opensquilla/skills/bundled/summarize/SKILL.md
src/opensquilla/skills/bundled/tmux/SKILL.md
src/opensquilla/skills/exp/meta-long-running-build-watchdog/SKILL.md
src/opensquilla/skills/bundled/paper-plot-stub/SKILL.md
src/opensquilla/skills/exp/meta-content-publish-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-home-it-rescue/SKILL.md
src/opensquilla/skills/exp/meta-meeting-to-workflow/SKILL.md
src/opensquilla/skills/exp/meta-research-to-slide-deck/SKILL.md
src/opensquilla/skills/exp/meta-sales-lead-researcher/SKILL.md

Metadata

Files
0
Version
7f72a32
Hash
9ac95480
Indexed
2026-07-05 18:40

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 05:46
浙ICP备14020137号-1 $bản đồ khách truy cập$