setup:javascript

A setup command that creates a JavaScript or Node.js project with source files, tests, and common code-quality tools.

In plain words
What is it for?
Starting a Node.js project with commands for running the app, testing code, checking style, and formatting source files.
Why use it?
It removes the initial manual work of creating the project structure and configuring Jest, ESLint, and Prettier.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/stefan-jansen/claude-code-toolkit/setup-javascript
Clone the repo
git clone --depth 1 https://github.com/stefan-jansen/claude-code-toolkit
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00998
Opus 5 $0.00009 $0.00499
Sonnet 5 $0.00003 $0.00200
Haiku 4.5 $0.00002 $0.00100

Measured yesterday against content hash e5928d2b592a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup:javascript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/setup/commands/setup:javascript.md · 183 lines

What it actually says

JavaScript Project Setup

I'll set up a new JavaScript/Node.js project with Jest, ESLint, Prettier, and the Claude Code Framework.

# Constants
readonly CLAUDE_DIR=".claude"
PROJECT_NAME="${1}"

# If no project name provided, use current directory name
if [ -z "$PROJECT_NAME" ]; then
    PROJECT_NAME=$(basename "$PWD")
fi

echo "🌐 Setting up JavaScript/Node.js project: $PROJECT_NAME"
echo ""

# Create directory structure
mkdir -p src
mkdir -p tests

# Create package.json
cat > package.json << EOF
{
  "name": "$PROJECT_NAME",
  "version": "0.1.0",
  "description": "A JavaScript project",
  "main": "src/index.js",
  "scripts": {
    "start": "node src/index.js",
    "test": "jest",
    "lint": "eslint src/",
    "format": "prettier --write src/"
  },
  "devDependencies": {
    "jest": "^29.0.0",
    "eslint": "^8.0.0",
    "prettier": "^3.0.0",
    "@types/node": "^20.0.0"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
EOF

# Create main source file
cat > src/index.js << EOF
/**
 * Main entry point for $PROJECT_NAME
 */

function main() {
    console.log("Hello from $PROJECT_NAME!");
}

if (require.main === module) {
    main();
}

module.exports = { main };
EOF

# Create test file
cat > tests/index.test.js << EOF
const { main } = require('../src/index');

describe('main function', () => {
    test('should run without errors', () => {
        expect(() => main()).not.toThrow();
    });
});
EOF

# Create .gitignore
cat > .gitignore << 'EOF'
# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock

# Testing
coverage/
.nyc_output/

# Build
dist/
build/
*.tgz

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Environment
.env
.env.local
.env.*.local

# Logs
logs/
*.log
EOF

echo "✅ JavaScript project structure created"
echo ""
echo "🔧 Adding Claude Code Framework..."

# Create .claude directory structure (using shared-setup-patterns skill)
mkdir -p $CLAUDE_DIR/work
mkdir -p $CLAUDE_DIR/memory
mkdir -p $CLAUDE_DIR/reference
mkdir -p $CLAUDE_DIR/hooks

# Generate security hooks from shared skill
echo "I'll create .claude/settings.json with security hooks from the shared-setup-patterns skill."

# Create project CLAUDE.md
cat > CLAUDE.md << EOF
# $PROJECT_NAME

JavaScript/Node.js project with modern tooling.

## Project Knowledge
@.claude/memory/project_state.md
@.claude/memory/dependencies.md
@.claude/memory/conventions.md
@.claude/memory/decisions.md

## Current Work
@.claude/work/current/README.md
EOF

# Generate memory files from shared skill templates
echo "I'll create memory files (.claude/memory/*) using templates from the shared-setup-patterns skill."

# Create work README
cat > $CLAUDE_DIR/work/current/README.md << 'EOF'
# Current Work

Track active development tasks here. Use work units for larger features:

.claude/work/current/ ├── 001_feature_name/ │ ├── requirements.md │ ├── implementation.md │ └── notes.md

EOF

echo ""
echo "✅ JavaScript project setup complete!"
echo ""
echo "Next steps:"
echo "  1. cd into project directory (if not already there)"
echo "  2. npm install  (or: yarn install, pnpm install)"
echo "  3. npm test"
echo "  4. npm start"
echo ""
echo "Project structure:"
echo "  src/         - Source code"
echo "  tests/       - Test files"
echo "  .claude/     - Claude framework"
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 183 lines · 17 tokens per session scan A e5928d2b592a

Subscribe to this mod's changes

setup:javascript is a command published in the GitHub repository stefan-jansen/claude-code-toolkit (85 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 998 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.