Logo: Clack

Clack

Communautéit
tuanductran
clack

Repository guidance for @clack/prompts usage in packages/hr-skills/src/cli/* and packages/hr-skills-build/src/server/build/*. Covers the intro/spinner/note/outro/log CLI-output pattern this repo actually uses — not clack's interactive text/select/confirm prompts, which this repo does not use.

Add to TypingMind

Iwwersiicht

Editeurtuanductran
Repositoryhr-skills
Skill-Nummclack
Stären
78
Forks
20
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    tuanductran huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Clack an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/tuanductran/hr-skills/tree/main/.agents/skills/clack
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tuanductran/hr-skills.git /tmp/hr-skills
mkdir -p .claude/skills
cp -r /tmp/hr-skills/.agents/skills/clack .claude/skills/clack
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Clack an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Clack automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Clack net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

clack

Repository guidance for @clack/prompts (^1.7.0, see package.json) as used across packages/hr-skills/src/cli/*.ts and packages/hr-skills-build/src/server/build/sync.ts.

This repo's clack usage is narrow and deliberate. Every CLI here (discover, recommend, execute-plan, generate-plan, run-evaluation, sync, validate) is a single-shot, non-interactive script driven by process.argv — none of them collect input via clack's interactive prompts. Full upstream docs: Getting Started, Prompts, Best Practices.

What this repo actually uses

Only five clack APIs appear anywhere in this codebase — confirmed by grepping packages/hr-skills-build/src/server:

APIPurposeUsed in
p.intro(title)Announce the CLI at startEvery cli/*.ts entry point, plus server/build/sync.ts and server/validation/validate.ts
p.outro(message)Announce completion at end — including every failure path, or the box is left unterminatedSame as p.intro
p.spinner() / .start() / .stop()Show progress during buildRegistry(), validation, plan generation, and so onCreated via cliSpinner() in discover.ts, execute-plan.ts, generate-plan.ts, recommend.ts, run-evaluation.ts, server/validation/validate.ts
p.note(message, title?)Print a multi-line info block (search results, recommendations, usage)discover.ts, recommend.ts, execute-plan.ts, generate-plan.ts, run-evaluation.ts, cli-bootstrap.ts
p.log.{info,error,warn,success,message}Single-line status/error outputAll cli/*.ts, routed through cli/cli-bootstrap.ts

p.note titles are SCREAMING CASE at every call site (RESULTS FOR …, EXECUTION PLAN, USAGE). Keep it that way.

What this repo does NOT use — do not introduce it

  • No text(), select(), confirm(), multiselect(), password(), or any other interactive prompt. These CLIs must stay scriptable (CI, bunx, piped output); blocking on stdin input would break that. If a task genuinely needs a human choice, that belongs in .claude/commands/*.md (Claude Code slash commands), not in packages/hr-skills-build's CLIs.
  • No isCancel(). It only matters when interactive prompts are in play — irrelevant here. Don't add it "for safety"; it signals dead code review comments.
  • No @clack/core low-level primitives (TextPrompt, custom Prompt subclasses). @clack/prompts alone covers everything this repo needs.

If a future CLI genuinely needs interactive input, that's a deliberate scope change — flag it explicitly rather than silently adding text()/select() to keep the "always scriptable" invariant intact.

Repository pattern

Every CLI entry point in src/cli/*.ts follows this shape (see cli/cli-bootstrap.ts):

typescript
import * as p from '@clack/prompts';
import { type CliUsage, cliSpinner, printUsageAndExit, runCli } from './cli-bootstrap.js';

const USAGE: CliUsage = {
  title: 'My Command',
  usage: 'bun run my-command "<argument>"',
  example: 'bun run my-command "example"',
};

async function main() {
  const intent = process.argv[2];

  // Reject a bare flag in the positional slot too, not just an empty one.
  if (!intent || intent.startsWith('--')) {
    printUsageAndExit(USAGE);
  }

  p.intro(USAGE.title);

  const spinner = cliSpinner();
  spinner.start('Building Skill Registry...');
  const registry = await buildRegistry();
  spinner.stop(`Registry ready (${registry.skillCount} skills)`);

  // ... do the work, p.note(...) for structured output ...

  p.outro('Done');
}

runCli(main, USAGE);
  • One CliUsage per command, shared by printUsageAndExit, runCli, and p.intro(USAGE.title), so the --help screen and the bad-invocation error can't drift apart.
  • Pass USAGE to runCli. That is what implements --help/-h: it prints usage and exits 0 before main() runs. Omit it and the command treats --help as a positional argument — which is how bun run evaluate --help once ran the whole evaluation suite and bun run plan --help generated a plan for the literal intent "--help".
  • Use cliSpinner(), never p.spinner() directly. A running spinner repaints every 80ms by erasing the lines beneath it, and clack's exit handler then stamps "Canceled" over the area — so an error thrown mid-spin is invisible. cliSpinner() registers the spinner so runCli can stop it with the real message.
  • printUsageAndExit / runCli standardize the bad-invocation and uncaught-error paths — see cli-bootstrap. Don't hand-roll p.log.error(...); process.exit(1); again; that duplication is exactly what cli-bootstrap.ts was extracted to remove (see dry-refactoring). Prefer letting a typed error propagate to runCli over catching it locally.
  • p.intro/p.outro bookend the whole run — call each exactly once, on success and failure alike. p.log.* output renders with clack's │ gutter but no ┌ above and no └ below, so an exit(1) with no outro leaves a visibly broken box.
  • Validate flag values, not just presence: --limit 0 and --limit abc used to reach the search layer as 0/NaN and produce "no results", blaming the query for a bad flag. Reject unknown flags too, rather than ignoring them.
  • spinner.stop(message) should report a concrete result (count, duration), not just "Done" — matches the existing Registry ready (${registry.skillCount} skills) style.
  • A CLI module that anything else imports (validation/validate.ts is imported by its own test) keeps its if (import.meta.main) guard around runCli, and parses process.argv inside it — otherwise a plain import runs the command or parses the host process's flags.

Key prompts

Adding a new CLI

  • "Scaffold a new src/cli/*.ts entry point following this repo's clack pattern."
  • "Wire this new CLI through cli-bootstrap.ts's runCli/printUsageAndExit."

Reviewing clack usage

  • "Check whether this CLI change introduces an interactive prompt that would break scriptability."
  • "Review this p.spinner() usage for a concrete stop message."
  • "Is this p.log.* call redundant with what cli-bootstrap.ts already provides?"

Tips

  • Keep p.intro/p.outro messages short — they're a visual bookend, not a status report.
  • Prefer p.note() over multiple p.log.message() calls when printing a related block (search results, a plan summary) — it groups visually.
  • Never gate a cli/*.ts script on user input; that's the one hard rule this skill exists to protect.

Heefeg gestallte Froen

Wat mécht de KI-Skill Clack?

Repository guidance for @clack/prompts usage in packages/hr-skills/src/cli/* and packages/hr-skills-build/src/server/build/*. Covers the intro/spinner/note/outro/log CLI-output pattern this repo actually uses — not clack's interactive text/select/confirm prompts, which this repo does not use.

Firwat Clack op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Clack besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Clack an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/tuanductran/hr-skills/tree/main/.agents/skills/clack an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Clack benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Clack benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Clack domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Clack gratis?

Jo. tuanductran huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇