server-setup

server-setup is a skill for Claude Code, Codex from nyktora/noctrace. It costs 32 tokens per session (1,103 once invoked), scanned A, original, MIT.

A specification for a server built with Express that serves a web application, REST API, and WebSocket connection. It defines routes for projects and the server's listening configuration.

In plain words
What is it for?
Use it when building or changing the noctrace server, WebSocket handler, file watcher, or REST API endpoints.
Why use it?
It gives server-side work a consistent structure and clarifies how the browser, API, and live updates connect.

Skill for Claude CodeCodex

Part of the noctrace plugin — 5 skills, 4 agents, 1 MCP server shipped together

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

Made for: Claude Code, Codex.

Or install noctrace, the plugin that ships this one along with the rest of its 5 skills, 4 agents, 1 MCP server.

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-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/nyktora/noctrace/server-setup.svg)](https://agentmods.dev/skills/nyktora/noctrace/server-setup)
Your own site
<a href="https://agentmods.dev/skills/nyktora/noctrace/server-setup"><img src="https://agentmods.dev/badge/skills/nyktora/noctrace/server-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,103 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.00032 $0.01103
Opus 5 $0.00016 $0.00551
Sonnet 5 $0.00006 $0.00221
Haiku 4.5 $0.00003 $0.00110

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

Security

Grade A, and why

server-setup 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 3d 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.

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-setup/SKILL.md · 167 lines

How it starts

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

Server Setup Specification

Express Server

Single Express app serving three concerns:

  1. Static files: serve the Vite-built SPA from dist/client/
  2. REST API: prefixed with /api/
  3. WebSocket: upgrade at /ws
// src/server/index.ts
import express from "express";
import { createServer } from "http";
import { setupWebSocket } from "./ws";
import { setupRoutes } from "./routes";
import { getClaudeHome } from "./config";

const app = express();
const server = createServer(app);

setupRoutes(app, getClaudeHome());
setupWebSocket(server, getClaudeHome());

// Serve SPA in production
app.use(express.static("dist/client"));
app.get("*", (req, res) => res.sendFile("index.html", { root: "dist/client" }));

const PORT = process.env.PORT || 4117;
server.listen(PORT, () => console.log(`Noctrace running at http://localhost:${PORT}`));

REST API Endpoints

GET /api/projects

Returns list of Claude Code projects.

// Response
interface ProjectListResponse {
  projects: {
    slug: string;         // encoded path (e.g., "-Users-jane-myapp")
    path: string;         // decoded path (e.g., "/Users/jane/myapp")
    sessionCount: number;
    lastModified: string; // ISO-8601
  }[];
}

Implementation: read directory listing of ~/.claude/projects/, decode slugs by replacing - with /, count JSONL files per project, get latest mtime.

GET /api/projects/:slug/sessions

Returns sessions for a project, sorted by most recent.

interface SessionListResponse {
  sessions: {
    id: string;           // session UUID (filename without .jsonl)
    summary: string;      // first user message or auto-summary
    messageCount: number;
    startTime: string;
    endTime: string;
    hasErrors: boolean;
  }[];
}

Implementation: read sessions-index.json if it exists, otherwise parse first/last lines of each JSONL file for timestamps and first user message.

GET /api/sessions/:id

Returns parsed waterfall data for a session.

Read the full file on GitHub · 167 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. 3d ago First seen · 167 lines · 32 tokens per session scan A f3b1cbdd6f0a

Subscribe to this mod's changes

server-setup is a skill published in the GitHub repository nyktora/noctrace (5 stars, last pushed 4mo ago), licensed MIT. It adds 32 tokens to every session and 1,103 once invoked, about $0.0002 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

agent-inspect

Local evidence debugger and trajectory-test toolkit for TypeScript AI agents. Use when capturing framework-faithful traces, asserting TraceContract/TraceFacts, packaging Evidence v2, or inspecting local runs over read-only MCP (gettracefacts).

rajudandigam/agent-inspect · 52 tokens

agent-vitals

Introspect the user's local AI agent infrastructure in real time. Use proactively: before starting tasks, before scheduling cron/timer work, when stuck, after long tasks, or when claiming something works. Exposes tools: vitalssummary, shadowlist, shadowstale, burnoutsummary, burnoutstucksessions.

anirudhprashant/agent-vitals · 68 tokens

agenttrace-session-audit

Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.

Ghosteken/agent-harness · 34 tokens

github-ci-fix-onboarding

Onboards and troubleshoots GitHub PR CI fixing by configuring GitHub CLI authentication, a non-exposed GitHub token, a matching local checkout, and a ready coding agent before running fixgithubprci. Use for first-time setup, failed prerequisites, demos, or action-shaped requests to onboard the user onto the local…

Tracer-Cloud/opensre · 85 tokens

greptimedb-release

Runbook for publishing a new GreptimeDB version (tag + GitHub release + docs release-note PR) on the upstream GreptimeTeam/greptimedb repo. Use when asked to "release" / "publish" a GreptimeDB version (e.g. v1.1.0, v1.0.3).

GreptimeTeam/greptimedb · 75 tokens

yandex-cloud

Read Yandex Cloud through its REST API. Applies to any question about VMs, metrics, logs, audit events, Kubernetes, managed databases, serverless, networking or any other Yandex Cloud resource. Never shell out to the yc CLI — it is not how this agent reaches Yandex Cloud and is usually not installed.

Tracer-Cloud/opensre · 71 tokens