.claude/skills-en/skill-optimization/SKILL.md
Evaluates and optimizes skill file quality using 8 content patterns and 9 editing principles. Use when creating skills, refining skill content, or auditing skill quality.
npx skillsauth add shinpr/ai-coding-project-boilerplate skill-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Issues that directly reduce LLM execution accuracy when consuming the skill.
| Detection | Transform | |-----------|-----------| | "don't", "do not", "never", "avoid" in skill instructions | Reframe as positive directive with equivalent constraint. Exception: Negative form is permitted only when ALL 4 conditions are met: (1) violation destroys state in a single step, (2) caller or subsequent steps cannot normally recover, (3) the constraint is operational/procedural, not a quality policy or role boundary, (4) positive rewording would expand or blur the target scope. If any condition is not met, rewrite in positive form. |
Exception boundary examples:
Quality policies, role boundaries, scoring criteria, and general work rules always use positive form. Outputs that the caller validates, overwrites, or discards are never irreversible.
Skill example:
userId not x)"Why critical for skills: LLM attention mechanisms focus on negated content. Skill instructions with "don't" increase probability of the forbidden behavior.
| Detection | Transform | |-----------|-----------| | "appropriate", "good", "proper", "best", "should be clear" | Replace with measurable if-then criteria or concrete thresholds. Skill exception: Expressions that the LLM can resolve unambiguously from input context (e.g., "where the user left gaps" when the user's prompt is available for comparison) are not vague — they describe a deterministic operation, not a subjective judgment. | | Missing output format, scope, or success criteria | Add explicit constraints |
Skill example:
Why critical for skills: Accounts for ~40% of execution variance. Every vague instruction forces LLM to guess.
| Detection | Transform | |-----------|-----------| | Skill describes what to do but not the expected deliverable format | Add output section with structure, fields, and example |
Skill example:
## Issues Found with table: | Severity | Location | Description | Suggested Fix |"Why critical for skills: Structured output constraints reduce hallucination and make skill results consistent.
Issues that reduce skill effectiveness when addressed.
| Detection | Transform | |-----------|-----------| | Wall of text without headings | Apply standard section order (see below) | | Multiple topics mixed in one section | Split into distinct headed sections | | No tables for reference data | Convert lists of criteria/patterns to tables |
Standard skill section order:
Conditional: Skip restructuring if skill is under 30 lines and covers a single topic.
| Detection | Transform | |-----------|-----------| | Skill assumes knowledge not stated | Add Prerequisites section listing required context | | Domain terms used without definition | Add definitions inline or in a glossary table. Skill exception: Terms within the LLM's baseline knowledge (widely-used technical terminology, standard domain vocabulary) require no definition. Only project-specific terms, internal naming conventions, or domain jargon outside common LLM training data need explicit definition. | | No "when to use" guidance | Add trigger conditions with concrete scenarios |
Skill example:
| Detection | Transform | |-----------|-----------| | 3+ objectives in one instruction | Break into numbered steps with checkpoints | | Sequential dependencies not explicit | Add dependency markers between steps | | No intermediate verification | Insert checkpoint after each step |
Conditional: Skip decomposition for simple reference tables or single-criteria rules.
Key insight: Goal is evaluable granularity with quality checkpoints, not decomposition for its own sake.
Incremental improvements for specific contexts.
| Detection | Transform | |-----------|-----------| | All examples share same pattern/structure | Add edge cases and exceptions | | Only happy-path examples | Add error cases, boundary conditions | | Examples all same complexity | Include simple, moderate, and complex |
| Detection | Transform | |-----------|-----------| | Skill demands definitive answers always | Add escalation criteria for ambiguous cases | | No "when to stop" guidance | Add explicit stopping conditions |
Skill example:
Measurable quality criteria for skill content. Each principle includes a pass/fail test.
| # | Principle | Pass Criteria | Fail Example |
|---|-----------|---------------|--------------|
| 1 | Context efficiency | Every sentence contributes to LLM decision-making. No filler. | "This is an important skill that helps with..." |
| 2 | Deduplication | No concept explained twice at the same abstraction level within the skill or across skills. Mentions at different structural roles (e.g., classification framework vs execution detail) are not duplicates, provided the re-mention adds new constraints or criteria | Same error handling rules restated at the same abstraction level in multiple related skills |
| 3 | Grouping | Related criteria in single section (minimize read operations) | Scattered error handling rules across 4 sections |
| 4 | Measurability | All criteria use if-then format or concrete thresholds | "Write clean code" without definition of clean |
| 5 | Positive form | Instructions state what to do (BP-001 applied) | "Don't use any" instead of "Use only X" |
| 6 | Consistent notation | Uniform heading levels, list styles, table formats | Mix of -, *, 1. in same context |
| 7 | Explicit prerequisites | All assumed knowledge stated | Uses "DI" without defining Dependency Injection |
| 8 | Priority ordering | Most important items first, exceptions last | Edge cases before common patterns |
| 9 | Scope boundaries | Explicit coverage: what this skill addresses vs references to other skills | Overlapping guidance with no cross-reference |
development
Vitestテスト設計と品質基準を適用。カバレッジ要件とモック使用ガイドを提供。ユニットテスト作成時に使用。
development
型安全性とエラーハンドリングルールを適用。any禁止、型ガード必須。TypeScript実装、型定義レビュー時に使用。
tools
環境変数、アーキテクチャ設計、ビルド・テストコマンドを定義。環境設定、アーキテクチャ設計時に使用。
tools
タスクの本質を分析し適切なスキルを選択。規模見積もりとメタデータを返却。タスク開始時、スキル選択時に使用。