# Widen Return Type

> widen return type

- Skill: `zaxbysauce/widen-return-type` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zaxbysauce/widen-return-type`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zaxbysauce/widen-return-type/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zaxbysauce (https://skillmd.com/u/zaxbysauce)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zaxbysauce/widen-return-type

---


<!-- generated by opencode-swarm skill-generator. Do not edit by hand; edits will be preserved on regeneration only with controlled update mode. -->

# widen return type

## Trigger

- widen return type
- opt-in tool map
- feature flag gating
- tool registration

## Required Procedure

- use TypeScript overloads to preserve narrow return types when widening a function's return type for extensibility
- mirror existing opt-in pattern: separate tool map constant, conditional merge in agents/index.ts, gating tests verifying disabled and enabled states

## Forbidden Shortcuts

- 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/widen-return-type/SKILL.md
```

## Reviewer Checks

- Verify each required action above appears in the diff.</item>

