CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/elixir-phoenix-skills

Curated library of 38 atomic skills, 7 personas, and 1 orchestrator for Elixir and Phoenix development. Organized by category: fundamentals, phoenix, database, testing, auth, infrastructure, quality, security, integrations, tooling, frameworks, personas, and orchestration. Covers core Elixir patterns, Phoenix LiveView, Ecto, OTP, Oban, testing, security, deployment, real-time, and modern tooling (Req, Swoosh, Cachex, Broadway, Ash).

73

Quality

91%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

SKILL.mdskills/personas/quality/

name:
quality
type:
persona
tags:
personas
license:
MIT
description:
Complete code quality loop for Elixir projects with hard gates: enforce formatting and linter compliance (mix format, mix credo must pass) → refactor only after characterization tests PASS on current code, verify behavior preserved after each extraction → generate @doc for all public APIs → NEVER open PR before formatter, credo, dialyzer, full test suite, and @doc coverage all pass; phases conventions review→refactoring→documentation. Use this composite end-to-end loop instead of individual refactoring or documentation skills when full three-phase production-readiness review is needed in one pass. Trigger: code review prep, before PR, full Elixir quality sweep, quality audit, production-ready review, end-to-end quality check.
metadata:
{"version":"1.0.0","user-invocable":"true","entry_point":"Invoke when conducting full production-readiness review or code quality sweep before PR","phases":"Phase 1: Conventions Review, Phase 2: Refactoring, Phase 3: Documentation","hard_gates":"Conventions Check, Refactoring Test Gate, Quality Before Merge","dependencies":[{"source":"self","skills":["code-quality","credo-config","apply-phoenix-liveview-conventions","apply-phoenix-controller-conventions","apply-ecto-conventions","code-review","refactor-code","respond-to-review","typespec-dialyzer","security-essentials"]}],"keywords":"elixir, quality, conventions, refactoring, documentation, credo, review"}

Quality Persona

Orchestrates code quality checks, safe refactoring, and documentation updates across three phases.

Complexity Thresholds

Proceed to Phase 2 if any threshold is exceeded:

MetricThresholdAction
Function Length> 20 linesExtract function or private helper
Parameter Count> 4Use keyword list or map
Module Length> 400 linesExtract context or sub-module
Nesting Depth> 3 levelsExtract function or use with
Pipe Chain> 5 pipesExtract into named function

Agent Phases

Phase 1: Conventions Review

Run the following tools and address all violations:

mix format --check-formatted   # Formatting
mix credo --strict             # Linting and complexity
mix dialyzer                   # Type checking
mix hex.audit                  # Dependency audit

HARD GATE — NEVER open a PR before all four checks above pass, plus mix test (full suite green) and @doc/@spec annotations on all public APIs (completed in Phase 3). Fix any failure before proceeding.


Phase 2: Refactoring (Optional)

Decision Gate — Proceed if any threshold above is exceeded; otherwise skip to Phase 3.

TDD Enforcement — Before any code change:

  1. Write characterization test documenting current behavior.
  2. Verify PASSESmix test test/path/to/file_test.exs.
  3. Checkpoint — Propose specific refactoring (e.g., extract a private helper, introduce a with chain, replace positional args with a keyword list).
  4. Apply the single proposed change.
  5. Re-validatemix test test/path/to/file_test.exs must still be green.
  6. Repeat steps 3–5 for each additional violation; do not batch multiple extractions in one step.

Error Recovery — If tests go red after a change:

  • Revert the last change immediately.
  • Re-examine the characterization test to ensure it fully covers the behavior being touched.
  • Propose a smaller, safer extraction and repeat from step 3.

Phase 3: Documentation

Goal — All public API functions have @doc and @spec before merge.

  1. Identify every public function (no leading _, not defp) in the changed modules.
  2. For each function missing @doc:
    • Write a concise description of purpose and return value.
    • Add at least one ## Examples block with a iex> doctest where practical.
  3. For each function missing @spec:
    • Derive the typespec from usage and dialyzer hints.
    • Add @spec immediately above the function head.
  4. Run mix dialyzer once more to confirm new typespecs are consistent.
  5. Run mix test to verify doctests pass.

Final Pre-PR Checklist

Before opening a PR, confirm every item is green:

CheckCommandMust Pass
Formattingmix format --check-formatted
Lintingmix credo --strict
Type checkingmix dialyzer
Dependency auditmix hex.audit
Full test suitemix test
Doc/spec coverageAll public APIs annotated

Do not open the PR until every row is ✅.

skills

personas

quality

README.md

tile.json