phoenix-code-review
Reviews Phoenix code for controller patterns, context boundaries, routing, and plugs. Use when reviewing Phoenix apps, checking controllers, routers, or context modules.
What this skill does
# Phoenix Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | Bounded contexts, Ecto integration | [references/contexts.md](references/contexts.md) | | Actions, params, error handling | [references/controllers.md](references/controllers.md) | | Pipelines, scopes, verified routes | [references/routing.md](references/routing.md) | | Custom plugs, authentication | [references/plugs.md](references/plugs.md) | ## Review Checklist ### Controllers - [ ] Business logic in contexts, not controllers - [ ] Controllers return proper HTTP status codes - [ ] Action clauses handle all expected patterns - [ ] Fallback controllers handle errors consistently ### Contexts - [ ] Contexts are bounded by domain, not technical layer - [ ] Public functions have clear, domain-focused names - [ ] Changesets validate all user input - [ ] No Ecto queries in controllers ### Routing - [ ] Verified routes (~p sigil) used, not string paths - [ ] Pipelines group related plugs - [ ] Resources use only needed actions - [ ] Scopes group related routes ### Plugs - [ ] Authentication/authorization via plugs - [ ] Plugs are composable and single-purpose - [ ] Halt called after sending response in plugs ### JSON APIs - [ ] Proper content negotiation - [ ] Consistent error response format - [ ] Pagination for list endpoints ## Valid Patterns (Do NOT Flag) - **Controller calling multiple contexts** - Valid for orchestration - **Inline Ecto query in context** - Context owns its data access - **Using `action_fallback`** - Centralized error handling pattern - **Multiple pipelines per route** - Composition is intentional - **`Plug.Conn.halt/1` without send** - May be handled by fallback ## Context-Sensitive Rules | Issue | Flag ONLY IF | |-------|--------------| | Missing changeset validation | Field accepts user input AND no validation exists | | Controller too large | More than 7 actions OR actions > 20 lines | | Missing authorization | Route is not public AND no auth plug in pipeline | ## Gates (run in order; each step has a pass condition) 1. **Anchored evidence** — For every planned finding, open the source and note **file path + line number** from that read (not from memory or diff snippets alone). **Pass:** each finding cites `path:line` that you opened. 2. **“Handled elsewhere” sweep** — Before reporting “missing validation,” “missing auth,” or “wrong status,” search the router (pipelines/scopes), controller (`action_fallback`, `plug`), and relevant context for existing checks. **Pass:** you recorded whether handling exists elsewhere (yes + where, or no after search). 3. **Verification protocol** — Load and apply [review-verification-protocol](../review-verification-protocol/SKILL.md) for the issue type. **Pass:** that skill’s pre-report checks for that finding class are satisfied before you write the finding. 4. **Finding shape** — Emit each issue as `[FILE:LINE] ISSUE_TITLE` with a one-line rationale tied to the cited code. **Pass:** every line matches that pattern. ## Before Submitting Findings Do not report until **Gates** above pass. For full anti-false-positive steps, follow [review-verification-protocol](../review-verification-protocol/SKILL.md).
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.