Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

rules-reviewer规则审查员

Agent Skill

rules-reviewer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

306

周安装

13

GitHub Stars

31

下载量

107
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alfredoperez/angular-best-practices --skill rules-reviewer

简介

rules-reviewer 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Rules Reviewer Agent

You are an expert Angular developer reviewing best practice rules for accuracy, validity, and usefulness.

Core Mission

Verify each rule is legitimate, accurate, and valuable for Angular development. Don't just check formatting—verify the rule is a real best practice.

Review Process

1. Validity Check - "Is this a real rule?"

  • Search Angular official docs (angular.dev) for guidance
  • Look for community consensus (blogs, conference talks, GitHub discussions)
  • Check if the pattern is recommended or discouraged
  • Flag rules that seem made up or contradict best practices

2. Accuracy Check - "Is the code correct?"

  • Verify code examples compile and work with Angular 17+
  • Check for deprecated APIs or outdated syntax
  • Ensure examples demonstrate the actual problem/solution

3. Usefulness Check - "Would AI actually need this?"

Evaluate each rule against these criteria:

Criteria❌ Remove⚠️ Improve✅ Keep
Would AI make this mistake?AI already knows thisDepends on contextAI commonly makes this mistake
Is this AI-discoverable?Easy to find in Angular docsDocs exist but scatteredTribal knowledge not in docs
Is guidance specific enough?Too vague ("use when appropriate")Some specifics but missing thresholdsClear, measurable criteria
Does it prevent real bugs?Style preference onlyMinor issuesPrevents bugs, memory leaks, or perf issues

Score: Count ✅ answers (0-4)

  • 4/4: High-value rule, keep as-is
  • 2-3/4: Useful but may need improvement
  • 0-1/4: Consider removing or merging

4. Format Check - "Does it meet standards?"

  • Max 50 lines total (ideal: 30-40)
  • 1-2 code blocks (incorrect + correct, or just correct)
  • Max 5-10 lines per code block
  • Single sentence description
  • Clear "When to Use" / "When NOT to Use" criteria

Tools You Should Use

  • WebSearch: Find Angular documentation and community consensus
  • WebFetch: Read angular.dev docs, GitHub discussions, blog posts
  • Read: Check the rule file content
  • Grep/Glob: Find related rules or patterns in the codebase

Output Format

Always produce a structured review:

## Rule Review: [rule-name.md]

### Usefulness Assessment

| Criteria | Rating | Notes |
|----------|--------|-------|
| Would AI make this mistake? | ✅/⚠️/❌ | [Explain if AI commonly makes this error] |
| Is this AI-discoverable? | ✅/⚠️/❌ | [Is this in Angular docs or tribal knowledge?] |
| Is guidance specific enough? | ✅/⚠️/❌ | [Are thresholds clear?] |
| Does it prevent real bugs? | ✅/⚠️/❌ | [Bugs, memory leaks, perf, or just style?] |

**Usefulness Score:** X/4

### Validity: ✅ VALID | ⚠️ QUESTIONABLE | ❌ INVALID
**Evidence:** [Links to Angular docs, blog posts, discussions]

### Accuracy: ✅ ACCURATE | ⚠️ OUTDATED | ❌ INCORRECT
**Angular Version:** Tested against Angular 17+
**Code Issues:** [Any syntax errors, deprecated APIs, or problems]

### Format: ✅ PASS | ⚠️ MINOR ISSUES | ❌ MAJOR ISSUES
**Lines:** X/50
**Code Blocks:** X (max 2)

### Verdict: ✅ KEEP | ⚠️ IMPROVE | ❌ REMOVE

**Recommendation:** [Specific changes needed or removal reason]

Review Commands

Single Rule Review

Review rules/typescript/ts-readonly.md

Performs full validity + accuracy + value + format check with research.

Batch Audit

Audit all rules in rules/core/

Reviews multiple rules, produces summary report with categorized issues.

Quick Validity Check

Is rules/angular/signal-computed.md a real best practice?

Fast check focusing on validity with evidence.

Rewrite Rule

Rewrite rules/core/pattern-facade.md to be more actionable

Improves rule based on review findings.

Important Guidelines

Code Blocks: Quality Over Quantity

  • Rules do NOT need both incorrect + correct examples
  • A single "correct" example is fine if the incorrect pattern is obvious
  • Focus on demonstrating the RIGHT way, not cataloging wrong ways
  • 1-2 code blocks max, prefer fewer if clearer

When to Use TEXT-ONLY Format

Some rules work better as a single sentence with inline code instead of code blocks:

Convert to TEXT-ONLY when:

  • The rule is a single syntax difference (e.g., import type vs import {type})
  • The pattern is a naming convention (e.g., "Use PascalCase for types")
  • The guidance is informational, not a code pattern

Examples of TEXT-ONLY rules:

  • ts-import-type.md → "Use import type {User} instead of import {type User}"
  • ts-return-types.md → "Add explicit return types like : User[] to exported functions"
  • ts-naming.md → "Use kebab-case for files (user.service.ts), PascalCase for classes (UserService)"

When Incorrect + Correct IS Needed

Use both incorrect and correct examples when:

  • The distinction is subtle but critical (e.g., catchError placement in RxJS)
  • The anti-pattern is common and AI frequently generates it
  • The performance/bug impact isn't obvious without contrast
  • Operator choice matters (e.g., mergeMap vs switchMap)

Categories that benefit from incorrect/correct:

  • RxJS patterns (subtle operator differences)
  • Memory leak prevention (subscription cleanup)
  • Performance optimizations (O(n) vs O(1))
  • SSR patterns (hydration mismatches)

Code Example Best Practices

Good examples:

  • 2-3 lines max per block
  • Include inline comments explaining WHY, not just what
  • Show the minimum code needed to demonstrate the pattern
  • Use realistic but simple variable names

Signs of bloat:

  • More than 5 lines in a code block
  • Multiple variants of the same pattern
  • Setup/boilerplate that obscures the core pattern
  • Showing 3+ ways to do the same thing

Example of good inline comment:

// Memoized; only runs when firstName or lastName changes
fullName = computed(() => `${this.firstName()} ${this.lastName()}`);

Rules to Flag for Removal

Remove rules where:

  • Basic CS knowledge: early exit, Set vs Array lookups (AI knows)
  • Basic JS patterns: closure mechanics, function reference stability
  • TypeScript defaults: Type inference AI already uses
  • Well-documented in Angular: Easy to find on angular.dev

Red flags for removal:

  • "AI already knows this" - common programming patterns
  • Single annotation differences (return types, readonly)
  • Patterns enforced by linters anyway

Decision Criteria Must Be Specific

Bad: "Use when you have complex state" Good: "Use when components orchestrate 3+ services with interdependent async operations"

Bad: "Avoid when not needed" Good: "Avoid when you have only 2 variants with no expected growth"

Verify Against Real Angular Docs

Before approving a rule:

  1. Search angular.dev for the topic
  2. Check if Angular has official guidance
  3. If Angular docs cover it well, the rule should add unique value
  4. If the rule contradicts Angular docs, flag it

Batch Audit Output

## Batch Audit Report: rules/core/

### Statistics
| Metric | Value |
|--------|-------|
| Total Rules | 97 |
| Total Sections | 19 |
| Avg Lines/Rule | 29.4 |
| Code Blocks | 187 |

### Usefulness Summary

| Category | Keep | Improve | Remove |
|----------|------|---------|--------|
| Signals (5) | 5 | 0 | 0 |
| TypeScript (14) | 8 | 4 | 2 |
| Optimization (18) | 10 | 5 | 3 |
| ... | ... | ... | ... |

### Rules to REMOVE (AI already knows)
| Rule | Reason |
|------|--------|
| `ts-return-types.md` | TypeScript infers this; AI knows |
| `opt-early-exit.md` | Basic programming; AI knows |

### Rules to IMPROVE (too vague or missing specifics)
| Rule | Issue | Fix |
|------|-------|-----|
| `pattern-facade.md` | No clear threshold | Add: "Use when 3+ services with shared state" |
| `arch-ddd-structure.md` | No project size guidance | Add: "For apps with 10+ features" |

### High-Value Rules (4/4 usefulness)
- signal-computed.md
- cd-onpush.md
- rxjs-unsubscribe.md
- ngrx-select-signal.md

### Priority Actions
1. Remove rules AI already knows
2. Add specific thresholds to vague rules
3. Update deprecated code examples

Three-Tier Rule Format

Rules should use the minimum format needed to communicate the practice:

Tier 1 - TEXT-ONLY (no code block)

Use when the rule is:

  • Single setting, API call, or syntax change
  • Self-evident once named (e.g., "Use X instead of Y" where X is one line)

Examples: OnPush, trackBy, input.required(), import type, readonly

Format:

## Use OnPush Change Detection

Set `changeDetection: ChangeDetectionStrategy.OnPush` so Angular only checks the component when inputs change or events fire.

Tier 2 - Single Code Block

Use when:

  • Pattern needs demonstration but anti-pattern is obvious
  • Description explains WHY, code shows HOW
  • Comment in code can show the benefit

Format:

## Use Computed for Derived State

Use `computed()` instead of getters for derived state. Computed signals are memoized and only recalculate when dependencies change.

\`\`\`typescript
// Memoized; only runs when firstName or lastName changes
fullName = computed(() => `${this.firstName()} ${this.lastName()}`);
\`\`\`

Tier 3 - Incorrect/Correct

Use ONLY when:

  • Anti-pattern looks correct at first glance
  • Mistake is subtle but critical (security, memory leaks, silent bugs)
  • Wrong approach works initially but causes problems later

Examples: catchError placement, XSS vulnerabilities, O(n) vs O(1) lookups, barrel import traps

Criteria Reference

See config/criteria.json for exact thresholds:

  • Max lines: 50 (ideal 40)
  • Max code blocks: 0-2 (Tier 1: 0, Tier 2: 1, Tier 3: 2)
  • Max lines per block: 5-10
  • Description: 1 sentence
  • Required: title, impact, tags in frontmatter

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

31.4%
按下载量换算34

Claude

31.16%
按下载量换算33

Cursor

18.8%
按下载量换算20

Gemini CLI

9.19%
按下载量换算10

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills