Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Authoritative guide for writing x-cmd advise (completion/help specs). Covers YAML structure, field semantics, TLDR writing, error patterns, and lint workflow. Style: principle-first, concise, with verifiable rules.
.claude/skills/x-cmd-x-cmd-advise/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -23% | 0% |
> This is the live instruction for AI agents writing adv/index.yml files. > For the full spec, run x advise spec show. > For rule-based verification, run x advise spec lint.
| Principle | Rule | |-----------|------| | Options first | In all examples (synopsis, tldr, desc), options MUST precede arguments. x mod --opt arg ✅, x mod arg --opt ❌ | | Root-level subcmds | Subcommands are defined at root, NOT wrapped under <subcmd>: | | Preserve order | Never reorder subcmd aliases. c|cp|copy stays c|cp|copy | | No builtin help | -h|--help is handled by code; do NOT declare it in advise | | Efficiency modules | Only assert, is, str are efficiency modules. Mark with <meta>: <subcmd-help>: disable. All TLDR at root only. | | YAML safety | Quote strings containing :, !, &, *, or leading - |
yaml<name>: <modname>: cn: 中文名 en: English name <synopsis>: # MODULE level only - x <mod> [subcmd] [options]: <desc>: cn: | Description. en: | Description. <tip>: # List of tips, module or subcmd level - cn: "Tip content" en: "Tip content" <tldr>: # At least 3 items (simple) or 8+ (complex) - cmd: x <mod> <subcmd> cn: "示例: description" en: "Example: description" <subcmd:Category>: # Display grouping only - subcmd1 - subcmd2 # Subcommands at ROOT level subcmd1: <desc>: cn: ... en: ... <1>: # Positional arg <desc>: ... <exec>: ___x_cmd_advise__file --option|-o: <desc>: ...
Required fields: <name>, <synopsis>, <desc>, <tldr> (minimum 3).
--csv, --tsv once each in early TLDRs, then drop them| Error | Fix | |-------|-----| | <subcmd>: wrapper | Define subcmds at root level | | Changed alias order | Keep original: c|cp|copy not c|copy|cp | | <synopsis> in subcmd | Use <1>, <2>, <n> in subcmds; <synopsis> is module-only | | Efficiency TLDR in subcmd | Move all TLDR to root for assert/is/str | | Unquoted : in desc | Wrap in quotes: "Backend: value" | | Declaring -h\|--help | Remove; handled by lib/main |
bashx advise spec show # full spec in TTY x advise spec show | cat # plain text for piping
bashx advise spec init # copies tmpl.mod.yml → adv/index.yml
adv/index.ymlFollow the field order: <name> → <meta> → <synopsis> → <desc> → <tip> → <tldr> → <subcmd:Category> → subcmd definitions.
bash# From module directory x advise spec lint # Or specify path x advise spec lint --path /path/to/module
Lint generates advise.jso and renders help. If it passes, the advise is structurally valid.
bashx scotty mod install # installs adv/index.yml into x-cmd user directory
Only assert, is, str qualify. Check before marking:
<meta>: <subcmd-help>: disable is present<tldr> under any subcmd<desc> (no options, no tldr)Study these for specific patterns:
| Module | Pattern | |--------|---------| | bwh | Multi-part advise with <ref> | | line | Subcmd categories, _ suffix tip at module level | | dbnomics | Scenario TLDR, auto mode, format flags | | assert | Efficiency module | | str | Efficiency module, pipe + arg dual input |
rule/advise.rule.yml lives next to this spec. Key rules:
| Rule | Level | Check | |------|-------|-------| | ADV-syntax-indent | error | 2-space indent, no tabs | | ADV-field-name-required | error | <name> has cn + en | | ADV-field-tldr-min | error | ≥3 TLDR items | | ADV-option-prefix | error | Options precede args in all examples | | ADV-modify-order | error | Subcmd alias order unchanged | | ADV-efficiency-tldr-root | error | Efficiency TLDR only at root |
Run rule checks after editing:
bashx rule check -r /path/to/advise/lib/spec/resource/rule/ adv/index.yml
bashx advise spec show # display spec x advise spec init # create tmpl.mod.yml x advise spec lint # validate and render x advise ls # list loaded advise files x advise cat <name> # view advise.jso content x advise which <name> # path to advise.jso
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,053 | 10,910 | -9% | 1 | 1 | 0% | 2,363 | 3,580 | +52% | 0 | 0 | — |
case-02 | fail→pass | 13,166 | 10,215 | -22% | 1 | 1 | 0% | 2,560 | 3,498 | +37% | 0 | 0 | — |
case-03 | fail→pass | 13,761 | 11,279 | -18% | 1 | 1 | 0% | 2,556 | 3,743 | +46% | 0 | 0 | — |
case-04 | pass→pass | 7,247 | 4,616 | -36% | 1 | 1 | 0% | 1,086 | 2,093 | +93% | 0 | 0 | — |
case-05 | fail→pass | 24,017 | 4,047 | -83% | 1 | 1 | 0% | 1,781 | 2,133 | +20% | 0 | 0 | — |
case-06 | pass→pass | 12,321 | 3,820 | -69% | 1 | 1 | 0% | 1,821 | 2,018 | +11% | 0 | 0 | — |
case-07 | fail→pass | 32,931 | 6,750 | -80% | 1 | 1 | 0% | 3,566 | 2,759 | -23% | 0 | 0 | — |
case-08 | fail→pass | 9,860 | 4,090 | -59% | 1 | 1 | 0% | 1,595 | 2,150 | +35% | 0 | 0 | — |
case-09 | fail→pass | 10,546 | 5,163 | -51% | 1 | 1 | 0% | 1,785 | 2,215 | +24% | 0 | 0 | — |
case-10 | fail→fail | 8,694 | 5,523 | -36% | 1 | 1 | 0% | 1,321 | 2,306 | +75% | 0 | 0 | — |
case-11 | fail→pass | 11,749 | 11,389 | -3% | 1 | 1 | 0% | 2,033 | 2,503 | +23% | 0 | 0 | — |
case-12 | pass→pass | 10,965 | 3,849 | -65% | 1 | 1 | 0% | 1,939 | 2,016 | +4% | 0 | 0 | — |
case-13 | fail→pass | 13,674 | 4,520 | -67% | 1 | 1 | 0% | 1,884 | 2,193 | +16% | 0 | 0 | — |
case-14 | pass→pass | 22,351 | 4,062 | -82% | 1 | 1 | 0% | 965 | 2,131 | +121% | 0 | 0 | — |
case-15 | fail→pass | 11,841 | 2,707 | -77% | 1 | 1 | 0% | 1,705 | 1,841 | +8% | 0 | 0 | — |
case-16 | pass→pass | 12,225 | 14,711 | +20% | 1 | 1 | 0% | 1,748 | 2,611 | +49% | 0 | 0 | — |
case-17 | fail→pass | 12,436 | 4,181 | -66% | 1 | 1 | 0% | 1,863 | 1,958 | +5% | 0 | 0 | — |
case-18 | fail→fail | 10,419 | 3,511 | -66% | 1 | 1 | 0% | 1,661 | 1,907 | +15% | 0 | 0 | — |
case-19 | fail→pass | 11,537 | 2,790 | -76% | 1 | 1 | 0% | 1,698 | 1,851 | +9% | 0 | 0 | — |
case-20 | fail→pass | 20,536 | 2,438 | -88% | 1 | 1 | 0% | 3,318 | 1,837 | -45% | 0 | 0 | — |
case-21 | pass→pass | 17,360 | 27,839 | +60% | 1 | 1 | 0% | 3,091 | 4,333 | +40% | 0 | 0 | — |
case-22 | pass→pass | 17,197 | 38,429 | +123% | 1 | 1 | 0% | 3,133 | 4,842 | +55% | 0 | 0 | — |
case-23 | pass→pass | 37,971 | 13,291 | -65% | 1 | 1 | 0% | 3,537 | 4,068 | +15% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +57 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.