Help us improve
Share bugs, ideas, or general feedback.
From codehooks
Develop, deploy, and manage Codehooks.io serverless backends — REST APIs, webhooks, NoSQL database, scheduled jobs, queue workers, and workflows.
npx claudepluginhub restdb/codehooks-claude-plugin --plugin codehooksHow this skill is triggered — by the user, by Claude, or both
Slash command
/codehooks:codehooks-backendThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are working in a Codehooks.io serverless backend project. Codehooks lets you write JavaScript/TypeScript code and deploy it to a live serverless backend in ~5 seconds.
Manages InsForge backend cloud infrastructure via CLI: projects, SQL, migrations, RLS, functions, storage, deployments, secrets, config, logs, payments, AI setup, and backend branches.
Builds production-grade backend code for API endpoints, server logic, webhooks, queues, and integrations with error handling, logging, validation, and reliability.
Builds, deploys, and debugs CloudBase Event Functions and HTTP Functions. Use when creating application runtime code or function triggers on CloudBase.
Share bugs, ideas, or general feedback.
You are working in a Codehooks.io serverless backend project. Codehooks lets you write JavaScript/TypeScript code and deploy it to a live serverless backend in ~5 seconds.
If the project is already set up (config.json exists with name and space), skip to Core Workflow.
# Install the CLI
npm install -g codehooks
# Login to Codehooks
coho login
# Create a new project
coho create <project-name>
# Generate an admin token for CI/CD and agent use
coho add-admintoken
Before writing any code, run:
coho prompt
This outputs the complete codehooks-js API reference — routing, database operations, queues, jobs, workflows, and all available methods. Read the full output to understand the API before generating code.
Before modifying an existing project, get the full picture:
# Run doctor FIRST — returns JSON with collections, stats, recent deploys, and error logs
# This is the single best command for understanding a project's current state
coho doctor
# Describe the app structure — collections, schemas, queues, files
coho describe
# Get endpoint URLs with cURL examples
coho info --examples
coho doctor is the most powerful diagnostic command. It returns structured JSON covering database collections with document counts, deployment history, queue and worker status, and recent error logs. Always run it when joining an existing project or debugging issues.
# Deploy code (~5 seconds to live)
coho deploy
# Stream real-time logs
coho log -f
# Query a database collection
coho query -c <collection> -q 'field=value'
# Check queue status
coho queue-status
# Check workflow status
coho workflow-status
# Import data from JSON file
coho import -c <collection> --file data.json
# Export data from a collection
coho export -c <collection>
All codehooks-js code follows this structure:
import { app, Datastore } from 'codehooks-js';
// Register handlers (routes, jobs, workers, workflows)
app.get('/hello', (req, res) => {
res.json({ message: 'Hello, world!' });
});
// MANDATORY: bind to serverless runtime
export default app.init();
Key patterns:
app.get(), app.post(), app.put(), app.patch(), app.delete()const conn = await Datastore.open() then conn.insertOne(), conn.getMany(), conn.updateOne(), etc..toArray() when you need to manipulate data (sort, filter, map)req.rawBody for signature verification (not req.body). Bypass auth with app.auth('/webhook/*', (req, res, next) => next())app.job('0 9 * * *', async (_, { jobId }) => { ... })app.worker('queueName', async (req, res) => { ... }) and enqueue with conn.enqueue('queueName', payload)app.createWorkflow('name', 'description', steps, config)app.crudlify({ collection: schema }) for instant REST APIs with validationapp.static({ route: '/app', directory: '/public' }) to serve static sites from deployed sourceapp.storage({ route: '/docs', directory: '/uploads' }) to serve uploaded filesapp.auth('/public/*', (req, res, next) => next()) for public endpointsprocess.env.VARIABLE_NAME for secrets and API keys.ts filesDo NOT use: fs, path, os, or any modules requiring file system access.
Ready-to-use templates are available in the examples/ directory of this plugin:
examples/webhook-handler.js — Stripe webhook with signature verificationexamples/daily-job.js — Cron-scheduled background jobexamples/queue-worker.js — Async queue processing with task enqueueexamples/workflow-automation.js — Multi-step autonomous workflow with retries and statecoho prompt and read the full API referencecoho describe to understand what's already deployedcoho deploy (5 seconds to live)coho log -f or test endpoints with coho info --examples