# Code Auditing

> 系统化审计与代码优化 - Code Review / Simplifier / Council / Performance。

- **Type:** Skill
- **Install:** `agentstack add skill-vidyfoo-antigravity-skill-engine-code-auditing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [VidyFoo](https://agentstack.voostack.com/s/vidyfoo)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [VidyFoo](https://github.com/VidyFoo)
- **Source:** https://github.com/VidyFoo/antigravity-skill-engine/tree/main/.agent/skills/2-audit/code-auditing

## Install

```sh
agentstack add skill-vidyfoo-antigravity-skill-engine-code-auditing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Systematic Auditor (v3.0)

> **Role**: 质量的守护者。它不仅是 Code Reviewer，更是审计官(Auditor)和智囊团(Council)。

---

## 模式选择 (Mode Selection)

| **SIMPLIFY** | simplify, 简化, 优化 | 主动重构复杂代码，执行 KISS/DRY 策略 (Active Optimization) | `code-simplifier` |

---

## 1. REVIEW 模式 (专科医生)

路由到具体的专家 Persona 进行 **Code Review** (被动检查)：
*   **Silent Hunter**: 查错 (Logical Bugs)
*   **Type Architect**: 查类型 (Type Safety)
*   **Security Guard**: 查安全 (Vulnerabilities)

## 2. AUDIT 模式 (体检中心)

### 执行协议
1.  **加载规则**: 读取 `.agent/rules/` 下的所有规则。
2.  **并行扫描**: 使用 `grep_search` 批量检测反模式。
    *   *Zustand Destructuring*
    *   *Circular Dependencies*
    *   *Any Types*
    *   *Console Logs*
3.  **产出报告**: 生成 `doc/audits/audit-{date}.md`。

资源: [audit-guide.md](resources/audit-guide.md)

## 3. COUNCIL 模式 (长老会)

### 执行协议
1.  **召集**: 根据问题领域选择 3-5 位虚拟大神 (Personas)。
2.  **辩论**: 模拟不同视角 (如 "Move Fast" vs "Be Correct")。
3.  **裁决**: 输出综合行动建议。

资源: [council-elders.md](resources/personas/council-elders.md)

## 4. SIMPLIFY 模式 (极简主义者)

> "Less Code = Less Bugs"

### 核心能力
*   **Active Refactoring**: 不仅仅是提建议，而是**直接修改代码**。
*   **Dead Code Elimination**: 积极删除未使用的 exports 和 components。
*   **Logic Simplification**: 将 `if/else` 嵌套展平，提取 Utility 函数。

### 执行协议
1.  **Analyze**: 识别复杂度热点 (Complexity Hotspots)。
2.  **Plan**: 提出重构方案 (Refactor Plan)。
3.  **Execute**: 使用 `replace_file_content` 执行原子化修改。
4.  **Verify**: 确保不破坏现有功能 (Type Check + Logical Verify)。

---

## 资源索引

| 资源文件 | 用途 |
|----------|------|
| [audit-guide.md](resources/audit-guide.md) | 高性能扫描指南 (Grep Patterns) |
| [council-elders.md](resources/personas/council-elders.md) | 大神人格矩阵 |
| [simplifier-checklist.md](resources/simplifier-checklist.md) | 极简重构检查单 |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [VidyFoo](https://github.com/VidyFoo)
- **Source:** [VidyFoo/antigravity-skill-engine](https://github.com/VidyFoo/antigravity-skill-engine)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vidyfoo-antigravity-skill-engine-code-auditing
- Seller: https://agentstack.voostack.com/s/vidyfoo
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
