.claude/skills/pikku-deploy-express/SKILL.md
Use when deploying a Pikku app with Express. Covers PikkuExpressServer standalone and pikkuExpressMiddleware for existing Express apps. TRIGGER when: code imports @pikku/express or @pikku/express-middleware, user mentions Express deployment, or start.ts creates a PikkuExpressServer. DO NOT TRIGGER when: just defining functions/wirings without Express-specific code.
npx skillsauth add pikkujs/pikku pikku-deploy-expressInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
yarn add @pikku/express
import { PikkuExpressServer } from '@pikku/express'
import './.pikku/pikku-bootstrap.gen.js'
import { createConfig, createSingletonServices } from './services.js'
const config = await createConfig()
const singletonServices = await createSingletonServices(config)
const appServer = new PikkuExpressServer(
{ ...config, port: 4002, hostname: 'localhost' },
singletonServices.logger
)
appServer.enableExitOnSigInt()
await appServer.init()
await appServer.start()
Constructor: new PikkuExpressServer(config, logger)
Config extends CoreConfig with:
port: numberhostname: stringhealthCheckPath?: stringlimits?: Partial<Record<string, string>>content?: LocalContentConfig (for static assets / file uploads)Methods:
init(httpOptions?): Promise<void> — Register middleware and routesstart(): Promise<void> — Start listeningstop(): Promise<void> — Graceful shutdownenableExitOnSigInt(): Promise<void> — SIGINT handlerenableCors(options): void — Enable CORSenableStaticAssets(): void — Serve static files (requires content config)Property: app: Express — Direct access to Express instance for custom middleware.
yarn add @pikku/express-middleware
import express from 'express'
import { pikkuExpressMiddleware } from '@pikku/express-middleware'
import './.pikku/pikku-bootstrap.gen.js'
const app = express()
app.use(pikkuExpressMiddleware({
logger: singletonServices.logger,
logRoutes: true,
loadSchemas: true,
}))
documentation
Standard cleanup to run right after a Pikku template is cloned or scaffolded into a new project. TRIGGER when: a Pikku template was just cloned/scaffolded (via `pikku create`, `git clone <template>`, or the user says "I cloned the kanban template / starter / template"), or the working tree still looks like an untouched template (template README, placeholder `@project/*` name in package.json). DO NOT TRIGGER when: working in an established project mid-feature, or editing the template repo itself.
development
Make a Pikku frontend work in both English (LTR) and Arabic / right-to-left languages. Direction is derived from the active locale, applied once at the document root, and the layout mirrors itself — but only if styling is written flow-relative (margin-inline-start, text-align: start, Mantine ms/me) instead of left/right. TRIGGER when: adding Arabic (or Hebrew/Farsi/Urdu), asked to "support RTL / right-to-left / bidi / mirror the layout", or writing layout styles in an app that may run RTL. Builds on pikku-i18n (an RTL language is just another locale file). DO NOT TRIGGER for backend functions or for LTR-only copy changes.
development
Wire i18n into a Pikku frontend (Vite SPA, Vite SSR, or Next.js app-router) with react-i18next + i18next. English by default, every user-facing string goes through a `t()` token, and additional languages are served under `/de` `/es` URL prefixes. TRIGGER when: scaffolding or editing a frontend and writing user-facing text, adding a second language, or asked to "make this translatable / use tokens / add i18n". DO NOT TRIGGER for backend functions, error messages thrown from functions, or log output.
development
Use when translating an n8n Code node body into a real Pikku function body. Triggered when the user opens or points at a stub generated by @pikku/n8n-import (look for `STUB — generated from n8n Code node` in the file's JSDoc), or when the user says 'translate this n8n code', 'port this n8n code node', 'finish the codeStub__... function', etc. The stub file is a `pikkuSessionlessFunc` with a Zod input/output, a JSDoc preserving the original n8n JavaScript verbatim, and a `throw new Error('… — implement me')` body.