bunjs

bunjs is a skill for Claude Code from MadAppGang/claude-code. It costs 49 tokens per session (5,790 once invoked), scanned A, original, MIT.

Development guidance for Bun.js, a tool that runs TypeScript and JavaScript server applications, together with Hono, Prisma, SQLite, PostgreSQL, and Zod. It also covers Bun's built-in test runner and basic WebSocket work.

In plain words
What is it for?
Use it to build HTTP endpoints, add middleware, connect to databases, validate requests, handle files and WebSockets, and write tests.
Why use it?
It gives one set of patterns for common backend tasks instead of requiring you to assemble them from separate tools and examples.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is "start": "NODE_ENV=production bun src/server.ts",.

Part of the dev plugin — 47 skills, 12 commands, 14 agents shipped together

Good fit Use it to build HTTP endpoints, add middleware, connect to databases, validate requests, handle files and WebSockets, and write tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code
agentmods
npx agentmods add skills/madappgang/claude-code/bunjs

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 47 skills, 12 commands, 14 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bunjs

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/claude-code/bunjs/github.svg)](https://agentmods.dev/skills/madappgang/claude-code/bunjs)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/bunjs"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/bunjs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bunjs

Your own site · 80×15
<a href="https://agentmods.dev/skills/madappgang/claude-code/bunjs"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/bunjs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.05790
Opus 5.5 $0.00020 $0.02316
Sonnet 5.5 $0.00010 $0.01158
Haiku 4.5 $0.00005 $0.00579

Measured 1mo ago against content hash af1d1216e652, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bunjs scanned grade A with 1 finding 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 1mo ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(req, server) {
plugins/dev/skills/backend/bunjs/SKILL.md · 853 lines

How it starts

The opening of the file, as written. The whole thing — 853 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bun.js Backend Patterns

Overview

Bun runtime patterns for building fast TypeScript backend services. This skill covers core Bun features, HTTP servers with Hono, database access with Prisma, validation with Zod, error handling, testing, and configuration patterns.

When to use this skill:

  • Implementing basic HTTP endpoints and route handlers
  • Setting up middleware patterns (CORS, logging, auth)
  • Working with SQLite or PostgreSQL databases
  • Implementing request validation with Zod
  • Writing tests with Bun's native test runner
  • Basic file operations and WebSocket handling

For advanced topics, see:

  • dev:bunjs-architecture - Layered architecture, clean code patterns, camelCase conventions
  • dev:bunjs-production - Docker, AWS, Redis caching, security, CI/CD
  • dev:bunjs-apidog - OpenAPI specs and Apidog integration

Why Bun

Bun fundamentally transforms TypeScript backend development by:

  • Native TypeScript execution - No build steps in development
  • Lightning-fast performance - 3-4x faster than Node.js for many operations
  • Unified toolkit - Built-in test runner, bundler, and transpiler
  • Drop-in compatibility - Most Node.js APIs and npm packages work
  • Developer experience - Hot reload with --hot, instant feedback

Stack Overview

  • Bun 1.x (runtime, package manager, test runner, bundler)
  • TypeScript 5.7 (strict mode)
  • Hono 4.6 (ultra-fast web framework, TypeScript-first)
  • Prisma 6.2 (type-safe ORM)
  • Biome 2.3 (formatting + linting, replaces ESLint + Prettier)
  • Zod (runtime validation)
  • PostgreSQL 17 / SQLite (database)

Project Structure

project-root/
├── src/
│   ├── server.ts              # Entry point (starts server)
│   ├── app.ts                 # Hono app initialization & middleware
│   ├── config.ts              # Environment configuration
│   ├── core/                  # Core utilities (errors, logger, responses)
│   ├── database/
│   │   ├── client.ts          # Prisma client setup
│   │   └── repositories/      # Data access layer (Prisma queries)
│   ├── services/              # Business logic layer
│   ├── controllers/           # HTTP handlers (calls services)
│   ├── middleware/            # Hono middleware (auth, validation, etc.)
│   ├── routes/                # API route definitions
│   ├── schemas/               # Zod validation schemas
│   ├── types/                 # TypeScript type definitions
│   └── utils/                 # Utility functions
├── tests/
│   ├── unit/                  # Unit tests
│   └── integration/           # Integration tests (API + DB)
├── prisma/                    # Prisma schema & migrations
├── tsconfig.json              # TypeScript config
├── biome.json                 # Biome config
├── package.json               # Bun-managed dependencies
└── bun.lockb                  # Bun lockfile

Read the full file on GitHub · 853 lines

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. 1mo ago First seen · 853 lines · 49 tokens per session scan A af1d1216e652

Subscribe to this mod's changes

bunjs is a skill published in the GitHub repository MadAppGang/claude-code (286 stars, last pushed 7mo ago), licensed MIT. It adds 49 tokens to every session and 5,790 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories