360 Secure SkillHub
360 安全技能中心

appdb-collection-create

该技能用于为 Domo 应用初始化 AppDB 存储:优先调用 community-domo-cli 的 collection-create 创建数据存储和集合,失败时可回退到数据存储与集合创建接口;随后返回 datastoreId、collectionId 和 collectionName,供清单映射及后续文档写入使用。

stahura
热度 0.00
最近更新 2026-10-19 07:48:07
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:API 集成 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add stahura/domo-ai-vibe-rules/appdb-collection-create
Metadata
name
appdb-collection-create
description
Create AppDB collections via CLI-first workflows where collection creation also provisions the required datastore, then returns collection identifiers for manifest wiring and document-write follow-up. Use when an agent must initialize new AppDB storage for a Domo app, not just list/get collections or create documents.

AppDB Collection Create (CLI)

Use this skill when the app needs new AppDB storage and the CLI path can create both datastore and collection in one operation.

Intent

This skill covers storage initialization lifecycle:

  • create required datastore
  • create collection inside that datastore
  • capture resulting identifiers
  • prepare follow-up manifest mapping and document-write usage

For document CRUD operations after collection exists, use ~/.agents/skills/appdb/SKILL.md.

Assumed CLI Behavior

Assume community-domo-cli includes:

  • appdb collection-create

and that this operation handles datastore provisioning automatically when needed.

Primary Execution Path

Prefer CLI:

community-domo-cli --instance <instance> appdb collection-create --body-file collection.json

If CLI support is unavailable in a given environment, fall back to direct endpoint workflows:

  • POST /api/datastores/v1 (create datastore)
  • POST /api/datastores/v1/{datastoreId}/collections (create collection)

Required Input Contract

Use a body that includes at least:

  • collection name
  • collection schema.columns
  • optional syncEnabled

Example:

{
  "name": "TasksCollection",
  "schema": {
    "columns": [
      { "name": "title", "type": "STRING" },
      { "name": "status", "type": "STRING" }
    ]
  },
  "syncEnabled": true
}

Output Requirements

Return or persist:

  • datastoreId
  • collectionId
  • collectionName

so downstream skills can:

  • wire manifest mappings
  • create documents in the new collection

Manifest Follow-up

After successful creation, ensure app manifest contains collection wiring expected by the app project conventions in this repo.

Checklist

  • App requires new AppDB storage (not existing collection reuse)
  • CLI collection-create path used first
  • Datastore+collection identifiers captured
  • Manifest collection mapping follow-up performed
  • Hand-off to document CRUD flow (~/.agents/skills/appdb/SKILL.md) is clear