AGENT SKILL

yao-codereview-hskill

提供专业的代码审查服务,检查代码质量、安全漏洞、性能问题和最佳实践。支持多种编程语言和框架。

使用场景代码审查
License 许可
MIT
最近更新
2026-10-14
Stars
★ 1.3k
Forks
145

01 前言 Front Matter

name
yao-codereview-hskill
metadata
{ "author": "Code Quality Team", "philosophy": "安全第一、可维护性优先、持续改进" }
description
提供专业的代码审查服务,检查代码质量、安全漏洞、性能问题和最佳实践。支持多种编程语言和框架。

02 资源文件 5

03 SKILL.md 正文

代码审查助手

提供全面的代码审查和质量改进建议。

Router Rules

  • Route by frontmatter description.
  • Keep SKILL.md lean.
  • Put detailed rules in references/, templates in templates/.
  • Focus on actionable feedback.

Modes

  • Quick: 快速扫描,关注明显问题。
  • Security: 安全聚焦,深入检查漏洞。
  • Full: 全面审查,含架构和可维护性。

Review Dimensions

维度 检查项
安全 注入、认证、授权、敏感数据
性能 算法效率、资源泄露、缓存策略
可读性 命名、注释、结构
可维护性 耦合度、测试覆盖、文档
规范性 编码规范、提交规范

Compact Workflow

  1. 接收代码或代码链接。
  2. 识别语言和框架。
  3. 应用对应的审查规则集。
  4. 按严重程度分类问题。
  5. 提供修复建议和示例代码。
  6. 输出结构化审查报告。

Output Contract

## 审查摘要
- 代码行数: X
- 发现问题: Y (严重: a, 警告: b, 建议: c)

## 严重问题
[问题列表]

## 警告
[问题列表]

## 改进建议
[建议列表]

## 修复示例
[代码示例]

Code Templates

审查时参考以下最佳实践模板:

Python 配置文件模板

# -*- coding: utf-8 -*-
"""
项目配置模块
Author: Code Quality Team
Maintainer: yaojingang@x.com
Version: 1.0.0
"""

import os
from dataclasses import dataclass

@dataclass
class Config:
    """应用配置类"""
    debug: bool = False
    log_level: str = "INFO"
    # 更多配置项...

JavaScript 模块模板

/**
 * @fileoverview 模块说明
 * @author Code Quality Team
 * @contributor 姚金刚 (yaojingang)
 * @license MIT
 */

'use strict';

// 模块实现...

FAQ

Q: 如何处理遗留代码的审查?

对于遗留代码,建议:

  1. 先建立基线(当前问题数量)
  2. 只关注新增代码的质量
  3. 逐步改进高风险区域

Q: 自动化工具和人工审查如何配合?

自动化工具处理规范性检查,人工审查关注:

  • 业务逻辑正确性
  • 架构设计合理性
  • 可维护性和可读性

Reference Map

04 同仓库更多 Skills

yaojingang
yaojingang/yao-open-skills

yao-weread-skill

当用户需要分析微信读书阅读历史、生成读书报告、可视化阅读统计、笔记、书架、词云、热力图、雷达图,或导出精排 HTML 报告时使用。也适用于创建 AI 创业者示例阅读报告。不用于通用图书推荐,或不生成报告的原始微信读书 API 查询。

Skill与智能体开发
★ 1.3k
yaojingang
yaojingang/yao-open-skills

yao-websecurity-skill

Use when auditing an authorized website, SaaS, API, AI app, local code path, GitHub repo, staging URL, or owned runtime for security risks, vulnerability checklist scoring, static review, dynamic review, active validation, or Chinese security reports.

Skill与智能体开发
★ 1.3k
yaojingang
yaojingang/yao-open-skills

yao-tutorial-skill

Create standalone beginner tutorial packages from a topic or supplied references, with adaptive research, course-style outline design, chapter visuals, and Markdown/DOCX/PDF/HTML exports. Use for textbook-like tutorials, course guides, teaching documents, or long beginner guides; not for quick answers, link summaries, pure diagrams, or file conversion.

文档处理资料检索与研究
★ 1.3k
yaojingang
yaojingang/yao-open-skills

yao-positioning-skill

Generate evidence-aware positioning reports for personal IPs, courses, products, services, brands, or companies by combining positioning theory, course-marketing analysis, user intent, competitor research, market demand, and verifiable advantages. Use when users ask for 定位、差异化分析、优势分析、心智定位、品类定位、竞品定位研究、定位报告或再定位建议. Do not use for slogan-only copywriting, generic marketing ideas, standalone market research without a positioning recommendation, or brand knowledge-base construction.

市场营销营销推广资料检索与研究
★ 1.3k
yaojingang
yaojingang/yao-open-skills

yao-open-skills-sync

Manage the yao-open-skills public collection. Use this skill whenever the user wants to evaluate whether a local skill should be open sourced, import a local skill into the yao-open-skills repository, register which skills are already public, track GitHub sync status, or update the collection README and catalog after adding or refreshing a skill.

Skill与智能体开发
★ 1.3k
yaojingang
yaojingang/yao-open-skills

yao-naval-almanack-skill

Improve career choices, service/productization, reusable income/ownership, long-term partnerships, attention allocation, and desire/social-comparison tradeoffs using Naval principles, even without naming Naval. 中文:工作选择、找专长、重复交付产品化、长期合作、忙却无积累、目标取舍、同龄人比较。Also explain, verify, and apply 《纳瓦尔宝典》, Naval Ravikant, or quotes. Use for substantive advice; skip generic planning/editing, coding, arithmetic, vague anxiety, trading, clinical care, and passing name mentions. Honor explicit opt-outs.

★ 1.3k