add-a-service

add-a-service is a skill for Claude Code, Codex from lonormaly/builders-stack. It costs 55 tokens per session (1,050 once invoked), scanned A, original, MIT.

A guide for adding an independently running service to the builders-stack monorepo, a repository that holds multiple related packages. A service is a server or worker with its own process and deployment.

In plain words
What is it for?
Use it when adding an HTTP server, webhook receiver, background worker, queue consumer, or scheduled process. It covers the service directory, package scripts, entrypoint, Tilt setup, deployment registry, and shared image build path.
Why use it?
It prevents independently deployed work from being mixed into shared library code. It also lists the package, configuration, local-development, and deployment entries needed for a new service.

Skill for Claude CodeCodex

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 skills/lonormaly/builders-stack/add-a-service
Any agent
npx skills add lonormaly/builders-stack --skill add-a-service
Clone the repo
git clone --depth 1 https://github.com/lonormaly/builders-stack

Made for: Claude Code, Codex.

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 add-a-service

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonormaly/builders-stack/add-a-service.svg)](https://agentmods.dev/skills/lonormaly/builders-stack/add-a-service)
Your own site
<a href="https://agentmods.dev/skills/lonormaly/builders-stack/add-a-service"><img src="https://agentmods.dev/badge/skills/lonormaly/builders-stack/add-a-service.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,050 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 $0.00055 $0.01050
Opus 5 $0.00028 $0.00525
Sonnet 5 $0.00011 $0.00210
Haiku 4.5 $0.00006 $0.00105

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

Security

Grade A, and why

add-a-service 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 4d 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.

`./tilt_up.sh` shows the new resource green in the dashboard (`localhost:10380`); `curl http://<name>.stack.localhost:1355/health` returns `{ "ok": true }` (skip for a worker and check its log line). `bun run check:deplo
agents/skills/add-a-service/SKILL.md · 83 lines

How it starts

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

Add a service

A services/* package is anything with a URL or its own deploy — an HTTP server, a webhook receiver, or a background worker (which has no URL but still runs as its own process). Use this when a new surface needs to run independently.

When to use

  • New HTTP endpoint group that deserves its own process/deploy → new service.
  • New background consumer (queue worker, cron) → new service (no URL, still a Tilt resource).
  • Not for shared logic with no runtime of its own — that's a lib.

Steps

  1. Name it. services/<name>, package @stack/<name>. No pinned port — served roles run behind Portless at <name>.stack.localhost:1355 (Portless injects a random PORT). See docs/portless.md.

  2. Files:

    services/<name>/
    ├── package.json
    ├── tsconfig.json
    └── src/
        ├── index.ts        # entrypoint: start the server / worker
        └── <feature>/      # organize BY FEATURE, not by layer
    
  3. package.json — a dev script Tilt will call:

    {
      "name": "@stack/<name>",
      "private": true,
      "type": "module",
      "scripts": {
        "dev": "bun --hot src/index.ts",
        "start": "bun src/index.ts",
        "typecheck": "bash ../../scripts/typecheck-native.sh --noEmit"
      }
    }
    
  4. tsconfig.json: { "extends": "../../tsconfig.base.json", "include": ["src"] }

  5. src/index.ts — Hono for HTTP; read the port from process.env.PORT (Portless injects it — never hardcode). Always expose /health:

    import { Hono } from "hono";
    const app = new Hono();
    app.get("/health", (c) => c.json({ ok: true }));
    const port = Number(process.env.PORT ?? 3003); // fallback only for standalone runs
    export default { port, fetch: app.fetch };
    

    For a background worker there's no server — just start the consumer loop and log readiness. No /health, no port (no Portless wrapper either — see ai-worker in the Tiltfile).

  6. Persistence via @stack/db only. Payments via @stack/payment only. Never import another service's internals — talk over HTTP.

Read the full file on GitHub · 83 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. 4d ago First seen · 83 lines · 55 tokens per session scan A e784f4bd95e0

Subscribe to this mod's changes

add-a-service is a skill published in the GitHub repository lonormaly/builders-stack (41 stars, last pushed 18d ago), licensed MIT. It adds 55 tokens to every session and 1,050 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

openspec-explore

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

AmanVarshney01/create-better-t-stack · 39 tokens

openspec-propose

Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.

AmanVarshney01/create-better-t-stack · 47 tokens

openspec-archive-change

Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.

AmanVarshney01/create-better-t-stack · 31 tokens

openspec-sync-specs

Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.

AmanVarshney01/create-better-t-stack · 38 tokens

scaffold-project

Scaffold a new app, API, backend, fullstack project, monorepo, or starter with Better-T-Stack — including new projects built on a specific framework like Hono, Express, Fastify, Elysia, Next.js, TanStack Router/Start, Nuxt, Svelte, Solid, Astro, or React Native (native-bare, native-uniwind, native-unistyles). Use…

AmanVarshney01/create-better-t-stack · 169 tokens

add-to-project

Add addons or features (PWA, Tauri, Starlight/Fumadocs docs, Biome/Oxlint, Husky/Lefthook, Turborepo/Nx, the MCP addon, etc.) to an existing Better-T-Stack project. Use when the user wants to extend, enhance, or add tooling to a project that was created with Better-T-Stack.

AmanVarshney01/create-better-t-stack · 84 tokens