본문으로 건너뛰기
Skillpedia
에이전트29k · #9485

promote

하는 일

이 스킬은 에이전트가 배운 습관이나 패턴을 영구 규칙으로 바꾸게 합니다. AI가 어떤 관행을 그냥 기억하는 데서 그치지 않고 매번 따르기를 원하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓에이전트가 같은 실수를 계속 해서 확실한 규칙이 필요할 때.
  • ✓배운 선호가 프로젝트의 모든 파일에 적용되어야 할 때.
  • ✓패턴이 특정 파일 형식이나 폴더에만 적용되어야 할 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/promote/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/promote/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리는 항상 npm 대신 pnpm을 쓴다는 규칙을 이 프로젝트 지침의 영구 항목으로 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 메모리 파일에서 맞는 항목을 찾고 그것이 무엇을 다루는지 확인합니다. 그다음 프로젝트 지침 파일이나 특정 경로용 규칙 파일처럼 가장 알맞은 곳에 규칙을 씁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

/si:promote — Graduate Learnings to Rules

Moves a proven pattern from Claude's auto-memory into the project's rule system, where it becomes an enforced instruction rather than a background note.

Usage

/si:promote <pattern description>                    # Auto-detect best target
/si:promote <pattern> --target claude.md             # Promote to CLAUDE.md
/si:promote <pattern> --target rules/testing.md      # Promote to scoped rule
/si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts"  # Scoped with paths

Workflow

Step 1: Understand the pattern

Parse the user's description. If vague, ask one clarifying question:

  • "What specific behavior should Claude follow?"
  • "Does this apply to all files or specific paths?"

Step 2: Find the pattern in auto-memory

# Search MEMORY.md for related entries
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"

Show the matching entries and confirm they're what the user means.

Step 3: Determine the right target

Pattern scope Target Example
Applies to entire project ./CLAUDE.md "Use pnpm, not npm"
Applies to specific file types .claude/rules/<topic>.md "API handlers need validation"
Applies to all your projects ~/.claude/CLAUDE.md "Prefer explicit error handling"

If the user didn't specify a target, recommend one based on scope.

Step 4: Distill into a concise rule

Transform the learning from auto-memory's note format into CLAUDE.md's instruction format:

Before (MEMORY.md — descriptive):

The project uses pnpm workspaces. When I tried npm install it failed. The lock file is pnpm-lock.yaml. Must use pnpm install for dependencies.

After (CLAUDE.md — prescriptive):

## Build & Dependencies
- Package manager: pnpm (not npm). Use `pnpm install`.

Rules for distillation:

  • One line per rule when possible
  • Imperative voice ("Use X", "Always Y", "Never Z")
  • Include the command or example, not just the concept
  • No backstory — just the instruction

Step 5: Write to target

For CLAUDE.md:

  1. Read existing CLAUDE.md
  2. Find the appropriate section (or create one)
  3. Append the new rule under the right heading
  4. If file would exceed 200 lines, suggest using .claude/rules/ instead

For .claude/rules/:

  1. Create the file if it doesn't exist
  2. Add YAML frontmatter with paths if scoped
  3. Write the rule content
---
paths:
  - "src/api/**/*.ts"
  - "tests/api/**/*"
---

# API Development Rules

- All endpoints must validate input with Zod schemas
- Use `ApiError` class for error responses (not raw Error)
- Include OpenAPI JSDoc comments on handler functions

Step 6: Clean up auto-memory

After promoting, remove or mark the original entry in MEMORY.md:

# Show what will be removed
grep -n "<pattern>" "$MEMORY_DIR/MEMORY.md"

Ask the user to confirm removal. Then edit MEMORY.md to remove the promoted entry. This frees space for new learnings.

Step 7: Confirm

✅ Promoted to {{target}}

Rule: "{{distilled rule}}"
Source: MEMORY.md line {{n}} (removed)
MEMORY.md: {{lines}}/200 lines remaining

The pattern is now an enforced instruction. Claude will follow it in all future sessions.

Promotion Decision Guide

Promote when:

  • Pattern appeared 3+ times in auto-memory
  • You corrected Claude about it more than once
  • It's a project convention that any contributor should know
  • It prevents a recurring mistake

Don't promote when:

  • It's a one-time debugging note (leave in auto-memory)
  • It's session-specific context (session memory handles this)
  • It might change soon (e.g., during a migration)
  • It's already covered by existing rules

CLAUDE.md vs .claude/rules/

Use CLAUDE.md for Use .claude/rules/ for
Global project rules File-type-specific patterns
Build commands Testing conventions
Architecture decisions API design rules
Team conventions Framework-specific gotchas

Tips

  • Keep CLAUDE.md under 200 lines — use rules/ for overflow
  • One rule per line is easier to maintain than paragraphs
  • Include the concrete command, not just the concept
  • Review promoted rules quarterly — remove what's no longer relevant
자주 묻는 질문

규칙을 어디에 저장할 수 있나요?

주 프로젝트 지침, 한 주제를 위한 규칙 파일, 또는 모든 프로젝트에 적용되는 전역 지침에 저장할 수 있습니다.

규칙을 일부 파일에만 적용할 수 있나요?

네. 파일 경로 목록을 주면 그 경로와 맞는 파일에만 규칙이 적용됩니다.

먼저 무엇인가를 물어보나요?

패턴이 불분명할 때만 묻습니다. 의도를 확인하기 위해 질문을 하나 합니다.

상세 정보

작성자의 원본 설명

Graduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement. Use when the user runs /si:promote or asks to make a learned behavior permanent.

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9485
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬