プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

nodejs-cli-apps-best-practices Skill

作者:lirantal★ 4,1431 個の skill

インストール

What it does

The largest Node.js CLI Apps best practices list ✨

  • Connects Instruction files the AI reads; connects to nothing
  • Account or key No key needed
  • Category その他
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/lirantal-nodejs-cli-apps-best-practices.svg)](https://mcp.popnx.com/en/skills/lirantal-nodejs-cli-apps-best-practices)

似た Skill

同じ種類の作業。Skill 一覧と同じ並び

似たものと比べる
これ
nodejs-cli-apps-best-practices
llmfitclaude-videoVideoCaptionerpatent-disclosure-skill
作者lirantalAlexsJonesbradautomatesWEIFENG2333handsomestWei
Skill 数11111
GitHub スター4,14339,00420,88916,53913,468
最終コード更新2026年7月9日2026年11月12日2026年9月25日2026年9月12日2026年11月15日
ライセンスCC-BY-SA-4.0MITMITGPL-3.0MIT

lirantal による 1 個の Skill(指示セット)。AI が読んでそのとおりに作業します · MCP server ではありません

Skill と MCP の違い

MCP = 手

AI を外部のサービスやデータにつなぎます(例:Notion を読む、請求書を作る)。プログラムやサーバーが動いている必要があります。

Skill = 手順書

作業のやり方を AI に教えるテキストファイル。どのサービスにもつながりません。

重なる部分もあります。ツールを呼ぶスクリプト付きの Skill や、知識だけを渡す MCP もあります。やりたい作業から選んでください。

使えるアプリ

提供元の記載なし · SKILL.md 形式の Skill は Claude Code、Codex、Cursor など Agent Skills 対応アプリで使えます

インストール

Is it safe?

  • Who made it

    GitHub account lirantal (person), 16 years old

  • Use and upkeep

    ★ 4,143 stars · code last changed 2026年7月9日

  • Any scripts?

    3 scripts that can run on a computer: evals/fixtures/arg-injection.js, evals/fixtures/bad-cli-clean.js, evals/fixtures/bad-cli.js

  • Uses the internet?

    Scripts that go online: evals/fixtures/bad-cli-clean.js, evals/fixtures/bad-cli.js

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit e6374e4 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

まず:どの AI を使っていますか

使っているアプリを選ぶと、そのアプリでのインストール方法だけが表示されます

Option 1Upload to claude.ai (web and app)

  1. Download from GitHub

    This skill uses the CC-BY-SA-4.0 license, which is not on the list we redistribute, so we do not hand out a ZIP from our site. Download it from GitHub and arrange the folder yourself, or use "Let the AI install it" above, which is easier

    Download from GitHub (whole repo) ↗

    Unzip it, then zip only the skills/nodejs-cli-best-practices folder again. The ZIP must have a nodejs-cli-best-practices folder with SKILL.md at the top level, no loose files

  2. Open Skills on claude.ai and upload

    +Create skillUpload a skillpick nodejs-cli-best-practices.zip

    Open claude.ai/customize/skills ↗

  3. No Upload button? Turn on file creation first

    SettingsCapabilitiesCode execution and file creation

    Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free

Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)

Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)

Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com

Option 1Claude Code にインストールしてもらう

この文をコピーして Claude Code のチャットに貼り付けます

Where to install
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) for all my projects, at ~/.claude/skills/nodejs-cli-best-practices. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) into the project this chat is open in (at .claude/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Claude Code を開き直し、/nodejs-cli-best-practices と入力するか関連する作業を頼むと Claude が自動で使います

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。

  1. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください

  2. skill フォルダを ~/.claude/skills にコピー

    repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします

    git clone --depth 1 https://github.com/lirantal/nodejs-cli-apps-best-practices.git /tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4/skills/nodejs-cli-best-practices' ~/.claude/skills/nodejs-cli-best-practices
  3. Claude Code を開き直し、/nodejs-cli-best-practices と入力するか関連する作業を頼むと Claude が自動で使います

自分でインストールした Skill は ChatGPT デスクトップアプリ、Codex CLI、IDE の Codex 拡張機能で使えます · Web 版とモバイル版の ChatGPT では自分でインストールした Skill は使えず、ディレクトリのプラグインに含まれる Skill だけが使えます

ChatGPT デスクトップアプリ

ChatGPT デスクトップアプリには Codex が組み込まれていて、Codex は ~/.agents/skills フォルダから Skill を読み込みます

Option 1ChatGPT にインストールしてもらう

ChatGPT デスクトップアプリで Codex を開き、この文をチャットに貼り付けます

Where to install
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) for all my projects, at ~/.agents/skills/nodejs-cli-best-practices. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) into the project this chat is open in (at .agents/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自分でフォルダを置く

nodejs-cli-best-practices フォルダを ~/.agents/skills/nodejs-cli-best-practices に置きます

~ はホームフォルダ($HOME)です

For Terminal users

Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。

  1. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください

  2. skill フォルダを ~/.agents/skills にコピー

    repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします

    git clone --depth 1 https://github.com/lirantal/nodejs-cli-apps-best-practices.git /tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4/skills/nodejs-cli-best-practices' ~/.agents/skills/nodejs-cli-best-practices

インストールしたあと

  • ChatGPT デスクトップアプリ:サイドバーの Skills を開いて Skill があるか確認します
  • 使い方:ChatGPT では @ を入力して Skill を選びます · Codex CLI や IDE 拡張機能では /skills を実行するか、$ に続けて Skill 名を入力します
  • Codex は新しくインストールした Skill を自動で見つけます。表示されない場合は Codex を再起動してください

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Web 版とモバイル版の ChatGPT

自分でインストールした Skill は使えません。ディレクトリのプラグインに含まれる Skill だけが使えます

この Skill を ChatGPT で使うには、上の方法で ChatGPT デスクトップアプリを使ってください

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1Codex にインストールしてもらう

この文をコピーして Codex のチャットに貼り付けます · ChatGPT デスクトップアプリ内の Codex、Codex CLI、IDE 拡張機能で使えます

Where to install
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) for all my projects, at ~/.agents/skills/nodejs-cli-best-practices. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) into the project this chat is open in (at .agents/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex は新しくインストールした Skill を自動で見つけます。表示されない場合は Codex を再起動してください · 使い方:ChatGPT では @ を入力して Skill を選びます · Codex CLI や IDE 拡張機能では /skills を実行するか、$ に続けて Skill 名を入力します

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。

  1. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください

  2. skill フォルダを ~/.agents/skills にコピー

    repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします

    git clone --depth 1 https://github.com/lirantal/nodejs-cli-apps-best-practices.git /tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4/skills/nodejs-cli-best-practices' ~/.agents/skills/nodejs-cli-best-practices
  3. Codex を開き直して関連する作業を頼むと、Codex が skill を一覧に出します

Option 1Cursor にインストールしてもらう

この文をコピーして Cursor のチャットに貼り付けます

Where to install
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) for all my projects, at ~/.cursor/skills/nodejs-cli-best-practices. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) into the project this chat is open in (at .cursor/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Cursor の Agent チャットで / を入力し nodejs-cli-best-practices を選ぶ

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。

  1. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください

  2. skill フォルダを ~/.cursor/skills にコピー

    repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします

    git clone --depth 1 https://github.com/lirantal/nodejs-cli-apps-best-practices.git /tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-lirantal-nodejs-cli-apps-best-practices-e6374e4/skills/nodejs-cli-best-practices' ~/.cursor/skills/nodejs-cli-best-practices
  3. Cursor の Agent チャットで / を入力し nodejs-cli-best-practices を選ぶ

Option 1Let the AI install it

Skill を読めるほかのアプリ向けです。この文には Claude Code、Codex、Cursor のパスが入っていて、AI が使っているアプリに合わせて選びます · Copy this sentence into the app’s chat

Where to install
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) for all my projects, at ~/.claude/skills/nodejs-cli-best-practices (in Codex use ~/.agents/skills/nodejs-cli-best-practices, in Cursor ~/.cursor/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill nodejs-cli-best-practices from https://github.com/lirantal/nodejs-cli-apps-best-practices folder skills/nodejs-cli-best-practices (commit e6374e4) into the project this chat is open in (at .claude/skills/nodejs-cli-best-practices; in Codex use .agents/skills/nodejs-cli-best-practices, in Cursor .cursor/skills/nodejs-cli-best-practices). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

Gemini CLI や GitHub Copilot など Agent Skills 対応の他のアプリはフォルダが違います。そのアプリのガイドを見て、SKILL.md のあるフォルダをコピーしてください。

GitHub で見る ↗

2026年11月11日 に Claude Code、Codex、Cursor の公式ガイドで skill フォルダを確認

✓ コマンド確認済み 2026年11月16日

元の SKILL.md を見る

以下は提供元の repo の文章で、PopNx MCP の指示ではありません

最初の 8,000 文字を表示 · GitHub で全文を開く

---
name: nodejs-cli-best-practices
description: Guide and audit Node.js CLI application development against 41 established best practices covering UX, distribution, interoperability, accessibility, testing, error handling, development setup, analytics, versioning, and security. Use this skill when building, extending, reviewing, or scaffolding a Node.js CLI — including when someone says "audit my CLI", "review my CLI code", "I'm building a CLI tool", or asks about adding argument parsing, help output, shell completion/autocomplete, error handling, color output, STDIN, --json flags, exit codes, --version flags, or npm publishing. Applies even when best practices are not explicitly mentioned. Also trigger for "how should I implement X in my CLI" or "what's the right way to do Y in a Node.js CLI". Do NOT use for Node.js backend or API development with no CLI entry point.
metadata:
  version: 1.0.0
  category: nodejs
  tags: [nodejs, cli, best-practices, audit, command-line]
---

This skill operates in two modes — **audit** for reviewing existing CLI code and **development guide** for building new features or tools.

## Critical

Always read `references/best-practices.md` before producing any output. It contains the complete reference for all 41 practices with code examples and recommended packages. It is the source of truth for both modes — do not rely on general knowledge alone, as several practices (specific package recommendations, §X.X numbering, configuration precedence order) are specific to this guide.

## Determining the mode

| Trigger | Mode | Action |
|---------|------|--------|
| User provides existing CLI code or files to review | **Audit** | Produce a structured audit report |
| User asks how to build or implement something | **Development guide** | Surface relevant practices with examples |
| User says "review and help me improve" | **Both** | Audit first, then provide concrete guidance for each failing practice |

---

## Audit mode

Systematically compare the provided code against the practices in `references/best-practices.md`. Focus on what is verifiable from the code. Use judgment to mark practices as not applicable (➖) when there's genuinely no way to assess them from static analysis (e.g., Docker support when the project shows no distribution intent).

**Prioritize by user impact** — a missing exit code (§6.4) or absent `--version` flag (§9.1) affects every user and every CI pipeline; missing Docker image (§4.1) is low priority for most projects.

### Audit report format

```
## Node.js CLI Best Practices Audit

### Summary
✅ N practices followed  ⚠️ N need attention  ❌ N not implemented  ➖ N not applicable

---

### 1. Command Line Experience
| # | Practice | Status | Finding |
|---|----------|--------|---------|
| 1.1 | Respect POSIX args | ✅ | Uses yargs with proper short/long aliases |
| 1.2 | Build empathic CLIs | ❌ | No interactive fallback when required args absent |
...

[Repeat for each section with applicable practices]

---

### Priority recommendations

**High priority** (user-facing or CI-breaking):
- **§6.4 Exit codes** — `process.exit()` called without a code
  ```js
  // Fix
  process.exit(1); // on error
  process.exit(0); // on success
  ```

**Medium priority**:
- ...

**Low priority / nice to have**:
- ...
```

Keep findings concise and tied to specific code patterns. Always include a concrete fix with code for each ❌.

---

## Development guide mode

When building a new CLI feature or tool, don't wait to be asked — surface relevant best practices immediately based on what the user is building.

**For a "building a CLI from scratch" request**, organize guidance by development phase:

1. **Project setup** (§7.1, §7.3, §4.4, §2.2): bin object, shebang, files field, shrinkwrap
2. **Argument design** (§1.1, §1.2, §1.7, §1.9, §3.4): POSIX compliance, empathic fallbacks, zero-config, help output, config precedence
3. **I/O and interoperability** (§3.1, §3.2, §3.5, §3.6, §3.7, §4.2): STDIN, structured output, gated interactivity, STDOUT/STDERR separation, shell completion, graceful degradation
4. **Error handling** (§6.1–§6.5): trackable codes, actionable messages, debug mode, exit codes
5. **UX polish** (§1.4, §1.5, §1.6): colors, rich interactions, hyperlinks
6. **Versioning** (§9.1–§9.7): `--version` flag, semver, changelog
7. **Security** (§10.1): argument injection

**For a targeted feature request** (e.g., "add error handling", "add a --json flag"), surface only the directly relevant practices.

### Development guidance format

```
## Node.js CLI best practices for [feature/topic]

### Checklist
- [ ] §X.Y Practice name — one-line explanation of why it matters

### Implementation
[Concrete, copy-pasteable code]

### Recommended packages
- `package-name` — when and why to use it
  npm install package-name

### Common mistakes
- What not to do → why it breaks → what to do instead
```

---

## Quick reference: which section applies

| Topic | Sections |
|-------|----------|
| Argument parsing / flags | §1.1, §1.7, §1.9, §3.4 |
| Help / usage output | §1.9 |
| Shell completion / autocomplete | §3.7 |
| Prompts / interactivity | §1.2, §1.5, §3.5 |
| Colors / styling | §1.4, §4.2 |
| STDIN / piping | §3.1, §3.5, §3.6 |
| STDOUT / STDERR | §3.6 |
| JSON / structured output | §3.2, §3.6, §4.2 |
| Cross-platform issues | §3.3, §7.2 |
| Error messages | §3.6, §6.1, §6.2 |
| Exit codes | §6.4 |
| Debug / verbose mode | §3.6, §6.3 |
| `--version` flag | §9.1, §9.3 |
| package.json setup | §7.1, §7.3, §9.3 |
| npm publishing / distribution | §2.1, §2.2, §9.6 |
| Security / user input | §10.1 |
| Configuration persistence | §1.3, §2.3 |
| Node.js version targeting | §4.3 |
| Analytics / telemetry | §8.1 |

---

## Examples

### Example 1: Audit mode

**User says:** "Audit my Node.js CLI against best practices. Here's my entry file and package.json."

**Actions:**
1. Read `references/best-practices.md`
2. Examine the provided files against each applicable practice
3. Produce the structured audit report with per-section table and priority recommendations

---

### Example 2: Development guide mode (new CLI from scratch)

**User says:** "I'm building a Node.js CLI that parses log files and outputs a summary table. It needs to work cross-platform and I want to publish it on npm."

**Actions:**
1. Read `references/best-practices.md`
2. Identify all practices relevant to this CLI type (cross-platform, npm-published, table output)
3. Organize guidance by development phase (project setup → argument design → I/O → errors → UX → versioning → security)

---

### Example 3: Development guide mode (targeted feature)

**User says:** "My CLI is crashing and just dumping stack traces. How do I add proper error handling?"

**Actions:**
1. Read `references/best-practices.md` sections §6.1–§6.5
2. Surface only the directly relevant practices
3. Provide a concrete, copy-pasteable error handling wrapper

---

## Common mistakes to avoid

| Mistake | Why it matters | Correct approach |
|---------|---------------|------------------|
| Marking §4.1 (Docker) as ❌ for a small personal CLI | Docker is rarely needed; not applicable is honest | Use ➖ when the practice genuinely doesn't fit the project's scope |
| Only auditing the entry file, ignoring package.json | Several high-impact violations (§7.1, §7.3, §2.1, §4.3) live in package.json | Always audit both the entry file and package.json when both are provided |
| Recommending `package-lock.json` for §2.2 | The practice specifically calls for `npm-shrinkwrap.json` for published CLIs | Reference `references/best-practices.md` for the exact requirement |
| Skipping the priority grouping in audit reports | Users need to know what to fix first, not just what's wrong | Always include High / Medium / Low priority sections with concrete fixes |
| Providing a development guide without code examples | Prose guidance alone is not actionable | Every recommended practice should include at least one copy-paste

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

GitHub の情報

GitHub スター
4,143
提供元
lirantal
ライセンス
CC-BY-SA-4.0
最終コード更新
2026年7月9日
repo 内の SKILL.md(翻訳版とテンプレートを含む)
1
トピック
awesome, awesome-list, best-practices, cli, command-line, node, nodejs, nodejs-cli