# Debug Menu

Generates a developer debug menu with feature flag toggles, environment switching...

- Repository: https://github.com/rshankras/claude-code-apple-skills (846 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-07-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rshankras/claude-code-apple-skills --skill debug-menu -g -a claude-code -y`
Codex: `npx skills add rshankras/claude-code-apple-skills --skill debug-menu -g -a codex -y`
Cursor: `npx skills add rshankras/claude-code-apple-skills --skill debug-menu -g -a cursor -y`
Gemini CLI: `npx skills add rshankras/claude-code-apple-skills --skill debug-menu -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rshankras/claude-code-apple-skills`

## Description

Generates a developer debug menu with feature flag toggles, environment switching, network log viewer, cache clearing, crash trigger, and diagnostic info export. Only included in DEBUG builds. Use when user wants a debug panel, dev tools menu, or shake-to-debug functionality.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Debug Menu Generator

Generate a comprehensive developer debug menu accessible via shake gesture or hidden tap. Includes feature flag toggles, environment switching, network log viewer, cache clearing, crash trigger, and diagnostic info export. All code is wrapped in `#if DEBUG` so it never ships to production.

## When This Skill Activates

Use this skill when the user:
- Asks for a "debug menu" or "developer menu"
- Wants "dev tools" or a "debug panel"
- Mentions "shake to debug" or "diagnostic menu"
- Wants to "toggle feature flags" from the app
- Asks about "environment switching" (dev/staging/production)
- Wants a "network log viewer" in the app

## Pre-Generation Checks

### 1. Project Context Detection
- [ ] Check deployment target (iOS 17+ / macOS 14+ required for @Observable)
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Identify source file locations and project structure

### 2. Conflict Detection
Search for existing debug/dev menu code:
```
Glob: **/*Debug*Menu*.swift, **/*DevMenu*.swift, **/*DevTools*.swift, **/*DebugPanel*.swift
Grep: "DebugMenu" or "DevMenu" or "motionEnded" or "shake" in *.swift
```

If existing debug menu found:
- Ask if user wants to replace or extend it
- If extending, integrate new sections into existing structure

### 3. Feature Flags Detection
Search for existing feature flag setup:
```
Glob: **/*FeatureFlag*.swift, **/*Feature*Toggle*.swift
Grep: "FeatureFlag" or "featureFlag" or "isFeatureEnabled"
```

If found, integrate debug menu toggles with existing feature flag system rather than creating a new one.

## Configuration Questions

Ask user via AskUserQuestion:

1. **Access method?**
   - Shake gesture (shake device to open)
   - Hidden tap (5-tap on a hidden area)
   - Both (shake + hidden tap) -- recommended

The rest: https://github.com/rshankras/claude-code-apple-skills/blob/HEAD/skills/generators/debug-menu/SKILL.md
