Agent Skillscivitai/civitai › agent-review

agent-review

GitHub

通过调用外部AI模型(如Claude、GPT、Gemini)获取代码审查、架构反馈或第二意见。支持指定文件、行范围及上下文,适用于多种开发场景的自动化评审需求。

apps/event-engine/.claude/skills/agent-review/SKILL.md civitai/civitai

Trigger Scenarios

需要代码审查 寻求架构建议 获取代码安全评估

Install

npx skills add civitai/civitai --skill agent-review -g -y
More Options

Non-standard path

npx skills add https://github.com/civitai/civitai/tree/main/apps/event-engine/.claude/skills/agent-review -g -y

Use without installing

npx skills use civitai/civitai@agent-review

指定 Agent (Claude Code)

npx skills add civitai/civitai --skill agent-review -a claude-code -g -y

安装 repo 全部 skill

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

预览 repo 内 skill

npx skills add civitai/civitai --list

SKILL.md

Frontmatter
{
    "name": "agent-review",
    "description": "Get external agent review and feedback. Routes Anthropic models through Claude Agent SDK (uses local subscription) and other models through OpenRouter API. Use for code review, architecture feedback, or any external consultation."
}

Agent Review

Get feedback from an external AI agent. Useful for code review, architecture decisions, or getting a second opinion.

Running Commands

echo "code or prompt" | node .claude/skills/agent-review/query.mjs [options] "Your question"
# or
node .claude/skills/agent-review/query.mjs --file <path> [options] "Your question"

Options

Flag Short Description
--model <model> -m Model or alias (default: gemini)
--file <path> -f Read input from file instead of stdin
--lines <start-end> -l Extract specific lines from file (e.g., 50-100)
--context <path> -c Additional context file (can repeat)
--system <prompt> -s Custom system prompt
--temperature <n> -t Temperature 0-1 (default: 0.7)
--quiet -q Suppress status messages and usage stats
--list List available models
--json Output raw JSON response

Available Models

Model ID Aliases Provider Notes
google/gemini-3-pro-preview gemini, g3 OpenRouter Default - good for external perspective
openai/gpt-5.1-codex gpt, codex, gpt5 OpenRouter Strong at code analysis
anthropic/claude-opus-4.5 opus, claude-opus Agent SDK Uses local subscription
anthropic/claude-sonnet-4.5 sonnet, claude Agent SDK Uses local subscription

Anthropic models route through Claude Agent SDK (uses your Claude subscription). Other models route through OpenRouter API (requires OPENROUTER_API_KEY).

Environment Variables

Variable Required Description
OPENROUTER_API_KEY For non-Anthropic models OpenRouter API key
AGENT_REVIEW_DEFAULT_MODEL No Override default model

Examples

Code Review

# Review a file for security issues
cat src/server/auth.ts | node .claude/skills/agent-review/query.mjs \
  "Review this authentication code for security vulnerabilities"

# Review with a specific model (using alias)
node .claude/skills/agent-review/query.mjs -m gpt -f src/utils/parser.ts \
  "Review this parser for edge cases and error handling"

Reviewing Specific Lines

# Review a specific function (lines 50-100)
node .claude/skills/agent-review/query.mjs \
  -f src/server/auth.ts -l 50-100 \
  "Review this authentication function for security issues"

# Review a single line
node .claude/skills/agent-review/query.mjs \
  -f src/utils/parser.ts -l 42 \
  "Is this regex safe from ReDoS attacks?"

With Context Files

# Review code with type definitions as context
node .claude/skills/agent-review/query.mjs \
  -f src/api/routes.ts \
  -c src/types/api.ts \
  -c src/types/models.ts \
  "Review this API implementation"

# Review component with its hooks as context
node .claude/skills/agent-review/query.mjs \
  -f src/components/UserProfile.tsx \
  -c src/hooks/useUser.ts \
  "Review this React component for performance issues"

Architecture Feedback

# Get feedback on a proposed design
cat docs/design-proposal.md | node .claude/skills/agent-review/query.mjs \
  "What are the potential issues with this architecture?"

Custom System Prompt

node .claude/skills/agent-review/query.mjs \
  -f src/api/routes.ts \
  -s "You are a security expert specializing in API design" \
  "Audit this API for OWASP top 10 vulnerabilities"

Temperature Control

# Lower temperature for more deterministic analysis
node .claude/skills/agent-review/query.mjs -t 0.2 -f src/algo.ts \
  "Analyze the time complexity"

# Higher temperature for creative suggestions
node .claude/skills/agent-review/query.mjs -t 0.9 -f src/ui.tsx \
  "Suggest ways to improve the user experience"

Using Anthropic Models (Local Subscription)

# Uses Claude Agent SDK - no API credits consumed
node .claude/skills/agent-review/query.mjs -m opus -f complex-algorithm.ts \
  "Analyze the time complexity and suggest optimizations"

Quiet Mode (for scripting)

# Suppress all status messages, only output the response
REVIEW=$(node .claude/skills/agent-review/query.mjs -q -f src/auth.ts \
  "List security issues as JSON array")
echo "$REVIEW" | jq .

Output

The response text is written to stdout. After the response, usage stats are shown on stderr:

Tokens: 189 in / 871 out (1060 total)
Cost: $0.0108

This helps track token consumption and costs for OpenRouter requests. Use --quiet to suppress.

When to Use

  • Code Review: Get a second opinion on code quality, security, or performance
  • Architecture Decisions: Validate design choices with another perspective
  • Bug Analysis: Share error context and get debugging suggestions
  • Documentation Review: Check if docs are clear and complete
  • Test Coverage: Identify missing test cases

Tips

  • Default model (Gemini 3 Pro) is recommended for most external reviews
  • Use Anthropic models when you want consistency with Claude's style
  • Use -l to review specific functions without sending the entire file (saves tokens)
  • Use -c to include type definitions or related files for better context
  • Use -t 0.2 for more focused/deterministic responses, -t 0.8 for creative suggestions
  • Pipe code directly for quick reviews: cat file.ts | node ... "review this"

Version History

  • 4214ecb Current 2026-08-20 18:50

Same Skill Collection

.claude/skills/add-ecosystem/SKILL.md
.claude/skills/add-generation-support/SKILL.md
.claude/skills/add-prompt-enhancement-guide/SKILL.md
.claude/skills/add-training-support/SKILL.md
.claude/skills/axiom/SKILL.md
.claude/skills/browser-automation/SKILL.md
.claude/skills/civitai-orchestration/SKILL.md
.claude/skills/civitai-review/SKILL.md
.claude/skills/cleanup/SKILL.md
.claude/skills/clickhouse-query/SKILL.md
.claude/skills/clickup/SKILL.md
.claude/skills/cloudflare/SKILL.md
.claude/skills/component-preview/SKILL.md
.claude/skills/deploy-status/SKILL.md
.claude/skills/dev-server/SKILL.md
.claude/skills/discord/SKILL.md
.claude/skills/feature-walkthrough/SKILL.md
.claude/skills/feedback-triage/SKILL.md
.claude/skills/flipt/SKILL.md
.claude/skills/freshdesk/SKILL.md
.claude/skills/meilisearch-admin/SKILL.md
.claude/skills/metabase/SKILL.md
.claude/skills/mod-actions/SKILL.md
.claude/skills/moderator-page-migration/SKILL.md
.claude/skills/postgres-query/SKILL.md
.claude/skills/quick-mockups/SKILL.md
.claude/skills/redis-inspect/SKILL.md
.claude/skills/retool-migration/SKILL.md
.claude/skills/retool-query/SKILL.md
.claude/skills/scaffold-civitai-app/SKILL.md
.claude/skills/stripe/SKILL.md
.claude/skills/svelte-review/SKILL.md
.claude/skills/ux-design/SKILL.md
.claude/skills/write-model-description/SKILL.md
.claude/skills/xguard-manager/SKILL.md
apps/event-engine/.claude/skills/clickhouse-query/SKILL.md
apps/event-engine/.claude/skills/clickup/SKILL.md
apps/event-engine/.claude/skills/postgres-query/SKILL.md
apps/event-engine/.claude/skills/redis-inspect/SKILL.md
.claude/skills/ecosystem-seo-page/SKILL.md

Metadata

Files
0
Version
dc828b5
Hash
85b6f010
Indexed
2026-08-20 18:50

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 02:29
浙ICP备14020137号-1 $Гость$