Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

cnc-execution-engine数控执行引擎

Agent Skill

cnc-execution-engine 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

404

周安装

17

GitHub Stars

公开资料未说明

下载量

141
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/constructive-io/constructive-skills --skill cnc-execution-engine

简介

用于通过 cnc CLI 执行 Constructive 平台的 GraphQL 查询,管理多环境 API 上下文。

  • 适用于测试 GraphQL 接口、切换 dev/staging/prod 环境或管理认证令牌。
  • 支持创建命名上下文、设置 API token 并在不同端点间快速切换。
  • 需先安装 cnc CLI 工具并配置好目标 API 的 endpoint 与凭证。
  • cnc-execution-engine 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

CNC Execution Engine

Execute raw GraphQL queries against Constructive APIs using the cnc CLI. Manage multiple API contexts (endpoint + credentials) similar to kubectl contexts.

When to Apply

Use this skill when:

  • Executing GraphQL queries against Constructive APIs
  • Setting up API endpoint configurations
  • Managing API tokens for authentication
  • Switching between multiple API environments (dev, staging, prod)
  • Testing GraphQL queries from the command line

Quick Start

# Create a context with an endpoint
cnc context create my-api --endpoint https://api.example.com/graphql

# Set your API token (input is masked)
cnc auth set-token

# Execute a query
cnc execute --query 'query { __typename }'

Context Management

Contexts store endpoint URLs and are similar to kubectl contexts. They are stored in ~/.cnc/config/contexts/.

Create a Context

# Interactive mode
cnc context create

# With flags
cnc context create my-api --endpoint https://api.example.com/graphql

List Contexts

cnc context list

Output shows all contexts with authentication status:

Contexts:

* my-api [authenticated]
    Endpoint: https://api.example.com/graphql

  staging [no token]
    Endpoint: https://staging.example.com/graphql

Switch Context

cnc context use staging

Show Current Context

cnc context current

Delete a Context

cnc context delete old-api

Authentication

Tokens are stored securely in ~/.cnc/config/credentials.json with restricted file permissions (0o600).

Set Token

# Interactive (input masked with asterisks)
cnc auth set-token

# With token as argument
cnc auth set-token eyJhbGciOiJIUzI1NiIs...

# For a specific context
cnc auth set-token --context staging

# With expiration
cnc auth set-token --expires 2024-12-31T23:59:59Z

Check Auth Status

cnc auth status

Output:

Authentication Status:

* my-api
    Status: Authenticated
    Token:  eyJhbG...s5Nw
    Expires: 2024-12-31T23:59:59Z

  staging
    Status: Not authenticated

Logout

cnc auth logout
cnc auth logout --context staging

Executing Queries

Inline Query

cnc execute --query 'query { databases { nodes { id name } } }'

From File

cnc execute --file query.graphql

With Variables

cnc execute --query 'query($id: UUID!) { database(id: $id) { name } }' \
  --variables '{"id":"550e8400-e29b-41d4-a716-446655440000"}'

Using a Specific Context

cnc execute --query 'query { __typename }' --context staging

Output Format

Successful queries return JSON:

Context: my-api
Endpoint: https://api.example.com/graphql

Success!

{
  "databases": {
    "nodes": [
      { "id": "...", "name": "my-database" }
    ]
  }
}

Failed queries show errors:

Failed!

  - Field "nonexistent" not found
    Path: query.nonexistent

Common Workflows

Setting Up a New Environment

# Create context for production
cnc context create prod --endpoint https://api.constructive.io/graphql

# Set the API token
cnc auth set-token

# Verify connection
cnc execute --query 'query { __typename }'

Working with Multiple Environments

# Create contexts for each environment
cnc context create dev --endpoint https://dev-api.example.com/graphql
cnc context create staging --endpoint https://staging-api.example.com/graphql
cnc context create prod --endpoint https://api.example.com/graphql

# Set tokens for each
cnc auth set-token --context dev
cnc auth set-token --context staging
cnc auth set-token --context prod

# Switch between environments
cnc context use dev
cnc execute --query 'query { databases { nodes { id } } }'

cnc context use prod
cnc execute --query 'query { databases { nodes { id } } }'

Scripting with CNC

#!/bin/bash
# Example: Query all databases and save to file

cnc context use prod
cnc execute --query 'query { databases { nodes { id name createdAt } } }' > databases.json

CLI Reference

cnc context

CommandDescription
cnc context create <name>Create a new context
cnc context listList all contexts
cnc context use <name>Switch to a context
cnc context currentShow current context details
cnc context delete <name>Delete a context

Create Options:

  • --endpoint <url> - GraphQL endpoint URL

cnc auth

CommandDescription
cnc auth set-token [token]Set API token (masked input if no token provided)
cnc auth statusShow authentication status for all contexts
cnc auth logoutRemove credentials for current context

Options:

  • --context <name> - Target a specific context
  • --expires <date> - Token expiration date (ISO format)

cnc execute

OptionDescription
--query <graphql>GraphQL query/mutation string
--file <path>Path to file containing GraphQL query
--variables <json>Variables as JSON string
--context <name>Context to use (defaults to current)

File Locations

PathPurpose
~/.cnc/config/contexts/Context configuration files
~/.cnc/config/settings.jsonGlobal settings (current context)
~/.cnc/config/credentials.jsonAPI tokens (mode 0o600)

Troubleshooting

IssueSolution
"No active context"Run cnc context create or cnc context use
"No valid credentials"Run cnc auth set-token
"Context not found"Check cnc context list for available contexts
Token expiredRun cnc auth set-token to set a new token
Connection refusedVerify endpoint URL with cnc context current

Environment Variables

The CLI respects standard environment variables but stored context/credentials take precedence:

VariableDescription
CNC_ENDPOINTOverride endpoint URL
CNC_TOKENOverride API token

References

  • CLI source: packages/cli/ in constructive-io/constructive
  • Config management uses appstash for directory resolution
  • Related skill: constructive-graphql-codegen for generating typed hooks/ORM

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.4%
按下载量换算53

Claude

31.44%
按下载量换算44

Cursor

18.7%
按下载量换算26

Gemini CLI

9.29%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills