phx-quick

$npx mdskill add oliver-kriska/claude-elixir-phoenix/phx-quick

Quickly implement small Phoenix changes without planning

  • Automatically adds validations and updates routes in Phoenix applications.
  • Deploys code directly to the application using `phx-quick` commands.
  • Ensures quick verification through a single compile check after each change.
  • Delivers working code with minimal ceremony, adhering to security rules.

SKILL.md

.github/skills/phx-quickView on GitHub ↗
---
name: phx-quick
description: Implement small Phoenix changes without planning — add validations, update
  routes, fix components, create migrations. Use for single-file edits under 50 lines.
---

# Quick Mode

Skip the planning ceremony. Get working code fast.

## Usage

```bash
phx-quick Add pagination to posts
phx-quick Fix the login redirect bug
phx-quick Add CSV export to reports
```

## Arguments

`$ARGUMENTS` = What to implement

## How It Differs

| Normal Mode | Quick Mode |
|-------------|------------|
| Spawn research agents | No agents |
| Create plan document | Mental model only |
| Parallel review | Optional single review |
| Multiple iterations | Single pass |

## Workflow

1. **Understand** - Read relevant files (max 3)
2. **Implement** - Write code directly
3. **Verify** - Quick compile check
4. **Done** - No ceremony

## Iron Laws

1. **NEVER skip verification** — run `mix compile --warnings-as-errors` after every change, even in quick mode
2. **DO NOT touch files outside the stated scope** — quick mode means minimal blast radius; if a fix requires changes across multiple domains, escalate to `phx-plan`
3. **NEVER bypass security checks for speed** — auth, input validation, and XSS rules apply regardless of change size

## Rules in Quick Mode

### Still Enforced (Iron Laws)

- ✓ No process without runtime reason
- ✓ No DB in mount
- ✓ Security basics (no SQL injection, etc.)
- ✓ Run `mix format`

### Skipped

- ✗ Parallel agent research
- ✗ Written plan document
- ✗ Multiple review passes
- ✗ Documentation updates

## When to Use

**Good for:**

- Bug fixes with clear solution
- Small features (<100 lines)
- Refactoring with tests
- Adding fields/columns
- UI tweaks

**Not for:**

- New authentication flows
- Payment integration
- Data migrations
- Architectural changes
- Anything touching security

## Quick Patterns

### Add Field

```bash
/quick Add phone field to users
```

→ Migration + schema + changeset + form field

### Fix Bug

```bash
/quick Fix: posts not showing for admin users
```

→ Find issue + fix + verify

### Add Endpoint

```bash
/quick Add GET /api/health endpoint
```

→ Route + controller + response

## Escape Hatch

If quick mode hits complexity:

```
This needs more planning. Switching to normal mode.
Run phx-plan [task] for full analysis.
```

## Verification

After quick implementation:

Run `mix compile --warnings-as-errors`. If you touched Ecto schemas or migrations,
run `mix ecto.migrate`. Then run `mix test test/path_test.exs` for affected tests.

## Example Session

```
User: phx-quick Add archived_at timestamp to posts

Claude:
1. Reading lib/my_app/blog/post.ex...
2. Creating migration...

# priv/repo/migrations/xxx_add_archived_at_to_posts.exs
def change do
  alter table(:posts) do
    add :archived_at, :utc_datetime
  end
end

3. Updating schema...

# lib/my_app/blog/post.ex
field :archived_at, :utc_datetime

4. Adding to changeset...

def changeset(post, attrs) do
  post
  |> cast(attrs, [:title, :body, :archived_at])
  ...
end

5. Verifying...
$ mix compile --warnings-as-errors ✓
$ mix ecto.migrate ✓

Done. Run `mix test` to verify.
```

More from oliver-kriska/claude-elixir-phoenix

SkillDescription
ash-frameworkAsh Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.
catchupSummarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.
cc-changelog|
codex-abRun an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on the branch diff, classify findings, report a panel-value verdict. Use when the branch is fresh, before any codex review runs.
compound-docsSearchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter. Builds institutional knowledge from solved problems. Use when consulting past solutions before investigating new issues.
docs-check|
ecto-n1-checkDetect N+1 query anti-patterns specifically — Repo calls inside Enum/for
ecto-patternsEcto patterns — schemas, changesets, queries, migrations, Multi, associations, preloads, upserts. Use when editing Repo calls, Ecto.Query, or schema fields. Skip for Ash.
ecto:constraint-debugDebug Ecto constraint violations - trace triggers, check migrations, find duplicate data. Use when seeing unique_constraint, foreign_key_constraint, or check_constraint errors.
ecto:n1-checkDetect N+1 query anti-patterns specifically — Repo calls inside Enum/for loops, missing preloads on associations. Use when N+1 is explicitly suspected, NOT for unrelated Ecto questions or wider database performance.