← ClaudeAtlas

patternslisted

Senior-authored code patterns applied during code-writing, code-modifying, and refactoring tasks — branded/nominal types for domain identifiers, discriminated unions over optional-field records, finite state machines over boolean tuples, pure functions separated from I/O, explicit validation boundaries, exhaustive matching, sync-looking APIs, named call sites, no silent catches, no raw console logs. Adapts to surrounding codebase conventions first, then leans toward these patterns within the scope of the current change. Produces inline code only — does not generate ADRs, PR templates, lint configs, or audit reports.
V-Songbird/claude-plugins · ★ 0 · Code & Development · score 75
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