Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

normalize

/normalize

Audytuje CLI th (crates/smooth-cli) pod kątem grup poleceń bez aliasu w liczbie pojedynczej lub mnogiej i dodaje brakujące atrybuty visible_alias w clap.

Repozytorium
smooth ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: audit.py

Co robi i kiedy

Audytuje CLI th (crates/smooth-cli) pod kątem grup poleceń bez aliasu w liczbie pojedynczej lub mnogiej i dodaje brakujące atrybuty visible_alias w clap.

Wyzwalacze z opisu

normalize the CLIplural singular aliaseswhy doesn
Oryginalny opis (EN)

Audit the `th` CLI (crates/smooth-cli) for resource-noun command groups missing their singular/plural counterpart alias, and add the missing clap `visible_alias` attributes so either form works. Use when adding a new `th` command group, or on the phrases "/normalize", "normalize the CLI", "plural singular aliases", "why doesn't `th agent` work".

Jak działa

  1. Rules (do not violate)
  2. Audit
  3. Fix pattern
  4. Verify
Sekcje z nagłówków SKILL.md, w oryginale · 76 linii, 457 słów
Podgląd SKILL.md
---
name: normalize
description: Audit the `th` CLI (crates/smooth-cli) for resource-noun command groups missing their singular/plural counterpart alias, and add the missing clap `visible_alias` attributes so either form works. Use when adding a new `th` command group, or on the phrases "/normalize", "normalize the CLI", "plural singular aliases", "why doesn't `th agent` work".
---

# normalize — singular ⇄ plural command aliases

Every resource-noun command GROUP in `th` should accept both its singular and
plural form (`th api agents` ⇄ `th api agent`, `th testing runs` ⇄ `th testing
run`). This skill finds the gaps and adds the aliases.

## Rules (do not violate)

1. **Resource-noun command GROUPS only** — a variant that holds a
   `#[command(subcommand)]` (a container of CRUD verbs). NEVER alias leaf verbs
   (`list`, `create`, `run`, `search`), positional args, gerunds (`testing`),
   or acronyms (`crm`). `th run` (execute a pearl) is a verb — leave it alone;
   `th testing runs` (test-runs resource) gets the `run` alias.
2. **Aliases only, never rename.** Add `#[command(visible_alias = "...")]`; keep
   the canonical variant name and its command spelling exactly as-is.
3. **`visible_alias`** (shows in `--help`), not `alias` (hidden).
4. **Skip collisions.** If the counterpart form is already a distinct command
   in the same enum, skip it. Also skip _semantic_ collisions: e.g. top-level
   `th agent` is agent-messaging while `th agents` is the Smoo AI platform
   agent surface — do NOT alias top-level `agent`→`agents`; it would make
   `th agents` mean messaging.

    This one is not hypothetical. The alias shipped anyway, and `th agents`
    meant messaging until th-c66db7 removed it and promoted the platform
    surface. `main.rs` now carries a parse test with a negative control
    (`th_agents_is_platform_agents_not_messaging`); re-adding the alias fails
    it loudly, because clap rejects a duplicate command name at
    parser-construction time. Prefer that shape — an assertion that a spelling
    resolves where you MEANT — over trusting this rule to be followed.

## Audit

```bash
python3 .claude/skills/normalize/audit.py         # prints OK / GAP / SKIP-collision per group
python3 .claude/skills/normalize/audit.py | grep GAP
```

The auditor works off a curated resource-noun pair list (`PAIRS` in the script)
— algorithmic pluralization is deliberately avoided (it invents "childrens",
"bulk-sets", verb-plurals). Adding a new resource = add its `(plural, singular)`
pair. Output columns: `STATUS  file  Enum  command -> counterpart`.

Gap table to report (one row per gap):

| command | canonical | missing alias | collision? |
| ------- | --------- | ------------- | ---------- |

## Fix pattern

Insert the attribute directly above the group variant (keep the doc comment):

```rust
/// Smoo AI async job queue.
#[command(visible_alias = "job")]     // <- add this line
Jobs {
    #[command(subcommand)]
    cmd: smooai::jobs::Cmd,
},
```

Applying is a hand edit (the doc comment is the unique anchor); the script
audits, it does not rewrite source. Sweep both `Cmd` enums in `main.rs`
(`Commands`, `ApiCommands`) and every `crates/smooth-cli/src/smooai/*.rs`
subcommand enum.

## Verify

```bash
cargo test -p smooai-smooth-cli cli_definition_is_valid   # clap debug_assert — catches alias collisions
python3 .claude/skills/normalize/audit.py | grep GAP      # should be empty for the swept scope
```

Add a parse assertion for a sample of new aliases in `main.rs`'s
`org_cli_tests` module (see `singular_plural_aliases_parse`).
Pliki w paczce (2)
  • SKILL.md 4 KB
  • audit.py 5 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · smooai/smooth100MIT
MarkForest/normalize-prompt100MIT
growupanand/ConvoForm90Apache-2.0
akarachen/aghub90MIT
aladicf/better-web-ui90MIT

Migawka bazy z 13.11.2026 · wersja paczki 08648fdbedbe (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100cli-commands
    Dodaje lub zmienia polecenia CLI but w katalogu crates/but/src.
  • 100reclap
    Buduje interfejsy wiersza poleceń w ReScript 12 z reclap, portem derive z Rust clap, z atrybutami parsera i podkomend.
  • 95rust-agent-friendly-cli
    Projektuje w Ruście interfejsy CLI przyjazne agentom, skryptom i ludziom: drzewa komend clap, diagnostykę i automatyzację.
  • 95glab-alias
    Tworzy, wypisuje i usuwa aliasy poleceń glab, czyli skróty do często używanych komend GitLab CLI.
  • 100rust-cli-tool-engineering
    Buduje i wydaje bibliotekę lub narzędzie CLI w Rust z clap, testuje je cargo test i pomaga przy przeglądzie kodu.
  • 95add-command
    Dodaje obsługę nowego polecenia CLI, pisze jego handler i wpisuje je na listę SIMPLE_SAFE.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.