add-rule

프로젝트의 rules 구조에 새 규칙을 추가합니다. Progressive Disclosure 원칙에 따라 구조화된 규칙 파일을 생성합니다. "규칙 추가", "rule 추가", "새 규칙 만들기" 요청 시 활성화.

181 stars

Best use case

add-rule is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

프로젝트의 rules 구조에 새 규칙을 추가합니다. Progressive Disclosure 원칙에 따라 구조화된 규칙 파일을 생성합니다. "규칙 추가", "rule 추가", "새 규칙 만들기" 요청 시 활성화.

Teams using add-rule should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/add-rule/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/add-rule/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/add-rule/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How add-rule Compares

Feature / Agentadd-ruleStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

프로젝트의 rules 구조에 새 규칙을 추가합니다. Progressive Disclosure 원칙에 따라 구조화된 규칙 파일을 생성합니다. "규칙 추가", "rule 추가", "새 규칙 만들기" 요청 시 활성화.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Add Rule

프로젝트의 `.claude/rules/` 디렉토리에 Progressive Disclosure 원칙에 맞는 규칙을 추가합니다.

## 실행 단계

### 0단계: 사전 조건 확인

`.claude/rules/progressive-disclosure/` 존재 여부 확인.

**규칙이 없는 경우 안내:**
> "Progressive Disclosure 규칙이 설치되어 있지 않습니다.
> 규칙 작성 가이드를 참고하려면 먼저 설치해주세요:
> https://github.com/anthropics/claude-code/tree/main/.claude/rules/progressive-disclosure"

사용자가 설치 후 다시 진행하도록 안내하고 종료합니다.

### 1단계: 요구사항 수집

사용자 입력에서 다음 정보를 파악합니다. **부족한 정보는 반드시 사용자에게 질문**합니다.

| 필수 정보 | 질문 예시 |
|----------|----------|
| 규칙 이름 | "규칙 이름을 지정해주세요 (예: typescript, security)" |
| 규칙 목적 | "이 규칙이 무엇을 하나요?" |
| 트리거 상황 | "어떤 상황에서 이 규칙이 활성화되어야 하나요?" |
| 적용 파일 패턴 (선택) | "특정 파일 패턴에만 적용할까요? (예: `**/*.ts`)" |

### 2단계: 규칙 유형 결정

```
[규칙 복잡도 판단]
    │
    ├─ 단순 규칙 (한 파일로 충분) → 단일 파일: rules/rule-name.md
    │
    └─ 복잡한 규칙 (참조 문서 필요) → 디렉토리: rules/rule-name/
        ├── AGENTS.md
        ├── RULE.md
        └── references/
```

**판단 기준:**
- 상세 예제나 참조 문서가 필요한가?
- 500줄 이하로 작성 가능한가?

### 3단계: 규칙 생성

#### 단일 파일 규칙

```yaml
---
description: >
  [무엇을 하는지] 규칙.
  [언제 활성화되는지] 트리거 키워드 포함.
paths:  # 선택사항
  - "[패턴]"
---

# [규칙 제목]

## 필수 규칙

- [규칙 1]
- [규칙 2]

## 권장 사항

- [권장 1]
```

#### 디렉토리 규칙

**AGENTS.md** (진입점):
```markdown
# [규칙명] 원칙

> [한 줄 요약]

## 목적
[규칙의 목적 설명]

## 핵심 체크리스트
- [ ] [체크 1]
- [ ] [체크 2]

## 관련 레퍼런스
- [상세 가이드](references/guide.md)
```

**RULE.md** (핵심 지침):
```yaml
---
description: >
  [무엇] 규칙.
  [언제] 활성화.
paths:  # 선택사항
  - "[패턴]"
---

# [규칙 제목]

[핵심 지침 내용 - 5000 토큰 이하]
```

### 4단계: 인덱스 업데이트

`.claude/rules/AGENTS.md`에 새 규칙 추가:

```markdown
| [rule-name] | [트리거 상황] | [rule-name/](rule-name/) |
```

## 체크리스트

생성 전 확인:

```
□ description이 "무엇 + 언제"를 설명하는가?
□ name이 소문자/하이픈 규칙을 따르는가?
□ 본문이 500줄/5000토큰 이하인가?
□ paths가 적절한 파일에만 활성화되는가? (선택사항)
□ AGENTS.md 인덱스에 추가되었는가?
```

## 상세 가이드

- [Progressive Disclosure 규칙 작성 가이드](rules/progressive-disclosure)

Related Skills

admin-interface-rules

181
from majiayu000/claude-skill-registry

Rules for the Admin interface functionalities

adf-validation-rules

181
from majiayu000/claude-skill-registry

Comprehensive Azure Data Factory validation rules, activity nesting limitations, linked service requirements, and edge-case handling guidance

accessibility-rules

181
from majiayu000/claude-skill-registry

Concise accessibility checklist and practices for components in the repository. Use when implementing UI to ensure keyboard, screen reader, and focus semantics.

77-webgl-jslib-memory-rules

181
from majiayu000/claude-skill-registry

Status: ACTIVE

modal-deployment

159
from majiayu000/claude-skill-registry

Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.

DevOps & Infrastructure

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude

astro

159
from majiayu000/claude-skill-registry

This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.

Coding & Development

tech-blog

159
from majiayu000/claude-skill-registry

Generates comprehensive technical blog posts, offering detailed explanations of system internals, architecture, and implementation, either through source code analysis or document-driven research.

Content & DocumentationClaude

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

ontopo

159
from majiayu000/claude-skill-registry

An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.

General Utilities

thor-skills

159
from majiayu000/claude-skill-registry

An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.

SecurityClaude

ux

159
from majiayu000/claude-skill-registry

This AI agent skill provides comprehensive guidance for creating professional and insightful User Experience (UX) designs, covering user research, information architecture, interaction design, visual guidance, and usability evaluation. It aims to produce actionable, user-centered solutions that avoid generic AI aesthetics.

UX Design & StrategyClaude