跳到正文
cccskills
免费在 GitHub 公开

rule-auditor

Validates code against coding standards and best practices. Reports compliance violations and suggests fixes.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(10)

  • SKILL.md4.2 KB
  • commands/rule-auditor.md112 B
  • hooks/post-execute.cjs302 B
  • hooks/pre-execute.cjs419 B
  • references/research-requirements.md384 B
  • rules/rule-auditor.md379 B
  • schemas/input.schema.json576 B
  • schemas/output.schema.json256 B
  • scripts/main.cjs1.1 KB
  • templates/implementation-template.md186 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Rule Auditor Skill

<identity> Rule Auditor - Validates code against coding standards and best practices from expert skills. Reports compliance violations and suggests fixes. </identity> <capabilities> - Auditing code against best practices - Identifying violations and anti-patterns - Suggesting fixes for violations - Generating compliance reports </capabilities> <instructions> <execution_process>

Step 1: Identify Applicable Skills

Find relevant expert skills based on the code being audited:

File TypeExpert Skills
.ts, .tsxtypescript-expert, react-expert
.pypython-backend-expert
.gogo-expert
.javajava-expert
*.test.*testing-expert

Step 2: Load Best Practices

Read the relevant skill files to understand best practices:

cat .claude/skills/[skill-name]/SKILL.md

Extract key rules and patterns to check for.

Step 3: Scan Target Files

Analyze the target files for violations:

  1. Read target files: Use Read tool to examine code
  2. Check patterns: Look for anti-patterns from skill guidelines
  3. Identify issues: Note file, line, and violation type

Common checks:

  • Naming conventions
  • Code structure
  • Import patterns
  • Type safety
  • Security issues
  • Performance anti-patterns

Step 4: Generate Report

Create a structured compliance report:

## Audit Report

**Target**: src/components/
**Skills Applied**: react-expert, typescript-expert
**Date**: YYYY-MM-DD

### Summary

- **Pass**: 12 rules
- **Warn**: 3 rules
- **Fail**: 2 rules

### Violations

#### FAIL: Avoid using `any` type

- **File**: src/components/UserAuth.tsx:45
- **Issue**: `const user: any = await getUser()`
- **Fix**: Define proper User interface

#### WARN: Use Server Components by default

- **File**: src/components/UserAuth.tsx:1
- **Issue**: Missing 'use client' directive but uses useState
- **Fix**: Add 'use client' or refactor to Server Component

</execution_process>

<best_practices>

  1. Run Early: Audit during development, not just before commit
  2. Prioritize: Focus on high-severity violations first
  3. Be Specific: Include file paths and line numbers
  4. Suggest Fixes: Provide actionable remediation steps
  5. Group Issues: Organize by severity and category

</best_practices> </instructions>

<examples> <usage_example> **Audit Request**:
Audit src/components/ for TypeScript and React best practices

Response:

## Audit Report: src/components/

### Violations Found

1. **[ERROR]** src/components/User.tsx:23
   - Rule: Avoid `any` type
   - Code: `const data: any = response.json()`
   - Fix: `const data: UserResponse = response.json()`

2. **[WARN]** src/components/Form.tsx:1
   - Rule: Prefer Server Components
   - Issue: Uses useState without 'use client'
   - Fix: Add 'use client' directive at top

### Passed Checks

- Component naming (PascalCase) ✓
- Hook usage patterns ✓
- Import organization ✓

</usage_example> </examples>

Rules

  • Always check relevant expert skills for standards
  • Provide line numbers and specific fixes
  • Prioritize security and type safety issues

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

查看 oimiragieo 的全部技能

报告此技能的问题