一键导入
claude-code-optimize
Use when setting up or optimizing a repo for Claude Code — slim CLAUDE.md, scoped rules, RTK install, model routing, token reduction
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when setting up or optimizing a repo for Claude Code — slim CLAUDE.md, scoped rules, RTK install, model routing, token reduction
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Methodology for designing, refactoring, and evaluating AI agents — when to use a tool vs a skill vs a subagent, how to keep system prompts lean, and how to improve agents through eval-driven hill climbing. Use this skill whenever the user is building a new agent, refactoring or debugging an existing one, complains that an agent "got worse" or "is inconsistent", asks about system prompt length, tool design, multi-agent/subagent architecture, or wants to create evals for an LLM app — even if they don't use the word "agent" (e.g., "my Claude workflow keeps messing up", "should I add another tool?", "how do I test my prompt changes?").
Run an adversarial review→fix loop on a GitHub PR using BMAD adversarial agents until the reviewers find nothing actionable, then stop and report. Never auto-merges. Use after opening a PR, or when the user says "adversarially review", "hammer this PR", "review until clean", or /adversarial-pr-review.
Generate and send invoices through the Invoice Ninja API. Triggers on invoice creation, billing, generating a quote/devis.
Write professional emails with proper context gathering before drafting. Triggers on email writing, reply drafting, cold outreach.
Resolve git merge conflicts in an Obsidian vault that's synced via git (e.g. across multiple devices, or with iCloud/Drive on top). Defaults to keeping the most recent block in daily notes.
Brand guidelines, voice, and design system for Clip2Earn — EMEA creator program infrastructure (sub-brand of Bakchich). Use when creating ANY content or UI for Clip2Earn — pitch decks, presentations, blog posts, ad copy, social captions, video scripts, creative briefs, landing pages, email campaigns, web app screens, or component code. Covers both audiences (creators + brands/SaaS founders), two distinct voice calibrations, the full HeroUI-based color system, Chakra Petch/Inter/Fira Code typography, shadows, radii, and iconography. Trigger this skill whenever the user mentions Clip2Earn, clip2earn.money, or asks to write content / build UI for an underground UGC marketplace OR a B2B creator-program infrastructure pitch.
| name | claude-code-optimize |
| description | Use when setting up or optimizing a repo for Claude Code — slim CLAUDE.md, scoped rules, RTK install, model routing, token reduction |
Full setup checklist for a lean, token-efficient Claude Code environment.
Intercepts shell output before it hits context. 60–90% reduction on build/test commands.
Install (Windows → use WSL):
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
Init for Claude Code:
rtk init -g --hook-only # PreToolUse hook only, zero CLAUDE.md overhead (recommended)
rtk init -g # Hook + adds @RTK.md to CLAUDE.md
Verify:
rtk --version
rtk gain # must show Token Killer stats
Key commands:
rtk git status / diff / log
rtk test cargo test / pytest / jest
rtk err npm run build # errors/warnings only
rtk ls . # token-optimized tree
rtk gain # session savings stats
Real numbers:
| Command | Before | After | Savings |
|---|---|---|---|
cargo test (262 tests) | 4,823 tokens | 11 | 99% |
git diff | ~21,500 | ~1,259 | 94% |
| Typical 80-cmd session | ~113,600 | ~29,000 | 74% |
Windows native: hook falls back to CLAUDE.md-only mode. Use WSL for full hook support.
# [Project Name]
[2-line project description max]
## Core Rules
- [Behavioral rules only — no file trees, no API docs]
## Key Locations
- [3-5 critical paths max]
## Workflows
- /skill-name — one-line description
Ne jamais mettre dans CLAUDE.md :
.claude/rules/).claude/rules/ — règles scoped par domaineCréer un fichier par domaine. Claude les charge automatiquement selon le contexte.
.claude/rules/
financial.md # calculs, formats, règles comptables
email-outreach.md # tone, séquences, CAN-SPAM
obsidian.md # vault paths, daily notes format
automation.md # agents, crons, approval gates
content-design.md # contrast checks, palette melekbuilds
agents.md # multi-agent rules, worktree protocol
.worktreeinclude — limit worktree scopesrc/
tests/
package.json
Tout ce qui n'est pas listé = ignoré dans les worktrees. Réduit le contexte des agents parallèles.
| Tâche | Modèle |
|---|---|
| Raisonnement complexe, architecture | Opus |
| Développement, écriture, analyse | Sonnet (défaut) |
| Subagents : grep, glob, lookups | Haiku |
Dans Claude Code : claude --model claude-haiku-4-5-20251001 pour les sous-agents.
/clear # entre tâches non liées (vide le contexte)
/compact # quand le contexte grossit (résume sans perdre l'essentiel)
Règles multi-agent :
/plan), parallelize secondrtk gain).claude/rules/ créé avec domaines séparés.worktreeinclude configuré si multi-agent/clear + /compact dans les habitudes de session