Add `lh skill new`: scaffold, dry-run and local test

Aperta
#53 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
40/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Start by reading src/skills/mod.rs for how skills are loaded, parsed and discovered, and docs/skills-workflows.md for the frontmatter and reference conventions. Add the lh skill new subcommand that writes SKILL.md and an empty references/ directory, and refuse invalid names or existing paths before writing anything. Done when the acceptance criteria pass, including --from blanking identity fields and lh skill test reporting token costs with no endpoint configured. The lint backend is a separate issue, so check whether it exists before depending on it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: skills enhancement good first issue priority: P2

Problem

Writing a good skill requires knowing the frontmatter fields, the trigger-description style, the reference layout, the size limits and how the skill tool loads references. A new contributor has to read src/skills/mod.rs and docs/skills-workflows.md to discover conventions that a scaffold could enforce.

Inspiration

  • Claude Code's skill-creator: interactive scaffold with structure and examples.
  • cargo new / npm init: a correct skeleton beats a blank file.
  • lh skill lint (separate issue) as the validation backend.

Proposal

Add lh skill new <name> [--dir <path>]:

  • Create <dir>/<name>/SKILL.md with valid frontmatter, a trigger-oriented description, a body skeleton (When to use, Procedure, Stop conditions, Output), and an empty references/ directory.
  • Refuse invalid names and existing directories.
  • --from <skill> copies an existing skill as a starting point, with the name and description blanked.
  • lh skill test <name> loads the skill against a fake provider, reports the token cost of the body and each reference, and runs the lint checks.
  • Print the exact path and a one-line next step.

Acceptance criteria

  • lh skill new foo creates a lint-clean skill in the selected directory.
  • An invalid name or existing directory fails without writing.
  • --from preserves references but blanks identity fields.
  • lh skill test reports body and reference token costs without loading a real model.
  • The generated skill is discoverable by skill {} and /skill.
  • The command works with no endpoint configured.
Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GotinhaAzul/LocalHarness

Tutte le issue di GotinhaAzul/LocalHarness

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.