Token导航 LogoToken导航

Agent Skill · 开发

code-quality(代码质量)

code-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

code-quality 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 20,764。

总安装 212周安装 9GitHub Stars 2下载 74核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/xbklairith/kisune --skill code-quality

这个 Skill 是做什么的

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

code-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前功能描述基于仓库公开信息,实际能力以源码和文档为准。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-quality 怎么安装?

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

code-quality 支持哪些 AI 工具?

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

code-quality 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

code-quality 是免费的吗?

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

code-quality 用的人多吗?

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

code-quality 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 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-quality

代码质量 · 本页

2122接触敏感数据MIT通过

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

SKILL.md 原文

Code Quality Skill

Purpose

Perform systematic code reviews, identify issues, suggest refactorings, and enforce best practices. Acts as an automated code reviewer catching problems before they reach production.

Activation Triggers

Activate this skill when:

  • User says "review this code"
  • User asks "can this be improved?"
  • User mentions "refactoring", "optimization", or "code smell"
  • Before git commits (pre-commit review)
  • After completing a feature
  • User uses /dev-workflow:review command
  • User says "is this code good?"

Comprehensive Review Checklist

1. Code Structure

Single Responsibility Principle (SRP)

  • ✅ Check: Each function/class has one clear purpose
  • ❌ Red Flag: Functions doing multiple unrelated things
  • 💡 Suggestion: Split into focused, single-purpose functions

DRY (Don't Repeat Yourself)

  • ✅ Check: No duplicated logic
  • ❌ Red Flag: Copy-pasted code blocks
  • 💡 Suggestion: Extract to shared function/utility

Function Length

  • ✅ Check: Functions under 50 lines (prefer under 30)
  • ❌ Red Flag: Functions over 100 lines
  • 💡 Suggestion: Break into smaller, composable functions

Naming Clarity

  • ✅ Check: Names clearly describe purpose
  • ❌ Red Flag: Vague names (data, info, temp, x, y)
  • 💡 Suggestion: Use descriptive, intention-revealing names

Magic Numbers

  • ✅ Check: Constants are named
  • ❌ Red Flag: Unexplained numbers in code
  • 💡 Suggestion: Extract to named constants

2. Error Handling

All Errors Caught

  • ✅ Check: Try-catch blocks around risky operations
  • ❌ Red Flag: Unhandled promise rejections, missing error handling
  • 💡 Suggestion: Add comprehensive error handling

No Silent Failures

  • ✅ Check: Errors are logged or surfaced
  • ❌ Red Flag: Empty catch blocks, ignored errors
  • 💡 Suggestion: Log errors with context, alert user appropriately

User-Friendly Error Messages

  • ✅ Check: Errors explain what went wrong and what to do
  • ❌ Red Flag: Technical jargon exposed to users
  • 💡 Suggestion: Translate technical errors to user language

Logging for Debugging

  • ✅ Check: Appropriate logging at key points
  • ❌ Red Flag: No logging or excessive logging
  • 💡 Suggestion: Add structured logging with context

Edge Cases Covered

  • ✅ Check: Boundary conditions handled (null, undefined, empty, zero)
  • ❌ Red Flag: Assumptions about inputs
  • 💡 Suggestion: Add defensive checks and validation

3. Security

Input Validation

  • ✅ Check: All user inputs validated and sanitized
  • ❌ Red Flag: Raw user input used directly
  • 💡 Suggestion: Add validation with schema libraries (Zod, Joi, etc.)

SQL Injection Prevention

  • ✅ Check: Parameterized queries or ORM used
  • ❌ Red Flag: String concatenation in SQL
  • 💡 Suggestion: Use prepared statements or ORM methods

XSS Prevention

  • ✅ Check: HTML output escaped, CSP headers set
  • ❌ Red Flag: innerHTML with user content
  • 💡 Suggestion: Use textContent or framework's safe rendering

Sensitive Data Handling

  • ✅ Check: Passwords hashed, PII encrypted, secure transmission
  • ❌ Red Flag: Plain text secrets, sensitive data in logs
  • 💡 Suggestion: Use bcrypt, encrypt at rest, sanitize logs

Environment Variables for Secrets

  • ✅ Check: API keys, credentials in.env files
  • ❌ Red Flag: Hardcoded credentials in code
  • 💡 Suggestion: Move to environment variables, use secret managers

4. Performance

No N+1 Queries

  • ✅ Check: Batch queries, eager loading used
  • ❌ Red Flag: Query inside loop
  • 💡 Suggestion: Use includes/joins, batch operations

Appropriate Caching

  • ✅ Check: Expensive operations cached
  • ❌ Red Flag: Repeated identical API calls or computations
  • 💡 Suggestion: Add caching layer (Redis, in-memory, etc.)

Database Indexes

  • ✅ Check: Indexed columns used in WHERE/JOIN clauses
  • ❌ Red Flag: Full table scans on large tables
  • 💡 Suggestion: Add indexes on frequently queried columns

Unnecessary Computations

  • ✅ Check: Early returns, lazy evaluation
  • ❌ Red Flag: Work done before checking preconditions
  • 💡 Suggestion: Move expensive operations after validation

Memory Leak Prevention

  • ✅ Check: Event listeners cleaned up, connections closed
  • ❌ Red Flag: Growing arrays, unclosed connections
  • 💡 Suggestion: Add cleanup in finally blocks, use weak references

5. Testing

Tests Exist

  • ✅ Check: Tests cover new functionality
  • ❌ Red Flag: No tests for new code
  • 💡 Suggestion: Write tests for all new functions/components

Edge Cases Tested

  • ✅ Check: Boundary conditions, null/undefined handled
  • ❌ Red Flag: Only happy path tested
  • 💡 Suggestion: Add tests for edge cases and error conditions

Happy Path Tested

  • ✅ Check: Normal operation verified
  • ❌ Red Flag: No positive test cases
  • 💡 Suggestion: Add tests for expected behavior

Error Conditions Tested

  • ✅ Check: Invalid inputs, failures handled
  • ❌ Red Flag: Error paths not verified
  • 💡 Suggestion: Add tests for error scenarios

Tests Are Maintainable

  • ✅ Check: Clear test names, minimal duplication
  • ❌ Red Flag: Complex test setup, brittle assertions
  • 💡 Suggestion: Extract test helpers, use clear assertions

Review Process

Step 1: Determine Scope

Ask user what to review:

  1. Current staged changes (git diff --cached)
  2. Current unstaged changes (git diff)
  3. Specific file or directory
  4. Entire feature
  5. Recent commits

Step 2: Analyze Code

Run appropriate git diff or read files:

# For staged changes
git diff --cached

# For unstaged changes
git diff

# For specific file
Read file_path

# For feature
git diff main...HEAD

Step 3: Apply Checklist

Systematically go through:

  1. Code Structure (5 checks)
  2. Error Handling (5 checks)
  3. Security (5 checks)
  4. Performance (5 checks)
  5. Testing (5 checks)

UltraThink Architectural Issues: If review reveals fundamental architectural problems, activate deep thinking:

🗣 Say: "This code has architectural issues. Let me ultrathink whether refactoring or redesign is needed."

When to UltraThink:

  • Code violates multiple principles (SRP, DRY, YAGNI)
  • Tight coupling makes testing difficult
  • Similar logic duplicated across multiple files
  • Error handling is scattered and inconsistent
  • Performance issues suggest wrong data structure/algorithm

Question deeply:

  • Is this a symptom of wrong architecture?
  • Would refactoring fix root cause or just move complexity?
  • What would this look like if designed from scratch?
  • What's preventing clean separation of concerns?
  • Is the domain model wrong?

After UltraThink: Recommend tactical fixes (refactor) vs. strategic redesign with clear reasoning.

Step 4: Generate Review Report

Review Output Format

## Code Review: [File/Feature Name]

### ✅ Strengths

[List what's done well - be specific and encouraging]
- Clear function naming in authentication module
- Comprehensive error handling for API calls
- Good test coverage (87%)

### ⚠️ Issues Found

#### Priority: High - Must Fix Before Merge
1. **[Issue Title]**
   - **Location:** `file.js:42`
   - **Problem:** [Specific description]
   - **Risk:** [What could go wrong]
   - **Fix:** [How to resolve]

#### Priority: Medium - Should Address
1. **[Issue Title]**
   - **Location:** `file.js:78`
   - **Problem:** [Description]
   - **Impact:** [Effect on code quality]
   - **Suggestion:** [Improvement approach]

#### Priority: Low - Consider Improving
1. **[Issue Title]**
   - **Location:** `file.js:120`
   - **Note:** [Observation]
   - **Enhancement:** [Optional improvement]

### 💡 Refactoring Suggestions

#### Suggestion 1: [Title]
**Current Code:**

// Show problematic code


**Refactored Code:**

// Show improved version


**Benefits:**

- [Benefit 1]
- [Benefit 2]

#### Suggestion 2: [Title]

[Similar format]

### 📊 Code Metrics

- **Complexity:** [Low/Medium/High]
- **Test Coverage:** [X%]
- **Maintainability:** [A/B/C/D/F]
- **Lines of Code:** [N]
- **Duplicated Code:** [X%]

### 🎯 Action Items

- Fix high-priority issues
- Address medium-priority items
- Consider refactoring suggestions
- Add tests for uncovered paths
- Update documentation

---

**Overall Assessment:** [Summary statement] **Recommendation:** [Approve/Request Changes/Reject]

[Confidence: X.X]

Examples

Example 1: Pre-Commit Review

User: "I'm about to commit, can you review my changes?"

Assistant:


Activating code-quality skill for pre-commit review.

Running: git diff --cached

Found changes in:

- src/auth/login.js
- src/auth/session.js
- tests/auth/login.test.js

Performing comprehensive review...

## Code Review: Authentication Changes

### ✅ Strengths

- Comprehensive test coverage for login flow
- Clear separation of concerns between login and session
- Good use of async/await for API calls

### ⚠️ Issues Found

#### Priority: High - Must Fix Before Merge

1. **Missing Input Validation**
  - **Location:** `src/auth/login.js:23`
  - **Problem:** Email and password not validated before API call
  - **Risk:** Invalid inputs could crash backend or expose security issue
  - **Fix:** Add validation with Zod schema

**Current Code:**

const login = async (email, password) => { const response = await api.post('/auth/login', { email, password }); return response.data; };


**Suggested Fix:**

import { z } from 'zod';

const loginSchema = z.object({ email: z.string().email('Invalid email format'), password: z.string().min(8, 'Password must be at least 8 characters') });

const login = async (email, password) => { // Validate inputs const validated = loginSchema.parse({ email, password });

const response = await api.post('/auth/login', validated); return response.data; };


#### Priority: Medium - Should Address

1. **Missing Error Handling**
  - **Location:** `src/auth/login.js:23`
  - **Problem:** No try-catch for API call
  - **Impact:** Unhandled promise rejections
  - **Suggestion:** Add error handling with user-friendly messages

[...continues with full review...]

**Overall Assessment:** Good implementation with solid test coverage, but needs input validation and error handling before commit.

**Recommendation:** Request Changes - Fix high-priority issues before committing.

[Confidence: 0.9]

Example 2: Refactoring Request

User: "Can you suggest improvements for src/utils/calculator.js?"

Assistant:


Activating code-quality skill for refactoring analysis.

Reading: src/utils/calculator.js

Analyzing code structure and quality...

## Code Review: Calculator Utility

### ✅ Strengths

- Pure functions, no side effects
- Good mathematical accuracy

### 💡 Refactoring Suggestions

#### Suggestion 1: Extract Magic Numbers

**Current Code:**

function calculateFee(amount) { return amount * 0.029 + 0.30; }


**Refactored Code:**

const STRIPE_PERCENTAGE_FEE = 0.029; const STRIPE_FIXED_FEE = 0.30;

function calculateFee(amount) { return amount * STRIPE_PERCENTAGE_FEE + STRIPE_FIXED_FEE; }


**Benefits:**

- Self-documenting code
- Easier to update fees
- Clearer business logic

#### Suggestion 2: Add Input Validation

**Current Code:**

function calculateFee(amount) { return amount * 0.029 + 0.30; }


**Refactored Code:**

function calculateFee(amount) { if (typeof amount !== 'number' || amount < 0) { throw new Error('Amount must be a non-negative number'); } return amount * STRIPE_PERCENTAGE_FEE + STRIPE_FIXED_FEE; }


**Benefits:**

- Prevents calculation errors
- Fails fast with clear error
- Self-validating function

[...continues with more suggestions...]

Would you like me to apply these refactorings?

[Confidence: 0.9]

Integration Points

  • Works with spec-driven skill during execution phase
  • Works with git-workflow skill for pre-commit reviews
  • Works with systematic-testing skill to verify test quality
  • Triggered automatically before commits if integrated

Notes

  • Be thorough but constructive
  • Prioritize issues appropriately
  • Always provide specific code examples
  • Explain WHY something is an issue, not just WHAT
  • Offer concrete solutions, not just criticism
  • Balance between perfectionism and pragmatism
  • Focus on high-impact improvements

平台分布

Claude Code

32.41%
按下载量换算24

windsurf

21.85%
按下载量换算16

trae

17.55%
按下载量换算13

OpenCode

11.29%
按下载量换算8

weavefox

8.77%
按下载量换算6

Codex

3.78%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills