{"id":"new-cask","name":"new-cask","summary":"このスキルは、「ホームブルーに樽を追加する」「ホームブルーの樽を作成」「ホームブルーにアプリを追加する」「新しい樽を用意する」「ホームブルー用の樽をパッケージ化する」「homebrew-caskに提出する」「樽を作る」「樽を寄付する」、またはmacOSアプリケーションをパッケージ化したい場合に使うべきです。","body":"# Creating a New Homebrew Cask\n\nYou are orchestrating the creation of a new Homebrew cask. This skill coordinates multiple specialist agents and scripts to complete the workflow.\n\n**IMPORTANT:** This skill runs in the main conversation context. You will use the Task tool to spawn agents for specialized work.\n\n## Input\n\n**URL provided:** $ARGUMENTS\n\nIf no URL was provided, ask the user for:\n1. The app name, OR\n2. A download URL (direct link to DMG/ZIP), OR\n3. The product homepage (you'll find the download link)\n\n## Workflow Overview\n\n```\n1. Pre-flight checks    → Agent: pre-flight-checker\n2. Download & inspect   → Agent: app-inspector\n3. Livecheck strategy   → Agent: livecheck-advisor\n4. Write cask file      → Agent: cask-writer\n5. Testing              → Automated tests, install, createzap, uninstall\n6. Submit PR            → Agent: pr-submitter\n```\n\n**Create a task list** to track progress through these steps.\n\n## Step-by-Step Execution\n\n### Step 1: Pre-flight Checks\n\nBefore investing time, verify the app is suitable:\n\n```\nUse the Task tool:\n- subagent_type: homebrew:pre-flight-checker\n- prompt: Check if this app is suitable for homebrew-cask submission.\n  <include whatever info you have: URL, app name, homepage>\n```\n\nThe agent will derive any missing info (app name from URL, homepage via search, etc.) and include it in the output.\n\n**Capture from output:** App name, homepage, download URL, description - you'll need these for later steps.\n\n**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.\n\n### Step 2: Download and Inspect\n\nDownload and inspect the app in one step:\n\n```\nUse the Task tool:\n- subagent_type: homebrew:app-inspector\n- prompt: Download and inspect the app.\n  Download URL: <url>\n  Homepage: <homepage>\n```\n\nThe agent will download the file, compute the SHA256, extract all metadata, and run Homebrew's `generate_cask_token` tool to get the canonical token.\n\n**Capture from output:** Suggested token, SHA256, version, bundle ID, app name, min macOS, auto-update info (framework, appcast URL if found), architecture.\n\n**Use the suggested token** from app-inspector for subsequent steps. This token comes from Homebrew's tooling and handles naming conventions and collision detection.\n\n**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.\n\n### Step 3: Livecheck Strategy\n\nDetermine how to check for updates:\n\n```\nUse the Task tool:\n- subagent_type: homebrew:livecheck-advisor\n- prompt: Recommend a livecheck strategy for <app-name>.\n  Download URL: <url>\n  Homepage: <homepage>\n  Update URL: <appcast-or-feed-url-if-found>\n  Current version: <version>\n```\n\nGet the recommended livecheck block.\n\n### Step 4: Write the Cask\n\nSynthesize everything into a cask file:\n\n```\nUse the Task tool:\n- subagent_type: homebrew:cask-writer\n- prompt: Write a cask for <app-name> with this metadata:\n  Token: <token>\n  Version: <version>\n  URL: <download-url>\n  SHA256: <checksum> (or :no_check if unversioned URL)\n  (If separate binaries per architecture, provide URL and SHA256 for each)\n  Name: <display-name>\n  Description: <one-line-desc>\n  Homepage: <homepage>\n  Bundle ID: <bundle-id>\n  App bundle: <app-name>.app\n  Min macOS: <min-version>\n  Auto-updates: <yes/no>\n  Livecheck: <livecheck-block>\n  Architecture: <arm64/intel/universal, only if not universal>\n```\n\n**Note:** The zap stanza is added later after running createzap during testing.\n\n### Step 5: Testing\n\n#### Automated Tests\n\nRun the validation script:\n\n```bash\n${CLAUDE_PLUGIN_ROOT}/scripts/test-cask.sh \"<token>\"\n```\n\nIf tests fail, review the output, fix the cask (often `brew style --fix` handles style issues), and re-run.\n\n**For unversioned URLs:** Use `--skip-livecheck` flag.\n\n#### Install and Validate\n\n1. **Install:**\n   ```bash\n   HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <token>\n   ```\n\n2. **Launch:**\n   ```bash\n   open -a \"<App Name>\"\n   ```\n\n3. **User verification:** Ask the user to sign in or set up the app if needed, then confirm when done.\n\n#### Zap Discovery\n\n4. **Run createzap** (try both app name and bundle ID):\n   ```bash\n   brew tap nrlquaker/createzap 2>/dev/null || true\n   brew createzap \"<App Name>\"\n   brew createzap \"<bundle-id>\"\n   ```\n\n5. **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.\n\n6. **Uninstall:**\n   ```bash\n   brew uninstall --cask <token>\n   ```\n\n7. **Re-run automated tests** if zap stanza was added.\n\n### Step 6: Submit PR\n\nWhen ready to submit:\n\n```\nUse the Task tool:\n- subagent_type: homebrew:pr-submitter\n- prompt: Submit a PR for the <token> cask.\n  Version: <version>\n  Cask path: <path-to-cask-file>\n  All tests passed: yes\n```\n\n## Error Recovery\n\nIf any step fails:\n- The task list shows which steps completed\n- You can resume from the failed step\n- Agent outputs are preserved in conversation history\n\n## Reference Documentation\n\nFor detailed guidance, agents can read these docs (at `/opt/homebrew/docs/`):\n- `Acceptable-Casks.md` - What's allowed\n- `Cask-Cookbook.md` - Stanza reference\n- `Brew-Livecheck.md` - Livecheck strategies\n- `Adding-Software-to-Homebrew.md` - Contribution process\n\n## Scripts Location\n\nScripts are at `${CLAUDE_PLUGIN_ROOT}/scripts/`:\n- `download-checksum.sh <url> [filename]` - Download and SHA256\n- `test-cask.sh <token> [--skip-livecheck]` - Run audit/style/livecheck","author":"@malob","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/malob/nix-config/tree/master/configs/claude/plugins/homebrew/skills/new-cask","license":"MIT","category":"writing","lang":"en","tokens":1463,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":["Read","Grep","Glob","WebFetch","WebSearch","Bash(brew *)","Bash(gh *)","Bash(curl *)","Bash(hdiutil *)","Bash(defaults read *)","Bash(shasum *)","Bash(git *)","Bash(plutil *)","Bash(file *)","Bash(lipo *)","Bash(ls *)","Bash(find *)","Bash(strings *)","Bash(unzip *)","Bash(open *)","Bash(${CLAUDE_PLUGIN_ROOT}/scripts/*)"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}