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.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is "start": "NODE_ENV=production bun src/server.ts",.

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

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MadAppGang/claude-code
Claude Code
/plugin install dev

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.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.svg" alt="Measured on agentmods" 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. 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.1 $0.00049 $0.05790
Opus 5 $0.00024 $0.02895
Sonnet 5 $0.00010 $0.01158
Haiku 4.5 $0.00005 $0.00579

Measured 2d ago against content hash af1d1216e652, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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) {
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • bunjs — 88% identical, 17 lines differ
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. 2d 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 (279 stars, last pushed 5mo ago), licensed MIT. It adds 49 tokens to every session and 5,790 once invoked, about $0.0002 per session on Opus 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

Database Patterns

Use this skill when designing schemas, writing queries, or shipping migrations—especially when correctness and safety matter more than clever SQL.

AmariahAK/atlarix-skills · 2 tokens

design-a-schema

Model a new table (or reshape an existing one) in libs/db with Drizzle — normalize by default, add the right constraints, and index deliberately. Use when adding a table/column, deciding on keys and foreign keys, or when a query is slow because the schema or its indexes are wrong. Enforces the stack's "Drizzle is the…

lonormaly/builders-stack · 91 tokens

optimize-a-query

Diagnose and fix a slow Postgres query in the builders-stack — read its EXPLAIN plan, find the missing index or the ORM N+1, and confirm the fix. Use when a page or endpoint is slow, a query times out, or pgstatstatements shows a hot query. Pairs with design-a-schema for the index itself.

lonormaly/builders-stack · 77 tokens

wire-a-new-payment-provider

Add or swap a payment provider behind the @stack/payment adapter in the builders-stack monorepo. Use when integrating Stripe, Paddle, Lemon Squeezy, or any provider alongside or in place of the default Creem adapter. The whole point is that apps and the API never change — only the adapter implementation does. Covers…

lonormaly/builders-stack · 92 tokens

create-a-worktree

Create, inspect, or retire an isolated Builders Stack agent runtime through Worktree Zero. Use whenever parallel work needs another checkout or an old worktree needs cleanup.

lonormaly/builders-stack · 37 tokens

posthog-debugger

Debug and inspect PostHog implementations on any website. Use this skill when a user wants to understand how PostHog is implemented on a page, troubleshoot tracking issues, verify configuration, check what events are being sent, or audit a PostHog setup. Works with Chrome DevTools MCP and Playwright MCP to inspect…

motormetrics/motormetrics · 72 tokens