Token导航 LogoToken导航

Agent Skill · 运维和基础设施

controller-presets(控制器预设)

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

controller-presets 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,011。

总安装 1,004周安装 41GitHub Stars 4下载 325核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cartridge-gg/docs --skill controller-presets

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

controller-presets 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。适用于需要快速理解项目结构、贡献流程或审查代码修改的场景,尤其适合开源项目协作。

通过分析项目目录、测试用例和文档指引,帮助定位关键模块与提交规范。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。可结合来源仓库、安装命令和原始 README 继续核验具体用法。

来源仓库内路径:skills/controller-presets

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

controller-presets 怎么安装?

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

controller-presets 支持哪些 AI 工具?

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

controller-presets 需要什么权限?

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

controller-presets 是免费的吗?

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

controller-presets 用的人多吗?

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

controller-presets 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

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

运维和基础设施类 Skill 对比

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

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
controller-presets

控制器预设 · 本页

1,0044需要联网未明确有提醒

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

SKILL.md 原文

Controller Presets

Guide teams through creating a preset for the Cartridge Controller. A preset is a config.json committed to cartridge-gg/presets that configures origin verification, session policies, theming, paymaster behavior, and optional iOS passkey support.

Invocation

The user wants help creating or debugging a Controller preset. Use AskUserQuestion to gather information interactively, one round at a time.

Process

Phase 1: Basics

Ask:

  1. Game/project name — used as the directory name in configs/<name>/. Must be lowercase kebab-case (e.g. dope-wars, loot-survivor).
  2. Which networks? — SN_MAIN, SN_SEPOLIA, or both.

Explain:

  • Sepolia is paymastered by default — no paymaster setup needed for testnet.
  • Mainnet requires a Cartridge paymaster (see cartridge-paymaster skill) to sponsor transactions.

Phase 2: Origin Configuration

Ask for the production domain(s) where the game will be hosted.

Generate the origin field. Apply these rules:

RuleCorrectWrong
No protocol prefix"game.example.com""https://game.example.com"
Wildcard for subdomains"*.example.com"—
Wildcard does NOT match base domain*.example.com matches app.example.com but NOT example.comAssuming *.example.com covers example.com
Multiple origins use an array["example.com", "staging.example.com"]—
localhost is always allowedDon't list itAdding "localhost" to origins

If they have a Capacitor mobile app, ask for the custom hostname and include it:

{
  "origin": ["yourdomain.com", "my-custom-app"]
}

This authorizes capacitor://my-custom-app (iOS) and https://my-custom-app (Android). The default capacitor://localhost is always allowed automatically.

IMPORTANT: If the user needs both example.com and *.example.com, they must list both explicitly.

Phase 3: Session Policies

Ask for the contract addresses and entrypoints the game calls. For each contract, collect:

  • Contract address (hex, checksummed)
  • Human-readable name and description
  • Methods with entrypoints

Build the chains section. Example:

{
  "chains": {
    "SN_MAIN": {
      "policies": {
        "contracts": {
          "0x123...abc": {
            "name": "Game World",
            "description": "Main game contract",
            "methods": [
              {
                "name": "Move Player",
                "description": "Move to a new position",
                "entrypoint": "move_player"
              }
            ]
          }
        }
      }
    }
  }
}

Key rules:

  • Entrypoints must be snake_case and match the exact Cairo function name.
  • Chain IDs: use SN_MAIN (not SN_MAINNET) and SN_SEPOLIA (not SN_TESTNET).
  • Contract addresses differ between networks — confirm separate addresses for mainnet vs sepolia.
  • approve entrypoint triggers a CI warning — the validator flags it. If the user genuinely needs ERC20 approval, acknowledge the warning.
  • VRF: If the game uses Cartridge VRF, include the VRF provider contract (0x051Fea4450Da9D6aeE758BDEbA88B2f665bCbf549D2C61421AA724E9AC0Ced8F) with request_random entrypoint. The keychain auto-labels VRF contracts with Cartridge branding.
Method options
FieldDefaultNotes
isPaymasteredtrueSet to false to require users to pay their own gas for this method
isEnabledtrueWhether the method is pre-checked in the session approval UI
isRequiredfalseIf true, user cannot uncheck this method
predicate—Optional: conditional sponsorship based on contract state
Paymaster predicates

For conditional sponsorship:

{
  "entrypoint": "move_player",
  "is_paymastered": true,
  "predicate": {
    "address": "0x456...def",
    "entrypoint": "check_move_eligibility"
  }
}

The predicate contract is called first; the transaction is only sponsored if it returns true.

Message signing policies

If the game uses off-chain signed messages (EIP-712 style typed data), add a messages array alongside contracts:

{
  "policies": {
    "contracts": { ... },
    "messages": [
      {
        "types": {
          "StarknetDomain": [...],
          "Message": [{ "name": "content", "type": "felt" }]
        },
        "primaryType": "Message",
        "domain": {
          "name": "MyGame",
          "version": "1",
          "chainId": "SN_MAIN",
          "revision": "1"
        }
      }
    ]
  }
}

Phase 4: Theme

Ask if they want a custom theme. Collect:

  • Name: display name for the game
  • Icon: SVG or PNG file (will be optimized to 16–256px)
  • Cover: PNG or JPG file (will be optimized to 768–1440px), optional
  • Primary color: hex color for accent/branding

Cover supports light/dark variants:

{
  "theme": {
    "name": "MyGame",
    "icon": "icon.svg",
    "cover": { "light": "cover-light.png", "dark": "cover-dark.png" },
    "colors": { "primary": "#F38332" }
  }
}

Asset files go in the same directory as config.json. The build pipeline generates optimized WebP/PNG/JPG versions automatically — commit only the source files.

Phase 5: Apple App Site Association (AASA)

Ask if they have a native iOS app that uses passkeys.

If yes, collect:

  • Team ID: exactly 10 uppercase alphanumeric characters (from Apple Developer account)
  • Bundle ID: reverse DNS format (e.g. com.example.mygame)

The app ID is TEAMID.BUNDLEID. Validation rules:

  • Pattern: /^[A-Z0-9]{10}\.[a-zA-Z0-9.-]+$/
  • Team ID must be exactly 10 characters
  • All AASA entries across all presets are aggregated into a single file served at https://x.cartridge.gg/.well-known/apple-app-site-association
  • The aggregated file must stay under 128 KB
{
  "apple-app-site-association": {
    "webcredentials": {
      "apps": ["ABCDE12345.com.example.mygame"]
    }
  }
}

If no iOS app, skip this section entirely (don't include the key).

Phase 6: Assemble and Validate

Assemble the complete config.json and present it to the user.

Run through validation checklist:

  • Origins have no protocol prefix
  • Chain IDs are SN_MAIN or SN_SEPOLIA (not SN_MAINNET/SN_TESTNET)
  • Contract addresses are different for each network
  • Entrypoints are snake_case matching Cairo function names
  • AASA app IDs match TEAMID.BUNDLEID format (if present)
  • Asset files (icon, cover) are referenced and will exist in the directory
  • No approve entrypoint unless intentional

Phase 7: Connector Integration

Show how to use the preset in their app:

import Controller from "@cartridge/controller";

const controller = new Controller({
  preset: "<preset-name>",  // matches the directory name in configs/
  // Policies are loaded from the preset — do NOT also pass policies here
  // unless you set shouldOverridePresetPolicies: true
});

Explain policy precedence:

  1. shouldOverridePresetPolicies: true + policies → uses inline policies
  2. Preset has policies for current chain → uses preset policies (ignores inline)
  3. Preset has no policies for current chain → falls back to inline policies
  4. No preset → uses inline policies

Phase 8: PR Submission

Guide the user to submit a PR to cartridge-gg/presets:

  1. Create configs/<name>/config.json
  2. Add asset files (icon, cover) to the same directory
  3. CI runs validate-configs.ts — fix any errors before merge
  4. After merge, configs are built and deployed to https://static.cartridge.gg/presets/<name>/config.json

Mainnet vs Sepolia Reference

AspectSepoliaMainnet
PaymasterFree, automaticRequires Slot paymaster with budget
Chain ID in configSN_SEPOLIASN_MAIN
Contract addressesSepolia deployMainnet deploy
Recommended forDevelopment, testingProduction

Teams often include both chains in a single preset — use separate contract addresses for each.

Debugging Common Issues

"Policies show as unverified" → Origin mismatch. Check that config.origin matches the domain your app is served from (without protocol). If using wildcards, remember *.example.com does NOT match example.com.

"Preset policies not loading" → Check that the preset name in your Controller constructor matches the directory name in the presets repo exactly. The config is fetched from CDN at https://static.cartridge.gg/presets/<name>/config.json.

"Wrong policies for my chain" → Policies are selected by chain ID at runtime. Verify the chain ID in your config matches what your RPC returns. Use SN_MAIN/SN_SEPOLIA, not hex chain IDs.

"Paymaster not sponsoring on mainnet" → Sepolia is auto-sponsored. Mainnet requires creating a Cartridge paymaster, funding it, and adding matching policies. See cartridge-paymaster skill.

"AASA validation failing" → Team ID must be exactly 10 uppercase alphanumeric chars. Bundle ID must be reverse DNS. Pattern: ABCDE12345.com.example.app.

"CI warns about approve entrypoint" → This is intentional — approve is flagged as a security concern. If your game genuinely needs ERC20 approval, the warning is acceptable but will require reviewer acknowledgment.

平台分布

Codex

40.37%
按下载量换算131

Claude

28.72%
按下载量换算93

Cursor

17.61%
按下载量换算57

Gemini CLI

9.47%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills