Token导航 LogoToken导航

Agent Skill · 研究检索

constructive-services-schemas(建设性服务模式)

constructive-services-schemas 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

constructive-services-schemas 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 59,696。

总安装 380周安装 16GitHub Stars 公开资料未说明下载 133核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:constructive-services-schemas(建设性服务模式)
来源仓库:https://github.com/constructive-io/constructive-skills
仓库路径:skills/constructive-services-schemas
安装命令:
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-services-schemas
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-services-schemas

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

通过 TypeScript SDK 配置 Constructive 服务、绑定数据库 schema 并设置路由。支持零 SQL 操作完成 API 创建、域名校验和角色权限分配。适用于快速搭建多租户 SaaS 平台的后端服务能力。需了解实体层级结构(数据库→API→schema→domain)的组织逻辑。

constructive-services-schemas 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/constructive-services-schemas

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/constructive-io/constructive-skills --skill co…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

constructive-services-schemas 怎么安装?

在终端执行 npx skills add https://github.com/constructive-io/constructive-skills --skill constructive…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

constructive-services-schemas 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

constructive-services-schemas 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

constructive-services-schemas 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

constructive-services-schemas 用的人多吗?

公开数据是累计安装 380 次,近一周安装 16 次,下载 133 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

constructive-services-schemas 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
constructive-services-schemas

建设性服务模式 · 本页

380—需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Constructive Services & Schemas

Configure Constructive services (APIs), attach database schemas, set up domain routing, and manage access — all via the @constructive-io/sdk TypeScript SDK with zero SQL.

When to Apply

Use this skill when:

  • Creating a new API service for a Constructive database
  • Attaching database schemas to an API to expose them via GraphQL
  • Setting up domain/subdomain routing for APIs and sites
  • Adding configuration modules to an API
  • Granting role-based access to schemas
  • Querying existing APIs with their attached schemas and domains

Core Concepts

Entity Hierarchy

Database (top-level container)
├── Schema (database schema, e.g. "public" — auto-created with database)
│   ├── Table, View, SchemaGrant, ...
│   └── ApiSchema (join: links Schema ↔ Api)
├── Api (service endpoint with role-based access)
│   ├── ApiSchema (which schemas this API exposes)
│   ├── ApiModule (named JSON config blobs)
│   └── Domain (routing: subdomain.domain → this API)
├── Site (website metadata: title, logo, favicon, etc.)
│   └── Domain (routing: subdomain.domain → this site)
└── Domain (maps subdomain + domain to an Api and/or Site)

Key Relationships

EntityPurposeKey Fields
ApiA service endpointdatabaseId, name, roleName, anonRole, isPublic
ApiSchemaLinks an Api to a SchemadatabaseId, apiId, schemaId
ApiModuleNamed JSON config for an ApidatabaseId, apiId, name, data
DomainRoutes subdomain.domain → Api/SitedatabaseId, apiId, siteId, subdomain, domain
SchemaDatabase schema containerdatabaseId, name, schemaName
SchemaGrantGrants a role access to a schemadatabaseId, schemaId, granteeName

Every entity requires a databaseId — the UUID of the parent Database.

SDK Setup

import { createClient } from '@constructive-io/sdk';

const sdk = createClient({
  endpoint: 'https://your-constructive-api.example.com/graphql',
  headers: { Authorization: 'Bearer <token>' },
});

Creating an API

An API defines a service endpoint with role-based access control.

const result = await sdk.api
  .create({
    data: {
      databaseId,            // required: parent database UUID
      name: 'public',        // required: API name
      roleName: 'authenticated', // role for authenticated users
      anonRole: 'anonymous',    // role for anonymous access
      isPublic: true,           // whether the API is publicly accessible
    },
    select: { id: true, name: true, databaseId: true },
  })
  .execute();

if (!result.ok) {
  throw new Error(`createApi failed: ${JSON.stringify(result.errors)}`);
}

const api = result.data.createApi.api;

Required fields for api.create:

  • databaseId (string) — parent database UUID
  • name (string) — API name (e.g., "public", "admin", "meta")

Optional fields:

  • dbname (string) — database name override
  • roleName (string) — role for authenticated users (e.g., "authenticated", "administrator")
  • anonRole (string) — role for anonymous access (e.g., "anonymous", "administrator")
  • isPublic (boolean) — whether the API is publicly accessible

Attaching Schemas to an API

Use apiSchema to link a Schema to an Api. This is a many-to-many join — one API can expose multiple schemas, and one schema can be exposed by multiple APIs.

const linkResult = await sdk.apiSchema
  .create({
    data: {
      databaseId,   // required: parent database UUID
      apiId: api.id, // required: the API to attach to
      schemaId: publicSchema.id, // required: the schema to expose
    },
    select: { id: true },
  })
  .execute();

if (!linkResult.ok) {
  throw new Error(`createApiSchema failed: ${JSON.stringify(linkResult.errors)}`);
}

Required fields for apiSchema.create:

  • databaseId (string)
  • apiId (string) — the API to attach the schema to
  • schemaId (string) — the schema to expose through this API

Attaching multiple schemas to one API:

const schemaIds = [publicSchemaId, usersSchemaId, authSchemaId];

for (const schemaId of schemaIds) {
  await sdk.apiSchema
    .create({
      data: { databaseId, apiId: api.id, schemaId },
      select: { id: true },
    })
    .execute();
}

Setting Up Domains

Domains route subdomain.domain to an API and/or Site. Create the domain first, then link it to an API.

Step 1: Create domains

const domainResult = await sdk.domain
  .create({
    data: {
      databaseId,
      subdomain: 'api',       // the subdomain part
      domain: 'example.com',  // the domain part
    },
    select: { id: true, subdomain: true, domain: true },
  })
  .execute();

if (!domainResult.ok) {
  throw new Error(`createDomain failed: ${JSON.stringify(domainResult.errors)}`);
}

const domain = domainResult.data.createDomain.domain;

Step 2: Link domain to an API

const updateResult = await sdk.domain
  .update({
    where: { id: domain.id },
    data: { apiId: api.id },
    select: { id: true, apiId: true },
  })
  .execute();

Required fields for domain.create:

  • databaseId (string)

Optional fields:

  • apiId (string) — link to an API at creation time
  • siteId (string) — link to a Site
  • subdomain (string) — e.g., "api", "app", "admin"
  • domain (string) — e.g., "example.com", "localhost"

Adding API Modules

API modules attach named JSON configuration to an API.

const moduleResult = await sdk.apiModule
  .create({
    data: {
      databaseId,
      apiId: api.id,
      name: 'cors_config',       // required: module name
      data: {                     // required: JSON config data
        allowedOrigins: ['https://app.example.com'],
        allowedMethods: ['GET', 'POST'],
        maxAge: 86400,
      },
    },
    select: { id: true, name: true },
  })
  .execute();

Required fields for apiModule.create:

  • databaseId (string)
  • apiId (string) — the API this module belongs to
  • name (string) — module name
  • data (JSON object) — module configuration

Granting Schema Access

Schema grants control which roles can access a schema.

const grantResult = await sdk.schemaGrant
  .create({
    data: {
      schemaId: publicSchema.id,
      granteeName: 'authenticated',  // role name to grant access to
    },
    select: { id: true },
  })
  .execute();

Required fields for schemaGrant.create:

  • schemaId (string) — the schema to grant access to
  • granteeName (string) — the role name (e.g., "authenticated", "anonymous")

Optional fields:

  • databaseId (string)

Querying APIs with Relations

List all APIs with their schemas and domains

const apis = await sdk.api
  .findMany({
    select: {
      id: true,
      name: true,
      roleName: true,
      anonRole: true,
      isPublic: true,
      apiSchemas: {
        select: {
          id: true,
          schema: {
            select: { id: true, name: true, schemaName: true },
          },
        },
      },
      domains: {
        select: { id: true, subdomain: true, domain: true },
      },
      apiModules: {
        select: { id: true, name: true, data: true },
      },
    },
  })
  .execute();

Find a specific API by name

const result = await sdk.api
  .findFirst({
    where: { name: { equalTo: 'public' } },
    select: {
      id: true,
      name: true,
      apiSchemas: {
        select: {
          schema: { select: { id: true, name: true } },
        },
      },
    },
  })
  .execute();

Query a schema with its API links

const schemaResult = await sdk.schema
  .findFirst({
    where: { name: { equalTo: 'public' } },
    select: {
      id: true,
      name: true,
      schemaName: true,
      apiSchemas: {
        select: {
          api: { select: { id: true, name: true } },
        },
      },
      schemaGrants: {
        select: { id: true, granteeName: true },
      },
    },
  })
  .execute();

Complete End-to-End Example

This example shows a full service setup workflow: create a database, set up multiple APIs with different roles, attach schemas, configure domains, and add site metadata.

import { createClient } from '@constructive-io/sdk';

const sdk = createClient({
  endpoint: 'https://your-api.example.com/graphql',
  headers: { Authorization: 'Bearer <token>' },
});

// 1. Create a database (schemas like "public" are auto-created)
const dbResult = await sdk.database
  .create({
    data: { name: 'my-project', ownerId: userId },
    select: {
      id: true,
      schemas: { select: { id: true, name: true }, first: 10 },
    },
  })
  .execute();

const database = dbResult.data.createDatabase.database;
const databaseId = database.id;
const publicSchema = database.schemas?.nodes?.find(
  (s) => s.name === 'public'
);

// 2. Create domains for routing
const subdomains = ['api', 'app', 'meta'];
const domains: Record<string, string> = {};

for (const subdomain of subdomains) {
  const domainResult = await sdk.domain
    .create({
      data: { databaseId, subdomain, domain: 'localhost' },
      select: { id: true },
    })
    .execute();
  domains[subdomain] = domainResult.data.createDomain.domain.id;
}

// 3. Helper: create an API, attach schemas, and link a domain
async function setupApi(opts: {
  name: string;
  roleName: string;
  anonRole: string;
  schemaIds?: string[];
  domainId: string;
}) {
  // Create the API
  const apiResult = await sdk.api
    .create({
      data: {
        databaseId,
        name: opts.name,
        roleName: opts.roleName,
        anonRole: opts.anonRole,
        isPublic: true,
      },
      select: { id: true, name: true },
    })
    .execute();

  const api = apiResult.data.createApi.api;

  // Attach schemas
  for (const schemaId of opts.schemaIds ?? []) {
    await sdk.apiSchema
      .create({
        data: { databaseId, apiId: api.id, schemaId },
        select: { id: true },
      })
      .execute();
  }

  // Link domain to this API
  await sdk.domain
    .update({
      where: { id: opts.domainId },
      data: { apiId: api.id },
      select: { id: true },
    })
    .execute();

  return api;
}

// 4. Set up services
await setupApi({
  name: 'public',
  roleName: 'authenticated',
  anonRole: 'anonymous',
  schemaIds: [publicSchema.id],
  domainId: domains['api'],
});

await setupApi({
  name: 'meta',
  roleName: 'authenticated',
  anonRole: 'anonymous',
  domainId: domains['meta'],
});

// 5. Create a site and link it to the app domain
const siteResult = await sdk.site
  .create({
    data: {
      databaseId,
      title: 'My App',
      description: 'My Constructive application',
    },
    select: { id: true },
  })
  .execute();

await sdk.domain
  .update({
    where: { id: domains['app'] },
    data: { siteId: siteResult.data.createSite.site.id },
    select: { id: true },
  })
  .execute();

Updating and Deleting

Update an API

await sdk.api
  .update({
    where: { id: apiId },
    data: { isPublic: false, anonRole: 'authenticated' },
    select: { id: true, isPublic: true },
  })
  .execute();

Remove a schema from an API

await sdk.apiSchema
  .delete({
    where: { id: apiSchemaId },
    select: { id: true },
  })
  .execute();

Delete a domain

await sdk.domain
  .delete({
    where: { id: domainId },
    select: { id: true },
  })
  .execute();

Common Patterns

Multiple APIs, same database

A single database typically has several APIs with different access levels:

API NameroleNameanonRolePurpose
publicauthenticatedanonymousPublic-facing API
metaauthenticatedanonymousMetadata/schema introspection
DANGEROUS — Development/Testing Only! APIs with administrator as both roleName and anonRole (e.g., admin, super) should never exist in production. These grant full administrator access to anonymous users. They are only used in local development and test environments. If you see administrator APIs in a production setup, treat it as a critical security misconfiguration.

Domain routing pattern

Each API gets its own subdomain:

SubdomainDomainLinked To
apiexample.compublic API
appexample.comSite (frontend)
metaexample.commeta API

Error Handling

All SDK operations return a discriminated union. Always check .ok:

const result = await sdk.api.create({ ... }).execute();

if (!result.ok) {
  console.error('Failed:', result.errors);
  // result.errors is GraphQLError[]
  return;
}

// Safe to access result.data
const api = result.data.createApi.api;

Or use .unwrap() to throw on error:

const data = await sdk.api.create({ ... }).unwrap();
const api = data.createApi.api;

References

  • For detailed ORM field reference, see references/entity-fields.md
  • Related skill: constructive-graphql-codegen — generate the typed SDK
  • Related skill: constructive-functions — build cloud functions using the SDK

平台分布

Codex

37.83%
按下载量换算50

Claude

30.79%
按下载量换算41

Cursor

17.2%
按下载量换算23

Gemini CLI

8.81%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills