jpskill.com
🛠️ 開発・MCP コミュニティ

clack

Comprehensive guidance for building and debugging JavaScript and TypeScript CLIs with @clack/core and @clack/prompts, backed by bundled upstream source and examples. Use when implementing clack prompt flows, deciding between core primitives and styled prompts, adapting clack examples, or validating clack API usage.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o clack.zip https://jpskill.com/download/10657.zip && unzip -o clack.zip && rm clack.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10657.zip -OutFile "$d\clack.zip"; Expand-Archive "$d\clack.zip" -DestinationPath $d -Force; ri "$d\clack.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して clack.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → clack フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1
📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

Clack CLI Skill

Use this skill to implement reliable interactive CLIs with @clack/core and @clack/prompts.

Workflow

  1. Decide whether to use @clack/prompts or @clack/core.
  2. Read only the minimum reference files needed for the task.
  3. Start from the closest example in references/examples/.
  4. Implement cancellation handling after every prompt.
  5. Add UX polish (intro, outro, spinner, progress, tasks, log, taskLog, stream) when useful.
  6. Verify imports against export maps in references/docs/prompts-exports.ts and references/docs/core-exports.ts.

Pick the Right Layer

Use @clack/prompts by default.

  • Choose it for production-ready styling and quick delivery.
  • Use it when the request maps to standard prompt types: text, confirm, select, multiselect, grouped prompts, logs, spinners, progress, tasks, or streaming logs.

Use @clack/core when lower-level control is required.

  • Choose it for custom rendering, custom prompt behavior, or unstyled primitives.
  • Use it when the request needs direct prompt classes (TextPrompt, SelectPrompt, ConfirmPrompt, Prompt) or deep customization.

Mandatory Safety Patterns

Handle cancellation on every prompt result.

import * as p from '@clack/prompts';

const value = await p.text({ message: 'Your name?' });
if (p.isCancel(value)) {
  p.cancel('Operation cancelled.');
  process.exit(0);
}

Start and close sessions cleanly for user-facing CLIs.

p.intro('create-app');
// prompts
p.outro('Done');

Prompt Design Guidance

Use these defaults unless the user asks otherwise.

  • text: provide validate for required or constrained input.
  • confirm: use for binary decisions; avoid coercing free-form text.
  • select: use for mutually exclusive choices.
  • multiselect or groupMultiselect: use for multi-choice and hierarchical multi-choice flows.
  • group: gather structured answers while preserving dependencies between steps.
  • spinner and progress: wrap long-running tasks and update status clearly.
  • tasks: execute sequential task blocks with spinner status.
  • taskLog: stream subprocess output and finish with success/failure.
  • stream: render async or tokenized output (for LLM-style streaming).

Implementation Sequence

  1. Inspect user requirements and identify required prompt primitives.
  2. Read the nearest example under references/examples/.
  3. Confirm function/class availability from:
    • references/docs/prompts-exports.ts
    • references/docs/core-exports.ts
  4. If behavior is unclear, inspect source under:
    • references/source/prompts/
    • references/source/core/
  5. Implement with cancellation guards and clear terminal messaging.
  6. Keep fallback behavior for non-interactive contexts when requested (see spinner and CI-oriented examples).

Reference Loading Strategy

Start with these files.

  • references/docs/prompts-readme.md
  • references/docs/core-readme.md
  • references/INDEX.md

Load specific source files only as needed.

  • Prompts wrapper internals: references/source/prompts/*.ts
  • Core prompt primitives: references/source/core/prompts/*.ts
  • Core utility behavior: references/source/core/utils/*.ts

Example-First Mapping

Use this quick mapping to avoid re-inventing flows.

  • General prompt suite: references/examples/basic/index.ts
  • Validation: references/examples/basic/text-validation.ts
  • Autocomplete: references/examples/basic/autocomplete.ts
  • Autocomplete multi-select: references/examples/basic/autocomplete-multiselect.ts
  • Defaults: references/examples/basic/default-value.ts
  • Filesystem path prompt: references/examples/basic/path.ts
  • Spinner basics: references/examples/basic/spinner.ts
  • Spinner cancellation: references/examples/basic/spinner-cancel.ts
  • Advanced spinner cancellation: references/examples/basic/spinner-cancel-advanced.ts
  • CI-oriented spinner behavior: references/examples/basic/spinner-ci.ts
  • Timer-style spinner updates: references/examples/basic/spinner-timer.ts
  • Progress bar: references/examples/basic/progress.ts
  • Task log streaming: references/examples/basic/task-log.ts
  • Stream utility: references/examples/basic/stream.ts
  • Changesets integration flow: references/examples/changesets/index.ts

Quality Bar

Before finalizing any clack implementation:

  • Confirm every import exists in the current exports file.
  • Ensure cancellation flow always exits safely.
  • Ensure prompt wording is short and unambiguous.
  • Ensure long-running operations provide visible status.
  • Ensure selected layer (core vs prompts) matches customization needs.