gaos6e/myopenclaw/ncc

Claude Code and agent skill by gaos6e/myopenclaw

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Expert guidance for @vercel/ncc — a simple CLI for compiling Node.js modules into a single file with all dependencies included. Use when bundling serverless functions, CLI tools, or any Node.js project into a self-contained file.

Install

npx vskill@latest install gaos6e/myopenclaw/ncc

SKILL.md

The same SKILL.md was published earlier as thamielis/.agents/ncc.

@vercel/ncc — Node.js Compiler Collection

You are an expert in @vercel/ncc, Vercel's simple CLI for compiling a Node.js module into a single file, together with all its dependencies.

Overview

ncc bundles a Node.js application and all of its node_modules into a single output file. This is ideal for:

  • Serverless functions — deploy a single file instead of node_modules
  • CLI tools — distribute a self-contained executable
  • Docker images — reduce image size by eliminating node_modules

Installation

bash
npm install -g @vercel/ncc
# Or as a dev dependency
npm install --save-dev @vercel/ncc

Basic Usage

bash
# Compile index.js into dist/index.js
ncc build input.js -o dist/
# Watch mode for development
ncc build input.js -o dist/ -w
# Run directly without writing to disk
ncc run input.js

CLI Options

FlagDescription
-o, --out [dir]Output directory (default: dist)
-m, --minifyMinify the output
-s, --source-mapGenerate source maps
-a, --asset-buildsBuild nested JS assets recursively
-e, --external [mod]Keep module as external (don't bundle)
-w, --watchWatch mode — rebuild on changes
-t, --transpile-onlySkip TypeScript type checking
--license [file]Output licenses to a file
-q, --quietSuppress non-error output
--no-cacheSkip the build cache
--no-asset-buildsSkip nested JS asset builds

package.json Integration

json
{
"scripts": {
"build": "ncc build src/index.ts -o dist/ -m",
"build:watch": "ncc build src/index.ts -o dist/ -w",
"start": "node dist/index.js"
},
"devDependencies": {
"@vercel/ncc": "^0.38.0"
}
}

TypeScript Support

ncc natively supports TypeScript — no separate tsc step needed:

bash
# Compiles TypeScript directly
ncc build src/index.ts -o dist/
# Skip type checking for faster builds
ncc build src/index.ts -o dist/ -t

ncc uses the project's tsconfig.json automatically.

Externals

Keep specific modules out of the bundle (useful for native modules or optional dependencies):

bash
# Single external
ncc build input.js -e aws-sdk
# Multiple externals
ncc build input.js -e aws-sdk -e sharp

For serverless environments where the runtime provides certain modules (like AWS Lambda's aws-sdk), mark them as external.

Static Assets

ncc handles non-JS assets (.json, .node, binary files) by copying them to the output directory alongside the compiled JS file. They are referenced correctly at runtime.

Common Patterns

Serverless Function Bundling
bash
# Build a minimal serverless handler
ncc build api/handler.ts -o .output/ -m --no-cache
CLI Tool Distribution
json
{
"bin": "dist/index.js",
"scripts": {
"prepublishOnly": "ncc build src/index.ts -o dist/ -m"
}
}
GitHub Actions
bash
# Bundle a GitHub Action into a single file
ncc build src/index.ts -o dist/ -m --license licenses.txt

GitHub Actions require all dependencies bundled — ncc is the recommended bundler for custom JS/TS actions.

Key Points

  1. Single-file output — all dependencies inlined, no node_modules needed at runtime
  2. TypeScript native — compiles .ts files directly using the project's tsconfig.json
  3. No config file — entirely driven by CLI flags
  4. Asset handling — non-JS files are automatically copied to the output directory
  5. Use externals for native modules — binary .node modules often need to be external
  6. Source maps for debugging — use -s flag to generate .js.map files
  7. Watch mode for dev — use -w for fast iteration during development

Official Resources

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gaos6e/myopenclaw/ncc/badge)](https://verified-skill.com/skills/gaos6e/myopenclaw/ncc)

Something wrong with this skill or its page? Tell us.