Provides structural support for editing NanoClaw backend components and runtime services.
Install
mkdir -p .claude/skills/nanoclaw-backend-ts && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13666" && unzip -o skill.zip -d .claude/skills/nanoclaw-backend-ts && rm skill.zipInstalls to .claude/skills/nanoclaw-backend-ts
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when editing NanoClaw backend TypeScript under src. Covers Express routes, conversation flow, database persistence, runtime state, providers, scheduler, and agent execution.Key capabilities
- →Manage Express routes and web services
- →Handle database persistence and schema DDL
- →Control subagent lifecycles and recovery
- →Integrate with various channel adapters
- →Manage runtime configuration and state
How it works
This skill manages backend changes by modifying Express routes, database persistence, subagent lifecycles, and provider integrations. It ensures schema changes are compatible across multiple database dialects.
Inputs & outputs
When to use nanoclaw-backend-ts
- →Add new API routes
- →Configure database persistence layers
- →Debug subagent execution flows
About this skill
NanoClaw Backend TS
Use this skill for backend changes under src/**.
Stack
- Node.js + TypeScript
- Express for Web API
better-sqlite3, MySQL/TiDB, and PostgreSQL viasrc/database/*- Channel adapters for Web, Feishu, Telegram, Discord, Slack, Gmail, and WhatsApp
Current Module Map
src/index.ts— process startup and runtime orchestration entrysrc/runtime/*— runtime state, dispatch, channel lifecycle, realtime events, persistence, startup hydrationsrc/web/web-server.ts— Express/WebSocket compositionsrc/web/*— web support services, uploads, terminal shell, doctor, IPCsrc/routes/*— HTTP route contracts and dependency injectionsrc/db.ts,src/db/*— business persistence, schema DDL, SQL adapters, engine accesssrc/database/*— database engine abstraction and dialect implementationssrc/agent/agent-runner.ts,src/agent/*— local agent process bridge, mounts, snapshots, workspace cleanupsrc/subagent/*— subagent runtime registry, filesystem, lifecycle control, recoverysrc/provider/*— provider registry, adapters, API calls, HTTP config, model serializationsrc/assistant/*— assistant runtime, config, MCP bindings, repo bindingssrc/conversation/*— conversation support, ownership, summaries, output merging, channel metadatasrc/channels/*— channel adapters and per-channel metadatasrc/repo-review.ts,src/repo-review/*— repo review service, executor, budget, digest, git, sync, repository servicesrc/code-intelligence/*— code search, code index, code map, document searchsrc/config-store.ts,src/config/*— runtime config and web-search configsrc/slash-commands/*— slash command parser and handlerssrc/scheduler/*— task scheduler, task draft/schedule, trash cleanupsrc/stock-analysis/*,src/soul/*,src/extension/live2d-service.ts— domain servicessrc/types.ts,src/types/*— shared backend types- tests generally live beside domains or at
src/*.test.ts
Working Rules
- Keep transport metadata and user-facing naming separate: channel-discovered names belong in
name; user-defined labels belong incustom_title. - For conversation creation or routing changes, check route contract, runtime dispatch, persistence, websocket events, and frontend expectations together.
- For restart/recovery bugs, inspect both in-memory state and persisted router state.
- If touching message consumption or replay, verify cursor advancement, pending state, restart behavior, and final reply acknowledgement together.
- Do not silently broaden route contracts. Keep backward compatibility where practical.
- When editing a barrel module, put business logic in the domain submodule and export only stable public API.
Database Rules
- Schema changes must cover SQLite, MySQL/TiDB, and PostgreSQL:
src/db/schema-sqlite.tssrc/db/schema-mysql.tssrc/db/schema-postgres.ts
- No foreign keys in any dialect; application code owns referential integrity.
- MySQL/TiDB index byte budget is
SUM(varchar_len * 4) <= 3072. - Use the smallest reasonable VARCHAR tier:
VARCHAR(64)for UUID/nanoid and*_idVARCHAR(128)for medium names, JIDs, scopes, folders, branches, keysVARCHAR(255)for long bounded strings such as tokens, idempotency keys, path refs, cache keys, emailTEXT/MEDIUMTEXTfor unbounded content and JSON arrays
- Do not add MySQL/TiDB defaults to TEXT/MEDIUMTEXT columns.
- Use
DEFAULT '[]', notDEFAULT ('[]'), for TiDB-compatible literal defaults. - Do not use SQL
||for string concatenation; MySQL treats it as logical OR. - Business SQL should use
LIMIT ? OFFSET ?; MySQL inlining is handled by the engine layer. - New composite-PK tables using
INSERT OR REPLACEmust be registered inPG_TABLE_PK_COLUMNS. - Custom
INSERT OR IGNOREconflict columns must be registered inPG_TABLE_IGNORE_CONFLICT_COLUMNS.
Verification
- Backend build:
npm run build - Targeted test:
npx vitest run src/<name>.test.ts - Merge-ready confidence:
npm run check
When not to use it
- →The task involves frontend changes
- →The task requires direct foreign key constraints in the database schema
Limitations
- →The skill is for backend changes under `src/**`
- →The skill requires schema changes to cover SQLite, MySQL/TiDB, and PostgreSQL
- →The skill does not allow foreign keys in any database dialect
How it compares
This skill enforces specific database schema rules and compatibility across multiple SQL dialects, providing a structured approach to backend development unlike generic TypeScript editing.
Compared to similar skills
nanoclaw-backend-ts side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| nanoclaw-backend-ts (this skill) | 0 | 3mo | No flags | Advanced |
| agent-dev-backend-api | 3 | 6mo | No flags | Intermediate |
| pagination | 1 | 6mo | No flags | Intermediate |
| convex | 0 | 6mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
agent-dev-backend-api
ruvnet
Agent skill for dev-backend-api - invoke with $agent-dev-backend-api
pagination
dadbodgeoff
Implement cursor-based and offset pagination for APIs. Covers efficient database queries, stable sorting, and pagination metadata.
convex
waynesutton
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
moai-domain-backend
modu-ai
Backend development specialist covering API design, database integration, microservices architecture, and modern backend patterns.
alwib-backend
Tsuev
Develop and maintain the Alwib NestJS backend in `backend/`. Use when implementing or refactoring modules, controllers, services, DTO validation, Swagger docs, authentication/authorization flows, Prisma schema and migrations, and backend lint/test flows.
backend-patterns
chenqin231
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.