patternslisted
Install: claude install-skill V-Songbird/claude-plugins
# Iceberg Patterns
## What this does
Bias toward senior-authored code patterns on any code-writing task so the output is easier for junior readers and AI agents to maintain. Produce inline code that leans these patterns; do not propose enforcement infrastructure, ADRs, or audit reports. For that, the companion `convention` skill runs in Audit/Bootstrap/Authoring modes.
## Step 0 — Detect surrounding conventions (MUST run before generating code)
Before applying any pattern below, MUST detect the surrounding conventions:
1. MUST invoke `Glob` with `pattern` resolved from the target file's parent directory and primary extension. Derive `<target-file-parent>` from the path of the file the user asked to write/modify; derive `<ext>` from the detected language. Example: target `src/features/auth/login.ts` in a TypeScript project → `pattern: "src/features/auth/**/*.{ts,tsx}"`. Python target → `pattern: "<parent>/**/*.py"`. Emit the resolved pattern in the tool call — NEVER pass literal angle brackets.
2. MUST invoke `Grep` in parallel for each detection probe — every call uses `output_mode: "count"`:
| Signal | `pattern` | Typical `glob` |
|---|---|---|
| Branded type (TS) | `__brand:` | `**/*.{ts,tsx}` |
| Sealed/union (Kotlin/Scala) | `sealed (class\|interface\|trait)` | `**/*.{kt,scala}` |
| Discriminated union (TS) | `\| \{ status:` | `**/*.{ts,tsx}` |
| FSM | `createMachine\|useReducer\|typestate` | (language-appropriate) |
| Raw-scalar domain signature | `function \w+\([a