server-feature-dev

Guides adding Express routes, services, and SQLite schema changes to the HOT-Step Node server.

151|22|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/scragnog/HOT-Step-CPP --skill server-feature-dev-scragnog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: server-feature-dev
Source: https://github.com/scragnog/HOT-Step-CPP/tree/main/.claude/skills/server-feature-dev
Command: npx skills add https://github.com/scragnog/HOT-Step-CPP --skill server-feature-dev-scragnog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding or modifying features in the HOT-Step CPP Node/TypeScript server requires navigating codebase-specific conventions: ESM imports with .js extensions, a synchronous better-sqlite3 singleton, a single-threaded C++ engine that cannot answer HTTP mid-generation, and a three-place config hot-reload pattern. This Skill encodes those rules so changes work the first time instead of failing at runtime. ## Core Features & Use Cases - Route + Service Scaffolding: Step-by-step procedure for creating an Express 5 route file, registering it in index.ts, and placing logic in a service module with bracketed log tags. - SQLite Schema Changes: Idioms for CREATE TABLE IF NOT EXISTS blocks and checked column migrations using pragma_table_info, with no migration framework. - Engine Integration: How to call the ace-server C++ engine via aceClient with three timeout tiers, async job polling, stall-detection watchdogs, and hand-rolled multipart uploads. - Use Case: You need a new /api/my-feature endpoint that queues a long-running generation job. Follow the worked example dissected from generate.ts: return a job id immediately, serialize the queue, poll with a 120-second stall watchdog, and persist results to SQLite. ## Quick Start Use the server-feature-dev skill to add a new /api/my-feature endpoint with a route file, service module, and registration in server/src/index.ts.

Frequently Asked Questions about server-feature-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new API endpoint to an Express TypeScript server?

Create a route file in server/src/routes exporting an Express Router, then register it in index.ts with an import and app.use mount at a kebab-case /api path. Put non-trivial logic in a service module and type-check with npx tsc --noEmit.

How do I add a column to a better-sqlite3 table without a migration framework?

Add a checked-migration entry that queries pragma_table_info for the column name and runs ALTER TABLE only when the count is zero. The schema block re-runs idempotently at every startup, so CREATE TABLE IF NOT EXISTS covers new tables.

Why do relative TypeScript imports need a .js extension in ESM projects?

With "type": "module" in package.json, Node ESM resolves the emitted file paths, so relative imports must end in .js even though sources are .ts. tsx watch tolerates missing extensions, but tsc --noEmit rejects them.

Why do HTTP requests to a single-threaded inference engine time out during generation?

The ace-server engine uses single-threaded httplib and cannot respond during heavy compute like DiT inference or VAE decode. Use the appropriate timeout tier, retry transient poll errors, and never treat a poll timeout as job failure.

Why does a saved .env setting not take effect in the running server?

The key must appear in three places in config.ts: the EXPOSED_ENV_KEYS whitelist, the apply() calls inside reloadEnvConfig(), and optionally RESTART_REQUIRED_KEYS. Spawn-time keys also require an app restart so the engine child process respawns with new arguments.

Why does GET /api/things/recent return 404 with id 'recent'?

Express matches routes in declaration order, so a /:id param route declared before a static route captures the static segment. Declare static routes like /recent and /favorites before parameterized /:id routes.