opt-in-tool-registration — Claude Code skill for tool gating
The opt-in-tool-registration skill sets a pattern for registering opt-in tools through a separate map and conditional merging in agents/index.ts. Use it when adding a feature controlled by a flag.
MIT ★ 539 updated 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a claude-codeWhat opt-in-tool-registration does
The skill calls for following the existing opt-in pattern: keep the relevant tools in a separate map constant, then merge that map into the registration in agents/index.ts only when the feature flag allows it. This ties tool availability to the flag.
Tests should cover both flag states. The skill rules out separate verdict allowlists in evidence-writer modules and custom gating mechanisms. When delegating related work, pass the subagent the path file:.opencode/skills/generated/opt-in-tool-registration/SKILL.md.
What it helps with
- gate tool registration behind a feature flag
- keep opt-in tools in a separate map
- test registration with the flag on and off
- avoid separate allowlists in evidence-writer modules
Example prompts for the agent
- Register this tool behind a feature flag using the existing pattern in
agents/index.ts. - Add tests for both flag states and check that the forbidden shortcut is not used.
- Delegate this task and include
file:.opencode/skills/generated/opt-in-tool-registration/SKILL.md.
How to install opt-in-tool-registration
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a claude-code2Manually: put the files in place
~/.claude/skills/opt-in-tool-registration/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/opt-in-tool-registration/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a codex2Manually: put the files in place
.agents/skills/opt-in-tool-registration/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a cursor2Manually: put the files in place
.cursor/skills/opt-in-tool-registration/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .opencode/skills/generated/opt-in-tool-registration2Manually: put the files in place
.github/skills/opt-in-tool-registration/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .opencode/skills/generated/opt-in-tool-registrationManually: put the files in place
.devin/skills/opt-in-tool-registration/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about opt-in-tool-registration
How do I install opt-in-tool-registration in Claude Code?
Run npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a claude-code. The skill file is at ~/.claude/skills/opt-in-tool-registration/SKILL.md.
What does opt-in-tool-registration do?
It defines a registration pattern for opt-in tools: a dedicated map, conditional merging in agents/index.ts, and tests for both feature-flag states.
Which tests should cover opt-in-tool-registration?
Test the behavior with the condition disabled and enabled. Also check that the disallowed alternative is not used.
Source text
SKILL.md · MIT
--- name: opt-in-tool-registration description: opt-in-tool-registration metadata: triggers: '["opt-in tool map","feature flag gating","tool registration"]' generated_from_knowledge: '[]' source_knowledge_ids: '[]' generated_at: "2026-07-02T02:35:50.021Z" confidence: "0.60" status: active version: "6" skill_origin: generated --- <!-- generated by opencode-swarm skill-generator. Do not edit by hand; edits will be preserved on regeneration only with controlled update mode. --> # opt-in-tool-registration ## Trigger - opt-in tool map - feature flag gating - tool registration ## Required Procedure - mirror existing opt-in pattern: separate tool map constant, conditional merge in agents/index.ts, gating tests verifying disabled and enabled states ## Forbidden Shortcuts - maintain independent verdict allowlists in individual evidence-writer modules - invent new tool-gating mechanisms for opt-in feature flags ## Delegation Template When delegating a task affected by this skill, include: ``` SKILLS: file:.opencode/skills/generated/opt-in-tool-registration/SKILL.md ``` ## Reviewer Checks - (none recorded beyond the required procedure above) ## Test Engineer Checks - Add or update tests covering the trigger condition and the forbidden shortcut.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm