documentation
Rules to use when documenting elixir code
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
Rules to use when documenting elixir code
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Implement a GitHub issue in aurora_uix, an Elixir/Phoenix low-code UI generation library with Ash and Ecto backends, following an enriched spec produced by improve-issue. Use this skill when the user says "implement the issue", "code this up", "start coding", or provides an enriched spec from improve-issue. Also triggers on "fix the gaps", "address the review findings", or "retry with these requirements" — in those cases the gaps live in the review-gaps marker block of the issue body. Always write tests alongside implementation.
Create a pull request with proper formatting and pre-merge checks
Evaluate an already-enriched GitHub issue and recommend whether to keep it as-is (with a model-tier recommendation), declare it already completed, or split it into smaller children. Use when the user says "evaluate this issue", "is this issue too big", "should we split this", "size this issue", "which model should code this", or before kicking off orchestrate-issue on a heavy spec. Requires improve-issue to have been run first — this skill does NOT enrich specs and does NOT modify code. Read-mostly: the only write is an idempotent issue-evaluation marker block on the issue body.
Run `mix consistency` and fix issues. Mechanical issues are fixed in place; refactor-class issues produce a plan for user approval instead of being attempted.
Enrich and clarify a GitHub issue before any coding begins. Use this skill whenever a user says "work on issue", "implement issue", "fix issue", "start from a GitHub issue", or pastes issue text/URL. Always run this FIRST before code-issue — it produces the structured spec that code-issue consumes. Also trigger when the user says "improve issue description" or "clarify requirements".
Review and score the implementation produced by code-issue against the enriched spec from improve-issue. Use this skill when the user says "review the implementation", "check completeness", "validate coverage", or after code-issue finishes. Runs the project quality gate (mix consistency + mix test), produces a scored report, and writes outstanding gaps into the issue body marker block so code-issue Mode B can pick them up. Always run after code-issue, before deciding the issue is done.
Basierend auf der SOC-Berufsklassifikation
| name | documentation |
| description | Rules to use when documenting elixir code |
| applyTo | ["**/*.ex","**/*.exs"] |
Document a single Elixir module by adding/repairing @moduledoc, @doc, @spec, and @shortdoc. Never alter code logic.
This skill operates on ONE target file path provided by the caller. Do not touch any other file.
mix consistency and capture output.docs or doctor and the warning references the target file, apply the rules below to the target file and re-run.mix consistency no longer reports docs/doctor warnings on the target file, ORmix consistency fails on a non-docs stage (stop and report — do NOT attempt to fix it from this skill).Do NOT commit changes. The caller decides when to commit.
def, defp, defmacro, or defmacrop.alias, import, use, or require lines.@spec if it is already correct — only add missing ones or fix the specific issues listed below.@shortdocMix.Task.@moduledoc.@moduledoc@shortdoc for Mix.Task modules.add(2, 2) #=> 4), OR it uses no module-specific behaviour.key features and key constraints as bullet sections when they apply.Mix.Task modules MUST include at least one example.@moduledoc text already matches the function/module name and parameters and contains no forbidden patterns, leave it alone. When unsure, leave it alone.@docPlace @doc only on the FIRST function in an arity-matched group. Do not repeat for additional clauses or arities of the same name.
Use this skeleton:
@doc """
Short description ending with a dot.
## Parameters
- `arg1` (type()) - Description ending with a dot.
- `opts` (Keyword.t()) - Options:
* `:option` (type()) - Description.
## Returns
type() - Description ending with a dot.
## Raises
ExceptionType - Reason.
## Examples
```elixir
# Meaningful example showing edge cases
"""
Type rules inside `@doc`:
- Always parenthesise: `map()` not `map`, `MyStruct.t()` not `MyStruct`.
- Never use `any()`. Replace with concrete types: `binary()`, `tuple()`, `map()`, `integer()`, etc.
- Wrap struct, tuple, and map literals in backticks: `` `%MyStruct{}` ``, `` `{:ok, value}` ``, `` `%{}` ``.
Examples rules:
- Remove **trivial examples** (same definition as `@moduledoc`).
- Fix examples that no longer compile or whose result is wrong.
- Add an example for error/edge cases when the function has non-obvious branches.
### `@callback`
Apply the same `@doc` rules to every `@callback`.
## `@spec`
- Add a missing `@spec` for the FIRST function/macro of every arity-matched group, both public and private.
- Modify an existing `@spec` only to:
- Add parentheses (e.g. `keyword` → `keyword()`).
- Replace `any()` with a concrete type.
- Never write `arg :: type()` — `::` is not allowed in arguments.
- Use the outermost type only; do not specify inner types. Examples:
- Good: `@spec parse(binary()) :: list()`.
- Bad: `@spec parse(binary()) :: list(binary())`.
- Use project-local custom types where they exist.
### `@spec` examples
Good:
```elixir
@spec build(map()) :: {:ok, struct()} | {:error, term()}
Bad (uses any()):
@spec build(any()) :: any()
Bad (specifies inner types):
@spec build(map()) :: {:ok, %MyMod{name: binary(), age: integer()}}
If a module has any defp/defmacrop:
## PRIVATE comment near the end of the module. Add the ## PRIVATE line only if private functions exist.@doc attributes on private functions.# Descriptive comment line above any private function that meets either of:
case, cond, or with with 3 or more branches.@spec for the first function/macro of each arity-matched private group.-).