- name
SKILL.md
技能文件保留在发布者的仓库中。
在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add malob/nix-config --skill new-cask -a cursor -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add malob/nix-config --skill new-cask -a claude-code -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add malob/nix-config --skill new-cask -a codex -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add malob/nix-config --skill new-cask -a grok -y在 Grok Bot 聊天中发送复制的消息。Bot 会从 GitHub 获取这个 SKILL.md,并添加到你所有 Bot 共享的技能中。
Install this skill: https://github.com/malob/nix-config/tree/HEAD/configs/claude/plugins/homebrew/skills/new-cask来自发布者
You are orchestrating the creation of a new Homebrew cask. This skill coordinates multiple specialist agents and scripts to complete the workflow.
IMPORTANT: This skill runs in the main conversation context. You will use the Task tool to spawn agents for specialized work.
URL provided: $ARGUMENTS
If no URL was provided, ask the user for:
1. Pre-flight checks → Agent: pre-flight-checker
2. Download & inspect → Agent: app-inspector
3. Livecheck strategy → Agent: livecheck-advisor
4. Write cask file → Agent: cask-writer
5. Testing → Automated tests, install, createzap, uninstall
6. Submit PR → Agent: pr-submitter
Create a task list to track progress through these steps.
Before investing time, verify the app is suitable:
Use the Task tool:
- subagent_type: homebrew:pre-flight-checker
- prompt: Check if this app is suitable for homebrew-cask submission.
<include whatever info you have: URL, app name, homepage>
The agent will derive any missing info (app name from URL, homepage via search, etc.) and include it in the output.
Capture from output: App name, homepage, download URL, description - you'll need these for later steps.
Decision point: If the agent returns REJECT, stop and explain why to the user. If CAUTION, inform the user and ask if they want to proceed.
Download and inspect the app in one step:
Use the Task tool:
- subagent_type: homebrew:app-inspector
- prompt: Download and inspect the app.
Download URL: <url>
Homepage: <homepage>
The agent will download the file, compute the SHA256, extract all metadata, and run Homebrew's generate_cask_token tool to get the canonical token.
Capture from output: Suggested token, SHA256, version, bundle ID, app name, min macOS, auto-update info (framework, appcast URL if found), architecture.
Use the suggested token from app-inspector for subsequent steps. This token comes from Homebrew's tooling and handles naming conventions and collision detection.
Note on versioned URLs: If the download URL is unversioned (e.g., App.dmg), the livecheck-advisor may find a versioned URL in an appcast, release feed, or other source. If so, you'll need to re-download using the versioned URL to get the correct SHA256.
Determine how to check for updates:
Use the Task tool:
- subagent_type: homebrew:livecheck-advisor
- prompt: Recommend a livecheck strategy for <app-name>.
Download URL: <url>
Homepage: <homepage>
Update URL: <appcast-or-feed-url-if-found>
Current version: <version>
Get the recommended livecheck block.
Synthesize everything into a cask file:
Use the Task tool:
- subagent_type: homebrew:cask-writer
- prompt: Write a cask for <app-name> with this metadata:
Token: <token>
Version: <version>
URL: <download-url>
SHA256: <checksum> (or :no_check if unversioned URL)
(If separate binaries per architecture, provide URL and SHA256 for each)
Name: <display-name>
Description: <one-line-desc>
Homepage: <homepage>
Bundle ID: <bundle-id>
App bundle: <app-name>.app
Min macOS: <min-version>
Auto-updates: <yes/no>
Livecheck: <livecheck-block>
Architecture: <arm64/intel/universal, only if not universal>
Note: The zap stanza is added later after running createzap during testing.
Run the validation script:
${CLAUDE_PLUGIN_ROOT}/scripts/test-cask.sh "<token>"
If tests fail, review the output, fix the cask (often brew style --fix handles style issues), and re-run.
For unversioned URLs: Use --skip-livecheck flag.
Install:
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <token>
Launch:
open -a "<App Name>"
User verification: Ask the user to sign in or set up the app if needed, then confirm when done.
Run createzap (try both app name and bundle ID):
brew tap nrlquaker/createzap 2>/dev/null || true
brew createzap "<App Name>"
brew createzap "<bundle-id>"
Update the cask - Add the discovered zap paths using the Edit tool. For simple additions you can edit directly; for significant changes, re-invoke the cask-writer agent.
Uninstall:
brew uninstall --cask <token>
Re-run automated tests if zap stanza was added.
When ready to submit:
Use the Task tool:
- subagent_type: homebrew:pr-submitter
- prompt: Submit a PR for the <token> cask.
Version: <version>
Cask path: <path-to-cask-file>
All tests passed: yes
If any step fails:
For detailed guidance, agents can read these docs (at /opt/homebrew/docs/):
Acceptable-Casks.md - What's allowedCask-Cookbook.md - Stanza referenceBrew-Livecheck.md - Livecheck strategiesAdding-Software-to-Homebrew.md - Contribution processScripts are at ${CLAUDE_PLUGIN_ROOT}/scripts/:
download-checksum.sh <url> [filename] - Download and SHA256test-cask.sh <token> [--skip-livecheck] - Run audit/style/livecheck>-
---name: new-caskdescription: >----# configs/claude/plugins/homebrew/skills/new-cask/SKILL.md常见问题
从发布者处下载 configs/claude/plugins/homebrew/skills/new-cask/SKILL.md,或复制路径后打开仓库。PlugMCP 只收录该技能,不托管文件。
发布者将它存放在 https://github.com/malob/nix-config。
Claude、Cursor、Codex 和 Grok Build 可以读取你从发布者仓库添加的 SKILL.md。在聊天中发送技能的 GitHub 文件夹链接,Grok Bot 就会安装它。