Token导航 LogoToken导航

Agent Skill · 待分类

variable-creation(变量创建)

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

variable-creation 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在待分类类的 11,209 个 Skill 里排第 4,301。

总安装 768周安装 33GitHub Stars 14下载 269核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:variable-creation(变量创建)
来源仓库:https://github.com/stahura/domo-ai-vibe-rules
仓库路径:skills/variable-creation
安装命令:
npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill variable-creation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill variable-creation

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

variable-creation 用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。它适合围绕代码变更、仓库状态或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。安装前建议确认权限范围和是否会触发文件读写操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/variable-creation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

variable-creation 怎么安装?

在终端执行 npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill variable-creation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

variable-creation 支持哪些 AI 工具?

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

variable-creation 需要什么权限?

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

variable-creation 是免费的吗?

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

variable-creation 用的人多吗?

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

variable-creation 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

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

待分类类 Skill 对比

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

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
variable-creation

变量创建 · 本页

76814需要联网未明确未通过

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

SKILL.md 原文

Variable Creation

Create Domo card variables (interactive controls) and output curl commands or CLI commands to execute them.

Variables are user-adjustable values that feed into Beast Mode formulas, enabling dynamic what-if analysis. They appear as dropdown, pill, slider, textbox, or date picker controls on cards and dashboards.

When to Use This Skill

  • User asks for a dropdown, slider, or interactive control on a card
  • User mentions "variable", "parameter", or describes wanting dynamic/adjustable values
  • A card needs what-if analysis or user-selectable inputs
  • You're building a card and realize a beast mode needs a user-controlled input

Core Workflow — 3-Step Creation

Variable creation requires three sequential API calls. All three are mandatory — skipping the middle step causes a 400 error on the card save.

1. Check name uniqueness (GET /query/v1/functions/variables/uniqueName)
2. Create the function template WITH embedded control (POST /query/v1/functions/template)
3. Register the variable control (PUT /content/v1/variable/controls)
4. Read the current card definition (PUT /content/v3/cards/kpi/definition)
5. Save the card with the new control (PUT /content/v3/cards/kpi/{cardId})

Prerequisites

ParameterSourceRequired
instanceUrlDomo instance (e.g., domo-gordon-pont.domo.com)Always
devTokenCLI auth / developer tokenAlways
cardIdCard IDAlways
dataSourceIdDataset UUID (from card definition or columns)For validation and card save

Variable Data Types

Data TypeExpression ExamplesCompatible Controls
string'TEST', 'Option A'DROPDOWN, PILL, TEXTBOX
numeric100, 0.5DROPDOWN, PILL, SLIDER, TEXTBOX
dateCURRENT_DATE(), '2024-01-01'DROPDOWN, DATE_PICKER

Variable Control Types

TypeDescriptionBest For
DROPDOWNSelect from a list of predefined valuesCategorical selections, string/numeric/date
PILLInline toggle chipsSmall number of options (2-5)
SLIDERNumeric range sliderNumeric ranges with min/max
TEXTBOXFree-text inputOpen-ended string/numeric input
DATE_PICKERCalendar date selectorDate variables

Expression Types by Data Type

Data TypeexprType
stringSTRING_VALUE
numericNUMERIC_VALUE
dateDATE_VALUE

Values Array

For DROPDOWN and PILL controls, the values array defines the selectable options:

{"expression": {"value": "Option Text", "exprType": "STRING_VALUE"}}

For SLIDER controls, values define the min/max range:

[
  {"expression": {"value": "0", "exprType": "NUMERIC_VALUE"}},
  {"expression": {"value": "100", "exprType": "NUMERIC_VALUE"}}
]

Step 1: Check Name Uniqueness

Endpoint: GET /api/query/v1/functions/variables/uniqueName?name={name}

curl -X GET "https://{instanceUrl}/api/query/v1/functions/variables/uniqueName?name={variableName}" \
  -H "X-DOMO-Developer-Token: {devToken}"

Returns [] if the name is available. Returns an array of function template IDs if the name is already in use. Variable names must be globally unique across the entire Domo instance.


Step 2: Create the Function Template

Endpoint: POST /api/query/v1/functions/template

This creates the variable's function template. The request body must include an embedded control object — this is critical and differs from regular beast mode creation.

curl -X POST "https://{instanceUrl}/api/query/v1/functions/template" \
  -H "X-DOMO-Developer-Token: {devToken}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "{variableName}",
    "formula": "{defaultExpression}",
    "status": "VALID",
    "dataType": "{dataType}",
    "persistedOnDataSource": false,
    "isAggregatable": true,
    "bignumber": false,
    "owner": null,
    "nonAggregatedColumns": [],
    "legacyId": "calculation_{uuid}",
    "variable": true,
    "isCalculation": true,
    "initialPersistedOnDataSource": false,
    "saved": true,
    "query": "{defaultExpression}",
    "control": {
      "format": {"type": "default"},
      "controlType": "VARIABLE",
      "function": {
        "name": "{variableName}",
        "dataType": "{dataType}",
        "expression": "{defaultExpression}",
        "id": -201
      },
      "saveOverride": true,
      "description": "",
      "values": [
        {"expression": {"value": "{value1}", "exprType": "{exprType}"}},
        {"expression": {"value": "{value2}", "exprType": "{exprType}"}}
      ],
      "type": "{controlType}",
      "unsaved": true,
      "name": "{variableName}",
      "id": -101
    },
    "description": "",
    "locked": false,
    "cacheWindow": "non_dynamic",
    "containsAggregation": false,
    "containsAnalytic": false,
    "invalidColumns": [],
    "nonAggregatedExpressions": [],
    "formulaTemplateDependencies": [],
    "columnPositions": [],
    "formulaId": "calculation_{another_uuid}",
    "formulaDependencies": [],
    "isControlled": false,
    "global": true,
    "unsaved": true,
    "expression": "{defaultExpression}"
  }'

Key fields:

  • variable: true — marks this as a variable function (not a regular beast mode)
  • control — the embedded control definition with placeholder IDs (-201, -101)
  • legacyId and formulaId — generate unique UUIDs in the format calculation_{uuid}
  • global: true — variables are instance-wide
  • owner: null — server assigns the owner

Response — save the id (numeric function template ID):

{
  "id": 1172,
  "name": "{variableName}",
  "legacyId": "calculation_{uuid}",
  "variable": true,
  ...
}

Step 3: Register the Variable Control

Endpoint: PUT /api/content/v1/variable/controls

This step registers the control with the Domo control system. Without this step, the card save will return 400.

curl -X PUT "https://{instanceUrl}/api/content/v1/variable/controls" \
  -H "X-DOMO-Developer-Token: {devToken}" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "format": {"type": "default"},
      "controlType": "VARIABLE",
      "function": {
        "name": "{variableName}",
        "dataType": "{dataType}",
        "expression": "{defaultExpression}",
        "id": {functionTemplateId from Step 2}
      },
      "saveOverride": true,
      "description": "",
      "values": [
        {"expression": {"value": "{value1}", "exprType": "{exprType}"}},
        {"expression": {"value": "{value2}", "exprType": "{exprType}"}}
      ],
      "type": "{controlType}",
      "unsaved": false,
      "name": "{variableName}"
    }
  ]'

Key differences from Step 2's control:

  • function.id is now the real template ID from Step 2 (not -201)
  • unsaved: false (not true)
  • No id: -101 at the control level
  • Body is an array of control objects

Response — returns an array with the registered control, including server-assigned id:

[
  {
    "id": 145,
    "function": {"id": 1172, ...},
    "type": "DROPDOWN",
    "values": [...],
    "controlType": "VARIABLE",
    ...
  }
]

Step 4: Read the Current Card Definition

curl -X PUT "https://{instanceUrl}/api/content/v3/cards/kpi/definition" \
  -H "X-DOMO-Developer-Token: {devToken}" \
  -H "Content-Type: application/json" \
  -d '{
    "dynamicText": true,
    "variables": true,
    "urn": "{cardId}"
  }'

Save the full response. You need definition.subscriptions, definition.controls, definition.charts, definition.modified, etc.

Get the dataSourceId from columns[].sourceId in the response.


Step 5: Save the Card with the New Control

Endpoint: PUT /api/content/v3/cards/kpi/{cardId}

Build the update payload by merging the new control into the card definition.

curl -X PUT "https://{instanceUrl}/api/content/v3/cards/kpi/{cardId}" \
  -H "X-DOMO-Developer-Token: {devToken}" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": {
      "subscriptions": {existing subscriptions from card def — do NOT add dataSourceId here},
      "formulas": {"dsUpdated": [], "dsDeleted": [], "card": []},
      "annotations": {"new": [], "modified": [], "deleted": []},
      "conditionalFormats": {"card": [], "datasource": []},
      "controls": [{existing controls with saveOverride: true}, {new control}],
      "segments": {"active": [], "create": [], "update": [], "delete": []},
      "charts": {existing charts},
      "dynamicTitle": {existing dynamicTitle},
      "dynamicDescription": {"text": []},
      "chartVersion": "{existing chartVersion}",
      "allowTableDrill": true,
      "inputTable": false,
      "modified": {existing modified timestamp},
      "title": "{card title}",
      "description": ""
    },
    "dataProvider": {"dataSourceId": "{dataSourceId}"},
    "variables": true,
    "columns": false
  }'

Critical payload notes:

  • variables: true and columns: false at the top level
  • dataSourceId goes in dataProvider only — NOT in subscriptions.main
  • formulas uses the {dsUpdated, dsDeleted, card} structure (not the array format from the read response)
  • Existing controls must be passed in their full server format with saveOverride: true added
  • The new control uses the simplified format with function.id = the template ID from Step 2
  • The modified timestamp must match the card definition's value

Optional: Validate the Variable Formula

Endpoint: POST /api/query/v1/functions/validateFormulas

Validation is optional but recommended before creating. The formula entry must have "variable": true.

curl -X POST "https://{instanceUrl}/api/query/v1/functions/validateFormulas" \
  -H "X-DOMO-Developer-Token: {devToken}" \
  -H "Content-Type: application/json" \
  -d '{
    "dataSourceId": "{dataSourceId}",
    "columns": [{column schema array}],
    "formulas": {
      "{formulaId}": {
        "id": "{formulaId}",
        "name": "{variableName}",
        "formula": "{defaultExpression}",
        "status": "valid",
        "dataType": "{dataType}",
        "variable": true,
        "templateId": null,
        "legacyId": "{formulaId}",
        "formulaDependencies": []
      }
    }
  }'

Using the Variable in a Beast Mode

A variable has no effect on a card unless it's referenced in a Beast Mode formula:

CASE
  WHEN `My Variable` = 'Option A' THEN `column_a`
  WHEN `My Variable` = 'Option B' THEN `column_b`
  ELSE `column_a`
END

Variables are referenced by name in backticks, just like dataset columns.


Three-Tier Control Hierarchy

Variables have three levels of override:

  1. Default Control — Set in Beast Mode Editor (or via API). Baseline value.
  2. Card Variable Control — Override in Analyzer for a specific card. Does NOT transfer to dashboards.
  3. Dashboard Variable Control — Override on a specific dashboard. Resets on page refresh.

Using the CLI

The community-domo-cli handles the full 3-step flow automatically:

# Check if a variable name is available
community-domo-cli variables check-name "My Variable"

# List variables on a card
community-domo-cli variables list {cardId}

# Create a variable (handles all 3 steps internally)
community-domo-cli variables create {cardId} --body-file variable.json

# Validate a variable formula
community-domo-cli variables validate --body-file validate-payload.json

# Read full card definition (includes controls)
community-domo-cli cards definition {cardId}

Example: Create a string dropdown variable via CLI

variable.json:

{
  "name": "Region Selector",
  "type": "DROPDOWN",
  "function": {
    "name": "Region Selector",
    "dataType": "string",
    "expression": "'North'"
  },
  "description": "Select a region to filter by",
  "values": [
    {"expression": {"value": "North", "exprType": "STRING_VALUE"}},
    {"expression": {"value": "South", "exprType": "STRING_VALUE"}},
    {"expression": {"value": "East", "exprType": "STRING_VALUE"}},
    {"expression": {"value": "West", "exprType": "STRING_VALUE"}}
  ]
}
community-domo-cli variables create 1810280719 --body-file variable.json --yes

The CLI automatically:

  1. Checks name uniqueness
  2. Creates the function template with embedded control
  3. Registers the control via PUT /content/v1/variable/controls
  4. Reads the card definition
  5. Merges and saves the card

Troubleshooting

ProblemCauseFix
Variable not visible on cardNot referenced in any beast modeCreate a beast mode that uses the variable
Card save returns 400Missing PUT /content/v1/variable/controls stepMust register the control before saving the card
Card save returns 400dataSourceId in subscriptions.mainRemove it — only put dataSourceId in dataProvider
Card save returns 400Existing controls not in full server formatPass existing controls as-is from card def with saveOverride: true
500 Internal database errorDuplicate variable nameCheck name with GET /query/v1/functions/variables/uniqueName first
Validation returns INVALIDBad expression syntaxCheck quotes for strings, function syntax for dates
Dashboard doesn't show variable controlCard-level override doesn't propagateSet the control at dashboard level
Variable resets on dashboard refreshExpected behaviorDashboard controls reset to default on page load

Output Format

When generating commands for the user, provide:

  1. What it does — one sentence explaining the variable
  2. The variable definition — name, type, default, control type, options
  3. Numbered commands — in execution order (all 3 steps), ready to copy/paste
  4. What to do with each response — especially saving the function template ID from Step 2
  5. Beast mode integration — show the formula that references the variable
  6. Verify — tell them to check the card in Domo after running

平台分布

Codex

35.63%
按下载量换算96

Claude

29.69%
按下载量换算80

Cursor

18.1%
按下载量换算49

Gemini CLI

8.42%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills