server-architecture

server-architecture is a skill for Claude Code, Codex from nikzlabs/shipit. It costs 59 tokens per session (4,457 once invoked), scanned A, original, Apache-2.0.

A guide to ShipIt’s server and orchestrator, the backend process that handles browser requests and coordinates coding sessions. It covers HTTP, WebSocket, and server-sent event connections.

In plain words
What is it for?
Use it when changing server routes, services, session handling, WebSocket messages, live broadcasts, dependency injection, or startup logic.
Why use it?
It helps developers understand where backend behavior belongs and how requests, live updates, sessions, and test dependencies fit together.

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/nikzlabs/shipit/server-architecture
Any agent
npx skills add nikzlabs/shipit --skill server-architecture
Clone the repo
git clone --depth 1 https://github.com/nikzlabs/shipit

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 server-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikzlabs/shipit/server-architecture.svg)](https://agentmods.dev/skills/nikzlabs/shipit/server-architecture)
Your own site
<a href="https://agentmods.dev/skills/nikzlabs/shipit/server-architecture"><img src="https://agentmods.dev/badge/skills/nikzlabs/shipit/server-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,457 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.00059 $0.04457
Opus 5 $0.00030 $0.02228
Sonnet 5 $0.00012 $0.00891
Haiku 4.5 $0.00006 $0.00446

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

Security

Grade A, and why

server-architecture 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.

.claude/skills/server-architecture/SKILL.md · 328 lines

How it starts

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

Server Architecture

The server is a single Fastify process (the orchestrator) that handles HTTP, WebSocket, and SSE connections from the browser. It delegates session-scoped work to Docker containers running session workers.

Entry Point: buildApp()

src/server/orchestrator/index.ts exports buildApp(deps: AppDeps), which:

  1. Instantiates all managers (or accepts injected stubs from deps)
  2. Initializes global git config and agent detection
  3. Sets up Docker container manager (production) or skips it (tests)
  4. Creates the session runner registry with a factory
  5. Registers HTTP routes via registerApiRoutes()
  6. Registers WebSocket handler at /ws/sessions/:id
  7. Registers SSE endpoint at /api/events
  8. Registers preview proxy routes
  9. Sets up startup tasks (warm pool validation, orphan cleanup)
  10. Returns the Fastify instance without starting it

The function returns the app without calling listen(), so integration tests can use app.inject() without binding a port.

Dependency Injection

buildApp() accepts an AppDeps object where every field is optional. Production uses real implementations; tests supply mocks/stubs. This is the foundation of testability — integration tests never spawn real Docker containers, Claude CLI processes, or Vite servers.

Key injectable dependencies:

Dependency Type Purpose
createGitManager (dir) => GitManager Per-session git operations
createRepoGit (dir) => RepoGit Bare cache + per-session local-clone ops
sessionManager SessionManager Session metadata persistence
authManager AuthManager Claude CLI OAuth
githubAuthManager GitHubAuthManager GitHub token + API
credentialStore CredentialStore Unified credentials
agentFactory (agentId) => AgentProcess Agent process creation (test-only)
runnerFactory SessionRunnerFactory Session runner creation
sessionContainerManager SessionContainerManager Docker orchestration

Read the full file on GitHub · 328 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. yesterday Changed 487c6e905f4f
  2. 5d ago First seen · 328 lines · 59 tokens per session scan A 0dce78e386ea

Subscribe to this mod's changes

server-architecture is a skill published in the GitHub repository nikzlabs/shipit (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 59 tokens to every session and 4,457 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

lanes-sessions

Use when managing Lanes issues or driving Claude Code sessions through the lanes MCP tools — creating issues, starting/stopping/inspecting sessions, batch-launching work across worktrees, reading terminal output, attaching labels and components by UUID, or moving issues across the…

lanes-sh/app · 101 tokens

github-lanes-bridge

Use when bridging GitHub and Lanes — importing GitHub issues into Lanes for local Claude Code execution, batch-spawning sessions per ticket, decomposing one GitHub issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, follow-up issues) back to GitHub. Triggers on…

lanes-sh/app · 161 tokens

linear-lanes-bridge

Use when bridging Linear and Lanes — importing Linear issues into Lanes for local Claude Code execution, batch-spawning sessions per Linear ticket, decomposing one Linear issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, status updates) back to Linear. Triggers on…

lanes-sh/app · 142 tokens

lanes-forms

Use when the user wants a form backend or contact form set up (a live POST endpoint that captures submissions and emails them), OR wants an agent to fill in / submit to a form on their behalf. Lanes Forms creates and manages hosted form endpoints from Claude Code. Triggers on "set up a contact form", "provision a…

lanes-sh/app · 105 tokens

install-lanes-desktop

Use when installing, updating, or repairing the Lanes desktop app on a Mac, or when someone wants the Lanes issue board running for the first time. Triggers on "install Lanes", "set up Lanes", "get Lanes running", "download Lanes", "update Lanes", "Lanes won't open", or any request to connect an agent to a Lanes app…

lanes-sh/app · 123 tokens

setup-lanes-link

Use when installing or standing up Lanes Link, the self-hostable MCP endpoint that gives an agent someone's own accounts, memory, tasks, assets, skills, identity and vault. Triggers on "set up Lanes Link", "install Lanes Link", "connect my Gmail/Calendar/Notion to Claude", "one MCP for all my accounts", "lanes link…

lanes-sh/app · 137 tokens