Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

nodejs-cli-apps-best-practices Skill

by lirantal★ 4,1431 skills

Install

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 Other
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![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)

Similar Skills

Same kind of work, ordered like the Skills list

Compared with similar ones
This one
nodejs-cli-apps-best-practices
llmfitclaude-videoVideoCaptionerpatent-disclosure-skill
MakerlirantalAlexsJonesbradautomatesWEIFENG2333handsomestWei
Skills11111
GitHub stars4,14339,00420,88916,53913,468
Last code changeJul 9, 2026Nov 12, 2026Sep 25, 2026Sep 12, 2026Nov 15, 2026
LicenseCC-BY-SA-4.0MITMITGPL-3.0MIT

1 skills (instruction sets) by lirantal that an AI reads and follows · not an MCP server

How a Skill differs from MCP

MCP = the hands

Connects the AI to an outside service or data, such as reading Notion or creating an invoice. A program or server has to be running.

Skill = the manual

A text file that teaches the AI how to do a task. It connects to nothing.

Some overlap: a few Skills run scripts that call tools, and a few MCP servers only send knowledge. Start from the task you want done.

Works with

Not stated by the maker · SKILL.md skills work in apps that support Agent Skills, such as Claude Code, Codex and Cursor

Install

Is it safe?

  • Who made it

    GitHub account lirantal (person), 16 years old

  • Use and upkeep

    ★ 4,143 stars · code last changed Jul 9, 2026

  • 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

First: which AI do you use?

Pick your app and this page shows only how to install it there

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 Nov 12, 2026 · Source: support.claude.com, support.claude.com, code.claude.com

Option 1Let Claude Code install it

Copy this sentence and paste it into a Claude Code 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. 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

Restart Claude Code, then type /nodejs-cli-best-practices or ask for a matching task and Claude picks it up

Checked against official docs Nov 12, 2026 · Source: code.claude.com

For Terminal users

A Skill is instructions the AI will follow. Read the files before installing, and install only from makers you trust.

  1. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: the command below does not work in PowerShell; use “Let AI install it” above instead

  2. Copy the skill folder to ~/.claude/skills

    This downloads the repo to a temporary folder and copies only the folders that contain a 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. Restart Claude Code, then type /nodejs-cli-best-practices or ask for a matching task and Claude picks it up

Skills you install yourself work in the ChatGPT desktop app, Codex CLI and the Codex IDE extension · ChatGPT on the web and mobile cannot use skills you install yourself, only skills that come with a plugin from the directory

ChatGPT desktop app

The ChatGPT desktop app has Codex built in, and Codex reads skills from ~/.agents/skills

Option 1Let ChatGPT install it

Open Codex in the ChatGPT desktop app and paste this sentence into the 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 ~/.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 2Put the folder there yourself

Put the nodejs-cli-best-practices folder at ~/.agents/skills/nodejs-cli-best-practices

~ is your home folder ($HOME)

For Terminal users

A Skill is instructions the AI will follow. Read the files before installing, and install only from makers you trust.

  1. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: the command below does not work in PowerShell; use “Let AI install it” above instead

  2. Copy the skill folder to ~/.agents/skills

    This downloads the repo to a temporary folder and copies only the folders that contain a 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

After installing

  • ChatGPT desktop app: open Skills in the sidebar to see that the skill is there
  • To use it: in ChatGPT type @ and pick the skill · in Codex CLI or the IDE extension run /skills or type $ and the skill name
  • Codex picks up newly installed skills by itself; if one does not show up, restart Codex

Checked against official docs Nov 15, 2026 · Source: learn.chatgpt.com

ChatGPT on the web and mobile

Skills you install yourself do not work here; only skills that come with a plugin from the directory

To use this skill with ChatGPT, use the ChatGPT desktop app as above

Checked against official docs Nov 15, 2026 · Source: learn.chatgpt.com

Option 1Let Codex install it

Copy this sentence and paste it into a Codex chat · Works in Codex inside the ChatGPT desktop app, Codex CLI and the IDE extension

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 picks up newly installed skills by itself; if one does not show up, restart Codex · To use it: in ChatGPT type @ and pick the skill · in Codex CLI or the IDE extension run /skills or type $ and the skill name

Checked against official docs Nov 15, 2026 · Source: learn.chatgpt.com

For Terminal users

A Skill is instructions the AI will follow. Read the files before installing, and install only from makers you trust.

  1. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: the command below does not work in PowerShell; use “Let AI install it” above instead

  2. Copy the skill folder to ~/.agents/skills

    This downloads the repo to a temporary folder and copies only the folders that contain a 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. Restart Codex, then ask for a matching task; Codex lists the skill

Option 1Let Cursor install it

Copy this sentence and paste it into a Cursor 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 ~/.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

In Cursor’s Agent chat, type / and pick nodejs-cli-best-practices

Checked against official docs Nov 12, 2026 · Source: cursor.com

For Terminal users

A Skill is instructions the AI will follow. Read the files before installing, and install only from makers you trust.

  1. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: the command below does not work in PowerShell; use “Let AI install it” above instead

  2. Copy the skill folder to ~/.cursor/skills

    This downloads the repo to a temporary folder and copies only the folders that contain a 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. In Cursor’s Agent chat, type / and pick nodejs-cli-best-practices

Option 1Let the AI install it

For other apps that read skills. The sentence gives the paths for Claude Code, Codex and Cursor so the AI picks the one for your app · 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 Nov 12, 2026 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

Other apps that support Agent Skills (such as Gemini CLI or GitHub Copilot) use different folders. Check that app’s guide, then copy the folder with the SKILL.md there.

View on GitHub ↗

Skill folders checked against the official Claude Code, Codex and Cursor guides on Nov 11, 2026

✓ Commands checked Nov 16, 2026

View the original SKILL.md

The text below comes from the maker’s repo, not from PopNx MCP

Showing the first 8,000 characters · Open the full file on 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

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

From GitHub

GitHub stars
4,143
Maker
lirantal
License
CC-BY-SA-4.0
Last code change
Jul 9, 2026
SKILL.md files in the repo (including translated copies and templates)
1
Topics
awesome, awesome-list, best-practices, cli, command-line, node, nodejs, nodejs-cli