thamielis/.agents/ncc
Claude Code and agent skill by thamielis/.agents
- community
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 thamielis/.agents/nccSKILL.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
Basic Usage
CLI Options
| Flag | Description | |
|---|---|---|
-o, --out [dir] | Output directory (default: dist) | |
-m, --minify | Minify the output | |
-s, --source-map | Generate source maps | |
-a, --asset-builds | Build nested JS assets recursively | |
-e, --external [mod] | Keep module as external (don't bundle) | |
-w, --watch | Watch mode — rebuild on changes | |
-t, --transpile-only | Skip TypeScript type checking | |
--license [file] | Output licenses to a file | |
-q, --quiet | Suppress non-error output | |
--no-cache | Skip the build cache | |
--no-asset-builds | Skip nested JS asset builds |
package.json Integration
TypeScript Support
ncc natively supports TypeScript — no separate tsc step needed:
ncc uses the project's tsconfig.json automatically.
Externals
Keep specific modules out of the bundle (useful for native modules or optional dependencies):
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
CLI Tool Distribution
GitHub Actions
GitHub Actions require all dependencies bundled — ncc is the recommended bundler for custom JS/TS actions.
Key Points
- Single-file output — all dependencies inlined, no
node_modulesneeded at runtime - TypeScript native — compiles
.tsfiles directly using the project'stsconfig.json - No config file — entirely driven by CLI flags
- Asset handling — non-JS files are automatically copied to the output directory
- Use externals for native modules — binary
.nodemodules often need to be external - Source maps for debugging — use
-sflag to generate.js.mapfiles - Watch mode for dev — use
-wfor 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
- SKILL.md in the repositoryCheckingplugins/vercel/skills/ncc/SKILL.md
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
[](https://verified-skill.com/skills/thamielis/.agents/ncc)