Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill opt-in-tool-registration -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/opt-in-tool-registration/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/opt-in-tool-registration/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set121

The whole set →
swarm-pr-review The swarm-pr-review skill for Claude Code and Codex is a thin adapter for swarm pull request reviews that delegates execution to the canonical workflow in .opencode. CX Codex +1 ★ 539repo stars spread-real-module-exports-as-base-of-every-mock-module-return-o spread-real-module-exports-as-base-of-every-mock-module-return-o is a Claude Code skill that sets a pattern for objects returned by mock.module. It activates around that pattern and Node’s built-in mocking. CX Codex +1 ★ 539repo stars gate-attribution gate-attribution sets the rule that keeps reviewer and test_engineer checks attributable: one taskId per dispatch, with lanes run in parallel to save overhead. CX Codex +1 ★ 539repo stars swarm-implement Adapts the canonical opencode-swarm implementation workflow for multi-file features, refactoring, and structured validation. CX Codex +1 ★ 539repo stars ensure-all-tests-pass-after-code-changes ensure-all-tests-pass-after-code-changes — a skill that keeps the agent honest about tests: run them after an edit, and don't hand a failing branch to review. Test updates ship with the code. CX Codex +1 ★ 539repo stars codebase-review-swarm codebase-review-swarm executes quote-grounded codebase audits across security, QA, and performance. Suitable for full-repository assessments where no source files may be touched. CX Codex +1 ★ 539repo stars add-path-type-assertions-or-realpath-resolve-calls-in-path-joini add-path-type-assertions-or-realpath-resolve-calls-in-path-joini is a Claude Code skill that adds path-type checks or realpath/resolve calls to path-joining utilities. It activates around path.join, realpath, and fs path work. CX Codex +1 ★ 539repo stars run-failing-tests-immediately-after-test-gate-failure run-failing-tests-immediately-after-test-gate-failure is a Claude Code skill that makes the agent rerun failing tests when test_gate fails and repair the root cause before claiming the task is done. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open