Token导航 LogoToken导航

Agent Skill · 开发

code-review(代码审查)

用于搭建或维护带检索增强的 RAG 工作流,适合让 Agent 处理知识库问答、向量检索、来源引用和事实核查。它可以辅助整理数据接入、Embedding、向量库、召回参数和回答生成流程。使用时需要确认数据来源、更新频率、召回阈值和引用展示方式,避免把未命中的资料或过期内容包装成确定事实。

code-review 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 16,500。

总安装 494周安装 21GitHub Stars 11,384下载 173核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-review(代码审查)
来源仓库:https://github.com/vectorize-io/hindsight
仓库路径:skills/code-review
安装命令:
npx skills add https://github.com/vectorize-io/hindsight --skill code-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vectorize-io/hindsight --skill code-review

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于代码审查与协作信息管理,适合在开发过程中检查代码变更、Issue 和 Pull Request。适用于需要围绕仓库状态、代码质量和团队协作进行整理和分析的场景。可结合项目现有规范和构建流程,辅助定位问题并生成改进建议。使用时需注意权限范围和文件读写操作,避免误改关键分支或敏感信息。

安装前建议确认仓库维护状态和网络访问权限,防止触发意外命令执行。

来源仓库内路径:skills/code-review

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vectorize-io/hindsight --skill code-review;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-review 怎么安装?

在终端执行 npx skills add https://github.com/vectorize-io/hindsight --skill code-review。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

code-review 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

code-review 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

code-review 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

code-review 用的人多吗?

公开数据是累计安装 494 次,近一周安装 21 次,下载 173 次,GitHub 11,384 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

code-review 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 11,384 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
code-review

代码审查 · 本页

49411,384调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Code Review

Review all changed code against the project's quality standards and coding conventions.

Code Standards

Read and internalize these standards before writing code. The review steps below verify compliance.

Python Style

  • Python 3.11+, type hints required
  • Async throughout (asyncpg, async FastAPI)
  • Pydantic models for request/response
  • Ruff for linting (line-length 120)
  • No Python files at project root - maintain clean directory structure
  • Never use multi-item tuple return values — not even for internal/private functions. Always use a dataclass or Pydantic model. No exceptions, no "it's just two values" shortcuts. If a function returns more than one value, define a named type for it.

Type Safety with Pydantic Models

NEVER use raw dict types for structured data — this applies to all code, including internal helpers and private functions. If the dict has known keys, it must be a dataclass or Pydantic model:

  • Use Pydantic BaseModel for all data structures passed between functions
  • Use @dataclass for lightweight internal data containers when Pydantic validation isn't needed
  • Add @field_validator for type coercion (e.g., ensuring datetimes are timezone-aware)
  • Avoid dict.get() patterns - use typed model attributes instead
  • Parse external data (JSON, API responses) into Pydantic models at the boundary
  • This catches type errors at parse time, not deep in business logic
  • The only acceptable dict usage is for truly dynamic/unknown keys (e.g., arbitrary metadata, JSON blobs with no fixed schema)
# BAD - error-prone dict access
def process(data: dict) -> str:
    return data.get("name", "")  # No validation, silent failures

# GOOD - typed and validated
class UserData(BaseModel):
    name: str
    created_at: datetime

    @field_validator("created_at", mode="before")
    @classmethod
    def ensure_tz_aware(cls, v):
        if isinstance(v, str):
            v = datetime.fromisoformat(v.replace("Z", "+00:00"))
        if v.tzinfo is None:
            return v.replace(tzinfo=timezone.utc)
        return v

def process(data: UserData) -> str:
    return data.name  # Type-safe, validated at construction

TypeScript Style

  • Next.js App Router for control plane
  • Tailwind CSS with shadcn/ui components

Code Comments

  • Always comment non-trivial technical decisions with the reasoning behind the choice. If someone would ask "why is it done this way?", there should be a comment.
  • Keep comments up to date with history — when changing an approach, update the comment to explain what was tried before and why it was changed. Comments serve as a tracker of previous implementations that likely had problems.
  • Don't comment obvious code — only where the "why" isn't self-evident from the code itself.
# BAD - no context for future readers
results = await asyncio.gather(*tasks, return_exceptions=True)

# GOOD - explains the non-obvious choice
# Use return_exceptions=True to avoid cancelling sibling tasks on failure.
# Previously we used TaskGroup but it cancelled all tasks when one failed,
# causing partial writes that left orphaned entity links (see #412).
results = await asyncio.gather(*tasks, return_exceptions=True)

Branch Hygiene

  • Always start new feature branches from origin/main — rebase to ensure a clean base.
  • Only include commits relevant to the PR/branch/feature — no unrelated changes. If the branch contains commits that don't belong, they must be removed before merging.

General Principles

  • Don't add features, refactor code, or make "improvements" beyond what was asked
  • Don't add unnecessary error handling for impossible scenarios
  • Don't create helpers or abstractions for one-time operations
  • No backwards-compatibility hacks (unused vars, re-exports, "removed" comments)
  • Three similar lines of code is better than a premature abstraction

Review Steps

1. Check branch hygiene

  • Run git log --oneline main..HEAD to list all commits on the branch.
  • Verify every commit is relevant to the feature/PR. Flag any unrelated commits.
  • Check the branch is based on a recent origin/main (no stale base).

2. Identify changed files

Run git diff --name-only HEAD (unstaged) and git diff --cached --name-only (staged) to get all changed files. If there are no local changes, diff against the base branch using git diff main...HEAD --name-only and git diff main...HEAD to review all commits on the current branch.

3. Run linters

./scripts/hooks/lint.sh

Report any failures. Do NOT fix them yourself — just report.

4. Check for dead code

For each changed Python file, check for:

  • Unused imports (Ruff should catch these, but verify)
  • Functions/methods/classes that were added but are never called from anywhere
  • Variables assigned but never read
  • Commented-out code blocks that should be removed

For each changed TypeScript file, check for:

  • Unused imports
  • Unused variables or functions
  • Commented-out code

5. Check type safety (Python)

For each changed Python file, check for violations:

  • No raw dict for structured data — must use Pydantic model or dataclass, even for internal/private functions (only exception: truly dynamic/unknown keys)
  • No multi-item tuple returns — must use dataclass or Pydantic model, even for internal/private functions (no exceptions)
  • Missing type hints on function parameters and return types
  • Missing @field_validator for datetime fields that should be timezone-aware

6. Check for missing tests

For each new or significantly changed function/endpoint/class:

  • Check if there is a corresponding test addition or update
  • New API endpoints MUST have integration tests
  • New utility functions MUST have unit tests
  • Bug fixes SHOULD have a regression test

Flag any new logic that lacks test coverage.

7. Check API consistency

If any files in hindsight-api-slim/hindsight_api/api/ were changed:

  • Were the OpenAPI specs regenerated? (./scripts/generate-openapi.sh)
  • Were the client SDKs regenerated? (./scripts/generate-clients.sh)
  • Were the control plane proxy routes updated? (hindsight-control-plane/src/app/api/)

8. Check code comments

For each non-trivial change:

  • New non-obvious logic — is there a comment explaining the reasoning?
  • Changed approach — does the comment include what was done before and why it changed?
  • Stale comments — do existing comments near the changed code still accurately describe the behavior?

9. Check integration completeness

If any files in hindsight-integrations/ were added or changed, verify:

  • Tests exist — the integration must have tests that simulate/exercise the external framework (not just pure unit tests of helpers). Check for a tests/ directory with meaningful test files.
  • CI job exists — check .github/workflows/test.yml for a corresponding test-<name>-integration job. If missing, flag it.
  • Release process — check that the integration name is in the VALID_INTEGRATIONS array in scripts/release-integration.sh. If missing, flag it.
  • Code standards — the integration code must follow all Python style rules (type hints, no raw dicts, no tuple returns, etc.).

10. Check MCP tool registration completeness

If any new MCP tools were added or existing tools renamed in hindsight-api-slim/hindsight_api/mcp_tools.py:

  • _ALL_TOOLS set in mcp_tools.py — must include the new tool name
  • tools_to_register default set in register_mcp_tools() in mcp_tools.py — must include the new tool name
  • _SINGLE_BANK_TOOLS set in hindsight-api-slim/hindsight_api/api/mcp.py — must include the new tool if it is bank-scoped (not a bank-management tool like list_banks/create_bank)
  • MCP_TOOL_GROUPS in hindsight-control-plane/src/components/bank-config-view.tsx — must include the new tool in the appropriate group for the UI tool selector
  • Tool count assertions in tests (e.g., test_mcp_tools.py) — must be updated to reflect the new count

11. Review against other coding standards

Check the diff for violations of the standards listed above:

  • Python files at project root (not allowed)
  • Missing async patterns (should be async throughout)
  • Pydantic models for request/response
  • Line length > 120 chars
  • New features/code beyond what was asked (over-engineering)
  • Unnecessary error handling for impossible scenarios
  • Premature abstractions or speculative helpers
  • Backwards-compatibility hacks (unused vars, re-exports, "removed" comments)

12. Report findings

Present a clear summary organized by severity:

Must fix — issues that will break CI or violate hard project rules:

  • Unrelated commits on the branch
  • Lint failures
  • Missing type hints on public functions
  • Raw dict usage for structured data (including internal code)
  • Multi-item tuple returns (including internal code)
  • Missing tests for new endpoints
  • New integration missing tests, CI job, or release-integration.sh entry

Should fix — issues that hurt code quality:

  • Dead code / unused imports missed by linter
  • Missing tests for non-trivial utility functions
  • Over-engineering beyond the task scope

Note — observations that may or may not need action:

  • API changes that might need client regeneration
  • Patterns that deviate from nearby code style

For each finding, include the file path, line number, and a brief explanation.

Do NOT auto-fix any issues. Report all findings and let the user decide what to address. If there are no findings, confirm the code looks good.

平台分布

Codex

36.51%
按下载量换算63

Claude

30.38%
按下载量换算53

Cursor

17.99%
按下载量换算31

Gemini CLI

9.31%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills