# Remove Single Use Functions

> Safe inlining and removal of single-use functions during code review and refactoring. Use when a local, non-exported helper has exactly one real call site and inlining preserves behaviour and readability.

- Skill: `timmo001/remove-single-use-functions` (Agent Skill)
- Install (CLI): `npx skillmds@latest add timmo001/remove-single-use-functions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/timmo001/remove-single-use-functions/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: timmo001 (https://skillmd.com/u/timmo001)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/timmo001/remove-single-use-functions

---


# Remove Single-Use Functions

Use this skill when reviewing or editing cleanup/refactor changes that inline and remove functions used exactly once:

- The function must be local and non-exported.
- The function must have exactly one real call site after the current change set is applied.
- Preserve runtime behavior, types, and existing style.
- Skip public APIs, framework hooks, callbacks, overloaded or generic utilities, and test helpers kept for readability.
- Safe cleanup means inlining the function at its sole call site and then removing the original function definition.
- Do not introduce `any`.
- Do not use the non-null assertion operator (`!`).
- Do not add unnecessary comments or abstractions.

