linter-driven-development
WHEN: User requests Go code work (implement, fix, add, refactor) or mentions @ldd in a Go project. Orchestrates complete workflow (Phases 1-5): design → test → implement → lint → fix → documentation. Auto-triggers parallel quality analysis and iterative fix loop until code is commit-ready.
What this skill does
<objective>
Meta orchestrator for Go implementation workflow: design → test → lint → refactor → review → commit.
Use for any commit: features, bug fixes, refactors.
**Reference**: See `reference.md` for agent prompt templates, example reports, and output formats.
</objective>
<essential_principles>
**Auto-Pilot Behavior**: This skill triggers automatically when Go code work is detected. After permission is granted, announce: **"Using go-ldd workflow for this Go code work"** and proceed to pre-flight check.
**Trigger Conditions**:
- User requests Go code work (implement, fix, add, refactor, update, change, modify, etc.)
- User mentions "ldd" or "@ldd" (shorthand for linter-driven-development)
- Working directory contains Go project (go.mod or .go files)
</essential_principles>
<skill_invocation>
**CRITICAL**: When this skill says "Invoke @skill-name" or routes to "@skill-name", you MUST use the **Skill tool** explicitly.
| Notation | Skill Tool Call |
|----------|-----------------|
| @code-designing | `Skill(go-linter-driven-development:code-designing)` |
| @testing | `Skill(go-linter-driven-development:testing)` |
| @refactoring | `Skill(go-linter-driven-development:refactoring)` |
| @documentation | `Skill(go-linter-driven-development:documentation)` |
**DO NOT** just reference the skill in your response - actually invoke it using the Skill tool.
**DO NOT** read the skill file directly - use the Skill tool to load and execute it.
Example: When Phase 1 says "Invoke @testing skill to WRITE tests", you must call:
```
Skill(go-linter-driven-development:testing)
```
</skill_invocation>
<quick_start>
**Immediate Action**: Run Pre-Flight Check, then execute phases sequentially until commit-ready.
1. **Pre-Flight**: Verify Go project, find test/lint commands, identify plan context
2. **Phase 1**: Design types (if needed) → Write tests → Implement code
3. **Phase 2**: Run quality-analyzer agent → Route based on status
4. **Phase 3**: Fix loop until CLEAN_STATE
5. **Phase 4**: Documentation
6. **Phase 5**: Present commit summary with options
</quick_start>
<workflow>
<pre_flight_check>
**ALWAYS RUN FIRST**
<step name="confirm_intent">
Look for keywords: "implement", "ready", "execute", "do", "start", "continue", "next", "build", "create", "step 1", "task 2", or explicit "@linter-driven-development", "@ldd", "ldd"
</step>
<step name="verify_go_project">
Check that `go.mod` exists in the project root or parent directories.
</step>
<step name="find_commands">
**Search locations** (in order):
1. Project docs: `README.md`, `CLAUDE.md`, `agents.md`
2. Build configs: `Makefile`, `Taskfile.yaml`, `.golangci.yaml`
3. Git repository root for workspace-level commands
**Extract commands**:
- **Test command**: `go test`, `make test`, `task test`
- **Lint command**: `golangci-lint run --fix`, `make lint`, `task lintwithfix`
- **Fallbacks**: `go test ./...` and `golangci-lint run --fix`
</step>
<step name="identify_plan">
Scan conversation history (last 50 messages) for step-by-step plan and which step to implement.
</step>
<decision_tree>
<decision condition="All conditions met" action="Announce 'Engaging autopilot mode for [description]' → Phase 1" />
<decision condition="Unclear intent" action="Ask for confirmation" />
<decision condition="No plan found" action="Suggest creating plan first (offer @code-designing)" />
<decision condition="Not Go project" action="Explain limitation" />
</decision_tree>
</pre_flight_check>
<phase name="1" title="Implementation Foundation">
**Design Architecture** (if new types/functions needed):
- Invoke @code-designing skill
- Output: Type design plan with self-validating domain types
**Write Tests First** (MANDATORY):
- Invoke @testing skill to WRITE tests (not just guidance)
- Create test files for all new types/functions
- Write table-driven tests or testify suites
- Target: 100% coverage on new leaf types
**Implement Code**:
- Follow coding principles from coding_rules.md
- Keep functions <50 LOC, max 2 nesting levels
- Use self-validating types, prevent primitive obsession
**Test Verification** (before proceeding):
1. For each new type file created:
- Verify corresponding `*_test.go` exists
- Run: `go test -cover ./path/to/package`
- Verify: coverage > 0% (tests actually exercise code)
2. For leaf types: warn if coverage < 80%
**GATE**: DO NOT proceed to Phase 2 until:
- [ ] Test files exist for all new types
- [ ] `go test -cover` shows > 0% coverage for new packages
- [ ] No "no test files" or "[no tests to run]" messages
</phase>
<phase name="2" title="Quality Analysis">
**Invoke quality-analyzer agent** for parallel quality analysis.
See `reference.md` → "Agent Prompt Templates" for full prompt.
The agent automatically:
- Executes tests, linter, and code review in parallel (40-50% faster)
- Identifies overlapping issues with root cause analysis
- Returns structured report with prioritized fixes
<routing>
<route status="TEST_FAILURE" action="Enter Test Focus Mode (fix tests, retry)" />
<route status="CLEAN_STATE" action="Skip to Phase 4 (Documentation)" />
<route status="ISSUES_FOUND" action="Continue to Phase 3 (Fix Loop)" />
<route status="TOOLS_UNAVAILABLE" action="Report error, ask user to install tools" />
</routing>
<test_focus_mode>
Loop until tests pass:
1. Analyze failure root cause
2. Apply fix to implementation or tests
3. Re-run quality-analyzer (mode: "full")
4. Check status → continue or exit loop
Max 10 iterations. If stuck, ask user for guidance.
</test_focus_mode>
</phase>
<phase name="3" title="Iterative Fix Loop">
<linter_skill_routing>
**Linter Error → Skill Routing Table**
Route linter failures to the correct skill based on error type:
| Linter Error | Route To | Pattern Priority |
|--------------|----------|------------------|
| `nestif` (deep nesting) | @refactoring | 1. Storify, 2. Early returns, 3. Extract function |
| `argument-limit` (>4 params) | @code-designing | Create options struct type |
| `function-result-limit` (>3 returns) | @code-designing | Create result type |
| `confusing-results` | @code-designing | Create named result type |
| `cyclop`/`gocognit` (complexity) | @refactoring | 1. Storifying, 2. Extract type |
| `funlen` (function too long) | @refactoring | 1. Storify, 2. Extract function |
| `wrapcheck` (unwrapped error) | Direct fix | `fmt.Errorf("context: %w", err)` |
| `varnamelen` (short var name) | Direct fix | Rename variable to be descriptive |
| `early-return` (revive) | @refactoring | Apply early return pattern |
| `file-length-limit` (revive) | Analyze first → route | See file-level concerns below |
| **`package-size` hook RED (≥13 `.go` files)** | **@refactoring** | **`<package_decomposition>` 3-step design review — BLOCKING, decompose before next file** |
| **`package-size` hook YELLOW (8–12 `.go` files)** | **@refactoring** | **`<package_decomposition>` 3-step design review — *before* adding the next `.go` file to that package** |
**Package-size is a first-class linter failure.** The PostToolUse hook (`hooks/check-package-sizes.sh`) fires after every `Write`/`Edit`/`MultiEdit` and surfaces violations directly to Claude. Treat its output exactly like any other linter row above:
- ⛔ RED banner → exit 2 from the hook → blocking; route to `@refactoring` and complete `<package_decomposition>` *before* any other fix or feature step lands. Insert decomposition tasks at the front of the active todo list.
- ⚠️ YELLOW banner → non-blocking; if the *next* planned step adds a `.go` file to the named package, do `<package_decomposition>` first instead of writing the file. Skip otherwise.
Decomposition lands in its own commit (often its own PR). Do not mix package moves with feature changes.
**File-Level Concerns** (`file-length-limit` triggers at >450 lines):
When files exceed the limit, analyze structure first:
| File Pattern | Route To | Pattern |
|--------------|----------|---------|
| Multiple juicy types in one file | @code-designing | **JuRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.