Token导航 LogoToken导航

Agent Skill · 研究检索

backend-code-review(后端代码审查)

backend-code-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

backend-code-review 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 53,604。

总安装 528周安装 22GitHub Stars 10下载 176核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/dauquangthanh/hanoi-rainbow --skill backend-code-review

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,适合根据关键词、任务场景或来源线索快速定位候选结果。适用于需要从大量技术资料中提取有用信息的场景。通过系统化的搜索策略,帮助 Agent 发现最佳实践、安全漏洞或性能瓶颈。使用时需明确搜索目标和范围,避免无效查询。建议结合项目实际技术栈调整检索关键词和过滤条件。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dauquangthanh/hanoi-rainbow --skill backend-co…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

backend-code-review 怎么安装?

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

backend-code-review 支持哪些 AI 工具?

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

backend-code-review 需要什么权限?

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

backend-code-review 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

backend-code-review 用的人多吗?

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

backend-code-review 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
backend-code-review

后端代码审查 · 本页

52810调用外部服务MIT通过

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

SKILL.md 原文

Backend Code Review

Conduct systematic backend code reviews to identify security vulnerabilities, performance bottlenecks, code quality issues, and architectural concerns. Produces actionable reports with specific locations and fix recommendations.

Review Process

Follow this structured approach for comprehensive backend code analysis:

1. Assess Technology Stack and Scope

Identify technologies and critical areas before starting:

Technology Inventory:

Backend Language: Node.js/Python/Java/Go/C#
Framework: Express/FastAPI/Spring Boot/Gin/ASP.NET
Database: PostgreSQL/MySQL/MongoDB/Redis
Architecture: Monolith/Microservices/Serverless
Deployment: AWS/GCP/Azure/Docker/Kubernetes

Critical Review Areas (prioritize these):

  • Authentication and authorization logic
  • Payment processing and financial transactions
  • Data access layers (ORM queries, raw SQL)
  • External API integrations and webhooks
  • Background jobs and async processing
  • File upload and download handlers

Example Scope Definition:

Review: User authentication service
Files: src/auth/*.ts (15 files, ~2000 lines)
Priority: High (handles user credentials and sessions)
Focus: Security vulnerabilities, JWT implementation, session management

2. Review Code Quality and Structure

Evaluate code organization, design patterns, and maintainability:

Code Organization Checklist:

☐ Proper layering (controllers → services → repositories → database)
☐ Consistent file and folder naming (kebab-case, camelCase, etc.)
☐ One class/function per file (or logically grouped)
☐ No circular dependencies between modules
☐ Clear separation of business logic and infrastructure code

SOLID Principles Validation:

Single Responsibility: Each class/module has one reason to change

// ❌ Bad: UserService does too much
class UserService {
  createUser() { }
  sendEmail() { }       // Should be EmailService
  processPayment() { }  // Should be PaymentService
}

// ✅ Good: Separated responsibilities
class UserService {
  createUser() { }
}
class EmailService {
  sendEmail() { }
}
class PaymentService {
  processPayment() { }
}

Dependency Injection: Dependencies injected, not hardcoded

# ❌ Bad: Hardcoded dependency
class UserService:
    def __init__(self):
        self.db = PostgresDB()  # Hardcoded, hard to test

# ✅ Good: Dependency injection
class UserService:
    def __init__(self, db: Database):
        self.db = db  # Injected, easy to mock

Error Handling Pattern:

// ❌ Bad: Silent failures
async function getUser(id: string) {
  try {
    return await db.users.findOne(id);
  } catch (err) {
    return null;  // Swallows error
  }
}

// ✅ Good: Proper error handling
async function getUser(id: string): Promise<User> {
  try {
    const user = await db.users.findOne(id);
    if (!user) {
      throw new NotFoundError(`User ${id} not found`);
    }
    return user;
  } catch (err) {
    logger.error('Failed to fetch user', { id, error: err });
    throw new DatabaseError('User fetch failed', { cause: err });
  }
}

Code Quality Issues to Flag:

  • Functions > 50 lines (should be split)
  • Classes > 300 lines (too many responsibilities)
  • Cyclomatic complexity > 10 (simplify logic)
  • Code duplication > 5 lines (extract to function)
  • Missing type definitions (TypeScript, type hints)
  • Magic numbers (use named constants)

Load detailed checklist: code-quality-checklist.md

3. Validate API Design

Review API endpoints for REST, GraphQL, or gRPC implementations:

REST API Review:

Endpoint Structure:

✅ Good REST Design:
GET    /api/v1/users           - List users (paginated)
GET    /api/v1/users/:id       - Get single user
POST   /api/v1/users           - Create user
PUT    /api/v1/users/:id       - Replace user
PATCH  /api/v1/users/:id       - Update user
DELETE /api/v1/users/:id       - Delete user

❌ Poor REST Design:
GET    /api/v1/getAllUsers     - Use plural nouns, not verbs
POST   /api/v1/user/create     - POST implies creation
GET    /api/v1/user/get/123    - Use path params, not verbs

HTTP Status Codes:

✅ Correct Usage:
200 OK - Successful GET, PUT, PATCH
201 Created - Successful POST (with Location header)
204 No Content - Successful DELETE
400 Bad Request - Invalid input
401 Unauthorized - Missing/invalid authentication
403 Forbidden - Authenticated but not authorized
404 Not Found - Resource doesn't exist
409 Conflict - Duplicate resource
422 Unprocessable Entity - Validation failed
500 Internal Server Error - Server error

❌ Common Mistakes:
200 for errors - Should use 4xx or 5xx
500 for validation errors - Should use 400 or 422
404 for unauthorized - Should use 403

Pagination Implementation:

// ✅ Good: Cursor-based pagination for large datasets
GET /api/v1/orders?cursor=eyJpZCI6MTIzfQ&limit=20
Response: {
  data: [...],
  pagination: {
    nextCursor: "eyJpZCI6MTQzfQ",
    hasMore: true
  }
}

// ✅ Good: Offset pagination for small/medium datasets
GET /api/v1/users?page=2&pageSize=20
Response: {
  data: [...],
  pagination: {
    page: 2,
    pageSize: 20,
    totalPages: 15,
    totalItems: 300
  }
}

GraphQL Review:

N+1 Query Detection:

# ❌ Bad: Causes N+1 queries
query {
  posts {
    id
    title
    author {  # Separate query for each post
      name
    }
  }
}

# ✅ Good: Use DataLoader to batch
const authorLoader = new DataLoader(async (authorIds) => {
  // Batch fetch all authors in one query
  return await db.authors.findByIds(authorIds);
});

gRPC Review:

Check protocol buffer definitions and error handling:

// ✅ Good proto definition
message GetUserRequest {
  string user_id = 1 [(validate.rules).string.uuid = true];
}

message GetUserResponse {
  User user = 1;
}

service UserService {
  rpc GetUser(GetUserRequest) returns (GetUserResponse);
}

Load detailed checklist: api-design-checklist.md

4. Analyze Database Queries and Schema

Review database patterns, query optimization, and data integrity:

SQL Injection Prevention:

# ❌ Critical: SQL injection vulnerability
def get_user(username):
    query = f"SELECT * FROM users WHERE username = '{username}'"
    return db.execute(query)

# ✅ Good: Parameterized queries
def get_user(username):
    query = "SELECT * FROM users WHERE username = ?"
    return db.execute(query, (username,))

N+1 Query Problem:

// ❌ Bad: N+1 queries (1 query + N queries for authors)
const posts = await Post.findAll();
for (const post of posts) {
  post.author = await User.findById(post.authorId);  // N queries!
}

// ✅ Good: Join or eager load
const posts = await Post.findAll({
  include: [{ model: User, as: 'author' }]  // 1 query with join
});

Missing Indexes:

-- ❌ Bad: Queries without indexes
SELECT * FROM orders WHERE user_id = 123;  -- No index on user_id
SELECT * FROM products WHERE status = 'active' AND category = 'electronics';

-- ✅ Good: Add indexes for common queries
CREATE INDEX idx_orders_user_id ON orders(user_id);
CREATE INDEX idx_products_status_category ON products(status, category);

Transaction Handling:

// ❌ Bad: No transaction for multi-step operation
public void transferFunds(Long fromId, Long toId, BigDecimal amount) {
    Account from = accountRepo.findById(fromId);
    Account to = accountRepo.findById(toId);
    from.setBalance(from.getBalance().subtract(amount));
    to.setBalance(to.getBalance().add(amount));
    accountRepo.save(from);  // What if this fails?
    accountRepo.save(to);    // Money lost!
}

// ✅ Good: Atomic transaction
@Transactional
public void transferFunds(Long fromId, Long toId, BigDecimal amount) {
    Account from = accountRepo.findById(fromId);
    Account to = accountRepo.findById(toId);
    from.setBalance(from.getBalance().subtract(amount));
    to.setBalance(to.getBalance().add(amount));
    accountRepo.save(from);
    accountRepo.save(to);
    // Both save or both rollback
}

Connection Pool Configuration:

✅ Recommended Settings:
- Pool size: 10-20 connections (not 100+)
- Connection timeout: 30 seconds
- Idle timeout: 10 minutes
- Max lifetime: 30 minutes
- Connection validation before use

Load detailed checklist: database-checklist.md

5. Audit Security Vulnerabilities

Identify authentication, authorization, and data protection issues:

Authentication Security:

Password Hashing:

// ❌ Critical: Plain text or weak hashing
const hashedPassword = md5(password);  // MD5 is broken

// ✅ Good: Strong hashing with bcrypt or argon2
const hashedPassword = await bcrypt.hash(password, 12);  // Cost factor 12+

JWT Implementation:

// ❌ Bad: Weak JWT configuration
const token = jwt.sign({ userId: user.id }, 'secret123');  // Weak secret, no expiry

// ✅ Good: Secure JWT configuration
const token = jwt.sign(
  { userId: user.id, role: user.role },
  process.env.JWT_SECRET,  // Strong secret from env
  {
    expiresIn: '15m',       // Short-lived access token
    algorithm: 'HS256',
    issuer: 'api.example.com',
    audience: 'app.example.com'
  }
);

Authorization Validation:

# ❌ Bad: Missing authorization check
@app.route('/api/users/<user_id>', methods=['DELETE'])
def delete_user(user_id):
    db.delete_user(user_id)  # Anyone can delete any user!
    return {'success': True}

# ✅ Good: Proper authorization
@app.route('/api/users/<user_id>', methods=['DELETE'])
@requires_auth
def delete_user(user_id):
    current_user = get_current_user()
    if current_user.id != user_id and not current_user.is_admin:
        raise ForbiddenError("Cannot delete other users")
    db.delete_user(user_id)
    return {'success': True}

Input Validation:

// ❌ Bad: No validation
app.post('/api/users', (req, res) => {
  const user = req.body;  // Trust user input
  db.createUser(user);
});

// ✅ Good: Schema validation
const createUserSchema = z.object({
  email: z.string().email().max(255),
  password: z.string().min(12).max(128),
  age: z.number().int().min(18).max(120),
  role: z.enum(['user', 'admin'])
});

app.post('/api/users', (req, res) => {
  const validatedData = createUserSchema.parse(req.body);  // Throws if invalid
  db.createUser(validatedData);
});

Security Checklist:

☐ Passwords hashed with bcrypt/argon2 (cost factor ≥12)
☐ JWT tokens expire within 1 hour (15min recommended)

平台分布

Codex

27.7%
按下载量换算49

Claude Code

22.38%
按下载量换算39

Antigravity

17.85%
按下载量换算31

Gemini CLI

11.18%
按下载量换算20

windsurf

7.11%
按下载量换算13

OpenCode

3.12%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills