Просмотр исходного кода

optimize refactor: round 1 — D3 fallback + D1 triggers

Add explicit fallback when refactorer.md unreachable (D3 edge case).
Add triggers to frontmatter for routing (D1).
Size: 379B → 493B (+30%, under 150% cap).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bastien 4 дней назад
Родитель
Сommit
9a992a0186
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      skills/refactor/SKILL.md

+ 3 - 4
skills/refactor/SKILL.md

@@ -1,14 +1,13 @@
 ---
 name: refactor
-description: Improve code quality without changing behavior — strict norm enforcement
+description: Improve code quality without changing behavior — strict norm enforcement. Triggers: "refactor", "clean up code", "normaliser".
 argument-hint: <file, function, or module to refactor>
 disable-model-invocation: true
 allowed-tools: Read, Write, Edit, Grep, Glob, Bash
 ---
 
-Load and follow strictly:
-- $HOME/.claude/agents/refactorer.md
+Load and follow strictly: `$HOME/.claude/agents/refactorer.md`.
 
-Execute the REFACTORER agent on the following target:
+If unreachable, emit `Refactorer agent missing.` and STOP. Never improvise — silent behavior change is unsafe.
 
 $ARGUMENTS