Langsung ke konten
Skillpedia
Agen29k Β· #9485

promote

Fungsinya

Skill ini membuat agent mengubah kebiasaan atau pola yang dipelajari menjadi aturan permanen. Skill ini untuk orang yang ingin AI mereka mengikuti sebuah praktik setiap waktu, bukan hanya mengingatnya.

Kapan dipakai

  • βœ“Saat agent Anda terus membuat kesalahan yang sama dan Anda ingin aturan yang tegas.
  • βœ“Saat sebuah preferensi yang dipelajari harus berlaku untuk setiap file dalam proyek.
  • βœ“Saat sebuah pola hanya berlaku untuk jenis file atau folder tertentu.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/promote/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œJadikan aturan bahwa kita selalu memakai pnpm, bukan npm, sebagai bagian permanen dari instruksi proyek ini.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencari entri yang cocok di file memori dan memastikan apa yang dicakupnya. Agent lalu menulis aturan itu di tempat yang paling tepat, seperti file instruksi proyek atau file aturan untuk path tertentu.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Di mana aturan bisa disimpan?

Di instruksi proyek utama, file aturan untuk satu topik, atau instruksi global Anda untuk semua proyek.

Bisakah aturan hanya berlaku untuk sebagian file?

Bisa. Anda dapat memberikan daftar path file, sehingga aturan hanya berlaku untuk file yang cocok.

Apakah skill ini bertanya dulu sebelum bertindak?

Hanya jika polanya belum jelas. Skill ini mengajukan satu pertanyaan untuk memastikan maksud Anda.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
29k
Peringkat
#9485
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa