Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

codehooks-backend代码挂钩后端

Agent Skill

codehooks-backend 用于辅助部署、云资源、容器和基础设施运维,适合在 OpenClaw 中需要检查配置、整理部署步骤或排查环境问题时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

23,256

周安装

950

GitHub Stars

公开资料未说明

下载量

7,448
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codehooks-backend(代码挂钩后端)
来源仓库:https://github.com/canuto/codehooks-backend
安装命令:
openclaw skills install codehooks-backend
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install codehooks-backend

简介

为 REST API、Webhook、数据存储、计划作业、队列工作人员和自主工作流程部署无服务器后端。

SKILL.md

name
codehooks-backend
description
Deploy serverless backends for REST APIs, webhooks, data storage, scheduled jobs, queue workers, and autonomous workflows.
metadata
{ "openclaw": { "emoji": "🪝", "requires": { "bins": ["coho"], "env": ["CODEHOOKS_ADMIN_TOKEN"] } } }

Codehooks Backend Skill

Give your OpenClaw agent a serverless backend for REST APIs, webhooks, data storage, scheduled jobs, queue workers, and autonomous workflows.

Your agent can deploy code

With this skill, your agent can write JavaScript/TypeScript code and deploy it to a live serverless backend in 5 seconds. No human intervention required — the agent iterates autonomously.

Codehooks has a free tier to get started, and paid plans have no extra charges for traffic or API calls — let your agent deploy without worrying about usage costs.

⚠️ Warning: This gives your agent the ability to deploy and run code on a live server. Review your agent's actions, set appropriate permissions, and monitor usage. You are responsible for any code your agent deploys.

What this skill enables

  • REST APIs with automatic OpenAPI/Swagger documentation
  • Instant CRUD APIs using crudlify() with schema validation
  • Webhook endpoints that external services can call (Stripe, GitHub, Shopify, etc.)
  • Persistent storage beyond local memory (NoSQL + key-value)
  • Background jobs and scheduled tasks that run 24/7
  • Queue workers for async processing
  • Autonomous workflows with retries, branching, and state management

Setup

Human does once:

npm install -g codehooks
coho login
coho create openclaw-backend
coho add-admintoken

Give the admin token to your agent.

Agent uses:

export CODEHOOKS_ADMIN_TOKEN="your-token-here"
coho deploy --admintoken $CODEHOOKS_ADMIN_TOKEN

The agent can now deploy code, query data, and manage the backend.


Essential: Load the development context

Before building anything, run:

coho prompt

This outputs the complete Codehooks development prompt — routing, database, queues, jobs, workflows, and the full codehooks-js API. Copy it into your context to build any backend feature correctly.

macOS shortcut:

coho prompt | pbcopy

Understand existing projects

Before modifying an existing project, get the full picture:

# Returns JSON with collections, stats, recent deploys, and error logs
coho doctor

# Describe the app structure — collections, schemas, queues, files
coho describe

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.

coho describe complements doctor by showing the structural overview: what collections exist, their schemas, registered queues, and deployed files.


Commands your agent can use

All commands accept --admintoken $CODEHOOKS_ADMIN_TOKEN for non-interactive use. Full CLI reference: https://codehooks.io/docs/cli

CommandWhat it does
coho promptGet the full development context
coho doctorDiagnose project state — collections, stats, deploys, error logs
coho describeDescribe app structure — collections, schemas, queues, files
coho deployDeploy code (5 seconds to live)
coho info --examplesGet endpoint URLs with cURL examples
coho log -fStream logs in real-time
coho query -c <collection> -q 'field=value'Query the database
coho queue-statusCheck queue status
coho workflow-statusCheck workflow status
coho import -c <collection> --file data.jsonImport data
coho export -c <collection>Export data

Code examples

Instant CRUD API with validation

import { app } from 'codehooks-js';
import * as Yup from 'yup';

const productSchema = Yup.object({
  name: Yup.string().required(),
  price: Yup.number().positive().required(),
  category: Yup.string().required()
});

// Creates GET, POST, PUT, DELETE endpoints automatically
// OpenAPI docs available at /.well-known/openapi
app.crudlify({ product: productSchema });

export default app.init();

Webhook that stores incoming data

import { app, Datastore } from 'codehooks-js';

// Allow webhook endpoint without JWT authentication
app.auth('/webhook', (req, res, next) => {
  next();
});

app.post('/webhook', async (req, res) => {
  const conn = await Datastore.open();
  await conn.insertOne('events', {
    ...req.body,
    receivedAt: new Date().toISOString()
  });
  res.json({ ok: true });
});

export default app.init();

Scheduled job (runs daily at 9am)

import { app, Datastore } from 'codehooks-js';

app.job('0 9 * * *', async (_, { jobId }) => {
  console.log(`Running job: ${jobId}`);
  const conn = await Datastore.open();
  const events = await conn.getMany('events', {}).toArray();
  console.log('Daily summary:', events.length, 'events');
});

export default app.init();

Queue worker for async processing

import { app, Datastore } from 'codehooks-js';

app.worker('processTask', async (req, res) => {
  const { task } = req.body.payload;
  const conn = await Datastore.open();
  await conn.updateOne('tasks', { _id: task.id }, { $set: { status: 'completed' } });
  res.end();
});

export default app.init();

Autonomous workflow (multi-step with retries)

import { app } from 'codehooks-js';

const workflow = app.createWorkflow('myTask', 'Process tasks autonomously', {
  begin: async function (state, goto) {
    console.log('Starting task:', state.taskId);
    goto('process', state);
  },
  process: async function (state, goto) {
    // Do work here - workflow handles retries and state
    state = { ...state, result: 'processed' };
    goto('complete', state);
  },
  complete: function (state, goto) {
    console.log('Done:', state.result);
    goto(null, state); // End workflow
  }
});

// Agent starts workflow via API
app.post('/start', async (req, res) => {
  const result = await workflow.start(req.body);
  res.json(result);
});

export default app.init();

Important patterns

  • getMany() returns a stream — use .toArray() when you need to manipulate data (sort, filter, map)
  • Webhook signatures: Use req.rawBody for signature verification, not req.body
  • No filesystem access: fs, path, os are not available — this is a serverless environment
  • Secrets: Use process.env.VARIABLE_NAME for API keys and secrets
  • Static files: app.static({ route: '/app', directory: '/public' }) serves static sites from deployed source
  • File storage: app.storage({ route: '/docs', directory: '/uploads' }) serves uploaded files

Development workflow: Let your agent build new endpoints

  1. Agent runs coho prompt and loads the development context
  2. For existing projects, agent runs coho doctor and coho describe to understand what's deployed
  3. Agent writes code using codehooks-js patterns
  4. Agent runs coho deploy (5 seconds to live)
  5. Agent verifies with coho log -f or tests endpoints with coho info --examples
  6. Agent iterates — the fast deploy loop enables rapid development

When to use this skill

  • You need a reliable webhook URL for Stripe, GitHub, Shopify, etc.
  • You want persistent storage outside your local machine
  • You need scheduled jobs that run even when your device is off
  • You want to offload sensitive API integrations to a sandboxed environment
  • You need queues for async processing
  • You want autonomous multi-step workflows that run independently with retries

Resources

  • Documentation: https://codehooks.io/docs
  • CLI reference: https://codehooks.io/docs/cli
  • AI prompt: Run coho prompt or visit https://codehooks.io/llms.txt
  • Templates: https://github.com/RestDB/codehooks-io-templates
  • MCP Server: https://github.com/RestDB/codehooks-mcp-server

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

79.62%
按下载量换算5,930

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills