Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计异常

code-quality-audit代码质量审计

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

275

周安装

8

GitHub Stars

公开资料未说明

下载量

65
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/harshitsinghbhandari/domain-expansion --skill code-quality-audit

简介

code-quality-audit 采用 Sukuna 式冷峻审计与 Gojo 式优雅改进双阶段模型,全面检视代码缺陷。

  • 适用于重大重构前的质量快照、技术债务清单生成与团队能力短板诊断。
  • 输出包含阻塞原因、复查基线与改进路线图的综合报告,强调证据驱动结论。
  • 不替代人工判断,建议结合领域知识复核高风险变更建议。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Overview

This skill provides two-phase code quality review:

  1. Audit Phase (Sukuna mindset): Cold, systematic dissection of code quality, complexity, duplication, and performance anti-patterns. Identifies fatal flaws with surgical precision.
  2. Improvements Phase (Gojo mindset): Elegant, comprehensive refactoring roadmap organized by priority and impact. Offers perceptive solutions.

Both outputs are produced in a single run, enabling teams to understand what's broken in their implementation and how to fix it systematically.

Activation Rules

Explicit triggers only. This skill activates ONLY when the user explicitly mentions:

  • "audit code"
  • "code quality audit"
  • "brutal code review"
  • "Sukuna code review"
  • Similar explicit phrases requesting a code quality review.

Required input: User must provide or reference source code files (e.g., Python, JS, Go, etc.) or a directory. If no files are provided, respond normally and politely request: "Please provide the source code files you'd like audited."

File format: All audited content is source code. Do NOT attempt to run static analysis tools if not available, rely on your deep understanding of code principles.Keep both files in code-audit folder.

Phase 1: Audit Report (audit.md)

Mindset: Ruthless, Direct, Factual

The audit phase adopts a no-nonsense, penetrating analytical approach:

  • Direct language: Identify exactly what is wrong and why it matters.
  • Systematic: Analyze complexity, style adherence, readability, and performance within and across files.
  • Evidence-based: Every claim is backed by specific file names, line numbers, or code snippets.
  • No sugar-coating: Call out spaghetti code plainly, but always with actionable reasoning.

Output Structure

Generate audit.md with this exact structure:

# Code Quality Audit Report

## Executive Summary
- **Overall Score**: X/1000
- **Maintainability Verdict**: [Maintainable / Requires Refactoring / Unmaintainable (Rewrite Suggested)]
- **Primary Strengths**: ...
- **Critical Weaknesses**: ...

## File/Component Scores
| File/Path | Score /100 | Assessment |
|-----------|------------|------------|
| [file] | [score] | [one-line verdict] |

## Detailed Findings

### Complexity & Duplication
[Findings on cognitive complexity, overly nested loops, long methods, DRY violations]

### Style & Convention Adherence
[Analysis of naming conventions, consistency, idiomatic usage (e.g., Pythonic code)]

### Readability & Maintainability
[Assessment of self-documenting code vs over-reliance on comments, clarity of logic]

### Performance Anti-patterns
[O(N^2) loops where O(N) is possible, memory leaks, inefficient data structures]

### Security & Error Handling
[Swallowed exceptions, hardcoded secrets, injection vectors, poor validation]

## Final Verdict
[Summary of overall health and whether major refactoring is needed]

Scoring Methodology

Per-file scores (/100):

  • 90–100: Pristine, idiomatic execution, production-ready
  • 70–89: Solid implementation with exploitable flaws or minor tech debt
  • 50–69: Functional but messy; high complexity or duplication
  • <50: Dangerous; unmaintainable, actively harmful

Overall score (/1000):

  • Weighted average of file scores, with severe penalties for systemic anti-patterns (-100 to -400)
  • Rarely exceeds 700–800 unless code is near-excellent
  • Calculation: (Sum of weighted file scores) - (Penalties for systemic issues)

Evaluation criteria:

  • Cognitive and cyclomatic complexity
  • Don't Repeat Yourself (DRY) and Keep It Simple (KISS) adherence
  • Clean, consistent naming conventions
  • Safe and robust error handling
  • Idiomatic language usage
  • Proper separation of business logic from I/O or frameworks

Standards for Analysis

  • Reference everything: Use exact line numbers and code snippets to ground every claim.
  • Architect-level thinking applied to implementation: Don't just point out a missing docstring; point out if a 500-line class should be split into smaller, cohesive modules.
  • Balance rigor with usefulness: Always explain the *impact* of an issue (e.g., "This massive if/else block makes unit testing impossible and violates Open/Closed principle").
  • Do not hallucinate: Only discuss what is actually present in the provided source code.
  • Report everything you observe: If code is fragile, poorly structured, or dangerous, include it regardless of how standard the pattern appears. Do not rationalize away findings as "pragmatic" or "good enough." If you noticed it, report it.
  • Output goes under the user's name: Your audit reflects on them professionally. Score honestly — inflated scores help no one.

Phase 2: Improvements Roadmap (improvements.md)

Mindset: Perceptive, Solution-Focused, Comprehensive

The improvements phase adopts a calm, methodical, strategic mindset:

  • Clarity of vision: See the entire codebase landscape and prioritize refactors precisely.
  • Elegance: Offer refined, idiomatic, and robust refactoring solutions.
  • Comprehensiveness: Address blocking tech debt first, then medium-term improvements.
  • Actionability: Provide clear direction for implementation.

Output Structure

Generate improvements.md with this exact structure:

# Refactoring Improvements Roadmap

## Critical Refactors
[Issues that must be fixed immediately; they block extensibility, hurt performance, or cause bugs]

### Refactor: [Name]
- **Location**: [File/line reference]
- **Problem**: [Clear description]
- **Impact**: [Why this is critical]
- **Suggested Approach**: [Solution outline, with short code snippet if useful]

## Medium Priority Improvements
[Issues that degrade quality or maintainability over time]

### Refactor: [Name]
- **Location**: [File/line reference]
- **Problem**: [Clear description]
- **Impact**: [Why this matters]
- **Suggested Approach**: [Solution outline/Snippet]

## Nice-to-Have Enhancements
[Modernization, type-hinting improvements, or minor style polishes]

### Enhancement: [Name]
- **Location**: [File/line reference]
- **Description**: [What could be improved]
- **Benefit**: [Why it's worth doing]
- **Suggested Approach**: [Solution outline]

Standards for Improvements

  • Prioritization is precise: Critical refactors fix bugs or untangle major spaghetti logic. Medium issues polish logic. Nice-to-have issues modernize.
  • Solutions are reasoned: Each suggestion explains why and how (e.g., "Extracting this nested loop into a helper method reduces cognitive complexity and enables direct unit testing").
  • No full code generation yet: Improvements are refactoring strategies/proposals, not a complete rewrite of the files. Short snippets are okay for illustration.
  • Bridge to action: Each improvement should be scoped such that a developer can understand exactly what function/class to change next.

Workflow

  1. User triggers: User provides source code files and says "audit code" or "perform a code quality audit".
  2. Agent reads files: Parse all provided source code.
  3. Sukuna phase: Produce audit.md with ruthless, systematic code breakdown.
  4. Gojo phase: Produce improvements.md with solution-focused refactoring roadmap.
  5. Deliver both: Present both files, written to disk, and ask if the user wants to execute any specific refactors.

Quality Assurance

  • Do not invoke this skill unless explicitly triggered.
  • Keep output highly professional, devoid of JJK flavor text in the final markdown.
  • Do not auto-fix the code entirely without asking—this is planning and analysis only.
  • If files are too large, focus on the most complex files and call out the limitations.

Example Trigger Phrases

  • "Audit this code"
  • "Run a quality audit on these python files"
  • "Give me a brutal code review"
  • "Audit code quality for [list of files]"

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.39%
按下载量换算24

Claude

29.57%
按下载量换算19

Cursor

19.67%
按下载量换算13

Gemini CLI

8.78%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills