Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

skill-md-optimizer

БесплатноЗапускает вложенные скриптыНе проверен

Refactor/optimize any SKILL.md for progressive disclosure: precise-trigger frontmatter, layered body (hard constraints vs single-run flow), a flow of five…

elisabeth15501от elisabeth15501313 установок в других каталогах

Об этом скилле

SKILL.md Progressive-Disclosure Optimizer

Hybrid skill: methodology + deterministic linter. scripts/check_skillmd.py gives reproducible red/amber/green calls on the mechanical checks; this file gives the criteria and a five-step flow for the judgment layer. The read-only mode (audit) never modifies the original.

Natural-language note: every instruction below is plain guidance for the agent. No command, tool, or external call is required to follow them.


Hard constraints (obey every turn; re-applied after any context compaction)

If the context has been compacted, this section must be preserved and re-applied. Violating any item is an execution failure — "the user did not emphasize it" is not an excuse.

# Constraint Rationale
H1 Never silently drop rules. Refactoring only moves content (down into references/) and adds a pointer; it does not delete any substantive rule. Deletion requires the user's explicit confirmation. Same contract as a read-only audit
H2 Never overwrite. Back up the original before writing back (a <name>.bak or git commit); if the target name already exists, choose a different one. Reversibility
H3 Every change is traceable. Record each change in the changelog table: old -> new + reason + "assumed?" + "P0?". Any change that assumes a default must be explicitly marked "assumed". Trust
H4 No network, no secrets. Do not make requests, read keys, or call external APIs. Compliance red line
H5 Never guess the target. If no SKILL.md is named, ask first; if it cannot be read, give a three-step self-check (spelling / relative path / list the directory) and do not fall back to auditing a different file. Reliability
H6 Mechanical checks go to the script. Frontmatter syntax, name rules, character/line budgets, and dangling references are decided by scripts/check_skillmd.py, never by impression. Cross-agent reproducibility
H7 Stay in lane. Optimize SKILL.md text and structure only; do not audit the code the skill calls (skill-clean-audit) or run a publish gate (skill-publish-gate). Division of labor
H8 Declarations must match behavior. If anything new reads env / calls a binary / uses the network, declare it; default is zero-network. Consistency
H9 Do not guess the output language. Follow explicit zh/en > inferred interaction language > ask; do not switch mid-run. Consistency

Language picker (Natural-Language Policy: offer a choice) — keep in first ~3000 tokens

This skill serves multilingual users; artifact language is decided by three states, fixed for the whole run (no mid-run switch):

  • auto (default): follow the language you use with the agent — English in → English out; Chinese in → Chinese out; mixed → your dominant language; pure code/paths with no natural language → ask "Chinese or English report?"
  • zh: force Chinese; every artifact Chinese, ignoring the exchange language.
  • en: force English; every artifact English, ignoring the exchange language.

Priority: your explicit zh/en > inferred auto > ask as a fallback. No locale is hard-set, so this is not a single-language lock; if you must pin a locale, state the reason and an exit here. Full policy detail and the layering rules live in references/i18n_policy.md.


Criteria core (read first; keep within the first ~3000 tokens)

Root premise: SKILL.md is shared context with the host agent. Every line must earn its token cost. Key reversal: stuffing variant details, platform matrices, and changelog templates into the body raises per-run cost. Sink what is not used every turn into references/; keep only per-turn essentials plus navigation pointers in the body.

Four criteria:

  • T. Trigger precision — frontmatter (name / description / when-to-use) matches how users actually ask, including trigger words, boundaries, and explicit "not-for" cases.
  • L. Layering — persistent hard constraints are separated from the single-run flow; hard constraints are explicitly marked "every turn" so they survive compaction.
  • C. Convergence — the single-run flow is five steps or fewer; each step states its input / output / failure fallback; it closes within one turn with no later re-read.
  • B. Budget — the whole file fits a 3500-token budget (the official 500-line body cap), the core rules sit in the first ~1500–2000, and the remaining slack is reserved as compaction headroom.

Five-step flow (single-turn closed loop; no cross-turn re-read)

Each step states input / action / output / fallback.

Step 1 - Resolve target and mode

  • Input: the user query (may include a SKILL.md path, a directory, a target platform).
  • Action: If no target is named, ask first (H5). Pick the mode: refactor (default, optimizes a SKILL.md), audit (read-only diagnostic),
Полный SKILL.md на ClawHub

Установить skill-md-optimizer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл skill-md-optimizer?

Refactor/optimize any SKILL.md for progressive disclosure: precise-trigger frontmatter, layered body (hard constraints vs single-run flow), a flow of five steps or fewer, permission/context declarations, and a token budget. Triggers: "optimize / refactor / slim down this SKILL.md", "make the skill trigger more precisely", "the body is too long / hard constraints get lost when the context compacts", "split this SKILL.md into a lean body plus references". Three modes: refactor (default, emits the optimized file + a changelog), audit (read-only diagnostic), and readme (polish the companion README.md - structure, badges, install, usage examples, license). NOT for: auditing the code a skill calls (skill-clean-audit), a publish-time security/compliance gate (skill-publish-gate), or from-scratch creation (skill-creator). No external network and no required secrets; the linter runs offline.

Как установить скилл skill-md-optimizer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл skill-md-optimizer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить skill-md-optimizer с