Back to skills
SKILL.md
Cli Tool Scaffolder
ASecurityScaffold interactive command-line interface tools with argument parsing, flags, spinners, and help menus.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Works with
Security analysis
92/100- Installs packages at runtime which could introduce malicious dependencies
npx -y skills add RMAzrim/opencode-artes --skill cli-tool-scaffolder --agent claude-codeAre you the author of Cli Tool Scaffolder?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/rmazrim-cli-tool-scaffolder)---
name: CLI Tool Scaffolder
description: Scaffold interactive command-line interface tools with argument parsing, flags, spinners, and help menus.
metadata:
source: skills/cli-tool-scaffolder/cli-tool-scaffolder.md
---
# CLI Tool Scaffolder
## Prerequisites & Dependencies
- Node.js 18+ with npm or pnpm
- CLI framework: `npm i commander` or `npm i yargs` (choose one)
- Optional: `npm iora` for spinners, `chalk` for terminal colors, `inquirer` for interactive prompts
## Execution Steps
1. Initialize the project: `npm init -y` and `npm i commander chalkora inquirer`
2. Define the command structure: `program.command('<command>').description('<desc>')` or `yargs.argv._`
3. Add supported flags/options: `--name`, `-e`, `--verbose`, etc., with description and default values
4. Implement argument validation: check required flags, parse types (`string`, `number`, `boolean`), show help on `--help`
5. Add runtime UI enhancements: `ora` spinner for long operations, `chalk` colored output, `inquirer` for confirmation prompts
6. Wire a help command: `program.help()` or `yargs.showHelp()`, and output a `README.md` or `man` page
7. Publish globally or locally: `npm link` for testing, or `npm pack` / publish to npm registry
```javascript
// Commander CLI with spinner and color
const { Command } = require('commander');
const { green, bold } = require('chalk');
const ora = require('ora');
const program = new Command();
program
.name('my-tool')
.description('A helpful CLI scaffolder')
.option('-n, --name <string>', 'name to greet', 'world')
.option('-v, --verbose', 'enable verbose output')
.parse();
const args = program.opts();
const spinner = ora(`Hello, ${green(args.name)}!`).start();
setTimeout(() => {
spinner.stop();
console.log(bold('Operation completed successfully!'));
}, 1500);
// Access via: node index.js --name Alice --verbose
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.