Agent skill

Narrow Bare Rescue

by oliver-kriska in oliver-kriska/claude-elixir-phoenix

Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed.

MITAuto-check passedDevelopment

Install Narrow Bare Rescue

skills CLI
$ npx skills add oliver-kriska/claude-elixir-phoenix --skill narrow-bare-rescue -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oliver-kriska/claude-elixir-phoenix narrow-bare-rescue --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/targets/pi/skills/narrow-bare-rescue .claude/skills/narrow-bare-rescue && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
narrow-bare-rescue
GitHub stars
565
Token cost
~1.3k tokens
SKILL.md length
606 words
Files
3 (incl. references)
Skills in repo
109
Repo updated
First seen
Licence
MIT

At a glance

Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed.

  • Works in 4 steps: Find the sites → Determine the exception set for each… → Apply the narrowing → …
  • Audit rescues and refactor error handling
  • SKILL.md covers Why this matters, Iron Laws, The core transform and Workflow, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Narrow Bare Rescue is an agent skill from oliver-kriska/claude-elixir-phoenix. Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed. Use to audit rescues and refactor error handling.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/patterns.md` and `references/taxonomy.md`).

It sits in Development. It works with Elixir. The repository describes itself as: Claude Code plugin for Elixir/Phoenix/LiveView — 26 specialist agents, Iron Laws enforcement, and Tidewave MCP integration. Plan features with parallel research agents, execute… The licence is MIT.

When your agent uses it

  • Audit rescues and refactor error handling

Example prompts

  • “/narrow-bare-rescue”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Find the sites
  2. Determine the exception set for each bare site
  3. Apply the narrowing
  4. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 9767a82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and elixir).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • erlang.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Narrow Bare Rescue loads about 1.3k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 44 tokens; SKILL.md has 606 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from oliver-kriska/claude-elixir-phoenix at commit 9767a82, republished under its MIT licence (© oliver-kriska). 606 words, ~1,328 tokens.

Download SKILL.mdSave it as .claude/skills/narrow-bare-rescue/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
narrow-bare-rescue
description
Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed. Use to audit rescues and refactor error handling.

Narrow Bare Rescue

Turn rescue _ -> fallback into rescue _ in [ExceptionType1, ExceptionType2] -> fallback so programmer bugs propagate while known failure modes stay handled.

Why this matters

Bare rescues (rescue _ ->, rescue e -> — any form without an in clause) swallow every exception, including UndefinedFunctionError from typos, KeyError from misspelled map keys, and CompileError from bad HEEx templates. The symptom isn't a stack trace — it's a silent {:error, :generic} or a nil fallback. Bugs that should surface in tests or error reporters become quiet degradations.

The Erlang Secure Coding Guide makes the same case at the BEAM level — rule LNG-002 ("Do Not Use catch") warns that the legacy catch-all form conflates normal returns, throws, and errors. Bare rescue in Elixir is the direct analogue.

Iron Laws

  1. Never leave rescue _ -> or rescue e -> without an in clause. Every rescue must list exact exception types. The Credo check enforces this after cleanup lands.
  2. Cover every exception the code path can actually raise. Narrowing that drops a real exception is a behavioral regression — trace each call in the body before committing.
  3. Never include programmer-bug exceptions in the list. UndefinedFunctionError, CompileError, BadFunctionError, and BadArityError must propagate.
  4. Use reraise e, __STACKTRACE__, never reraise e, []. Preserve the original stack trace so Oban retry metadata and error reporters show the real origin.
  5. Run mix compile --warnings-as-errors before committing. Typos in exception module names only surface at compile time — the code looks fine until it loads.

The core transform

elixir
# Before — masks programmer bugs
def parse(body) do
  Jason.decode!(body)
rescue
  _ -> %{}
end

# After — catches only what can actually fail here
def parse(body) do
  Jason.decode!(body)
rescue
  _ in [Jason.DecodeError, ArgumentError] -> %{}
end

Applies identically to try … rescue … and to function-body def … rescue ….

Workflow

The skill operates in three modes depending on scope:

  1. Single file — /narrow-bare-rescue path/to/file.ex
  2. Directory — /narrow-bare-rescue lib/my_app/util/
  3. Whole project — /narrow-bare-rescue --all

Whatever the scope, follow this sequence.

Step 1 — Find the sites
bash
grep -rn "^\s*rescue\s*$" <scope> | head -200

For each hit, read the 3 lines after to classify:

  • rescue _ -> or rescue var -> — bare, needs narrowing
  • rescue _ in [...] -> or rescue var in Something -> — already typed, skip
  • rescue ExceptionType -> (no variable binding) — already typed, skip
Show full SKILL.md (291 more words)Show less
Step 2 — Determine the exception set for each bare site

Read the try / def body and trace what each call can raise. Don't guess from the function name — verify. Consult order:

  1. Check references/taxonomy.md for the work type (JSON, Ecto, Money, HTTP, etc.). Most sites map cleanly to one row.

  2. Grep deps for defexception when a specific library isn't in the taxonomy:

    bash
    grep -rn "defexception" deps/<libname>/lib/ | head -10
  3. Check raise calls in the code path itself — if the body explicitly raises RuntimeError, include it.

Priorities: cover everything the code can actually raise, exclude programmer-bug exceptions (see Iron Law #3), and prefer specific types (Jason.DecodeError beats ArgumentError if both could apply).

Step 3 — Apply the narrowing

For files with ≥3 rescues sharing a taxonomy, hoist to a module attribute — see references/patterns.md for the module-attribute pattern, Oban reraise, ExCmd exit errors, and is_exception/1 replacements.

Step 4 — Verify

After changes in each file (or cluster of files), run:

bash
mix compile --warnings-as-errors
mix format <files_changed>
mix test <test_files_for_affected_modules>

The compile step catches typos in exception module names — a real risk since you're writing module names from memory.

Scope

This skill narrows bare rescue clauses. It does not:

  • Auto-narrow blindly — behavior preservation matters; trace each call path first
  • Touch rescues that are already typed (rescue e in [X] ->) — those are correct
  • Cover catch clauses — throws and exits from the process are a separate concern
  • Replace try/rescue with with or error-tuple plumbing — that's a larger refactor

References

  • references/taxonomy.md — verified exception types per work category, plus library-specific gotchas (NimbleCSV, Plug, Phoenix LiveView tokenizer)
  • references/patterns.md — special patterns: is_exception/1, Oban reraise, ExCmd exit errors, module-attribute hoisting, partitioning large cleanups, the regression-prevention Credo check
  • Erlang Secure Coding Guide — LNG-002: Do Not Use catch — BEAM-level rationale for preferring narrow try ... catch / try ... rescue over the legacy catch-all form

© oliver-kriska, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in targets/pi/skills/narrow-bare-rescue of oliver-kriska/claude-elixir-phoenix.

  • SKILL.md
  • references/patterns.md
  • references/taxonomy.md

Open the folder on GitHubat commit 9767a82

Compare with similar skills

Narrow Bare Rescue next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Narrow Bare Rescue compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Narrow Bare Rescue this skilloliver-kriska/claude-elixir-phoenix565—~1.3kAutomated safety check: PassMIT
Membrane Frameworkmembraneframework/membrane_core1.5k—~4.2kAutomated safety check: PassApache-2.0
Elixirstreamband/hydra-srt147—~804Automated safety check: PassApache-2.0
Idiomatic Elixirgeorgeguimaraes/elixir-agent-tools184—~2.1kAutomated safety check: PassApache-2.0
Alefxberg-io/alef100—~1.7kAutomated safety check: PassMIT
Releasedmkenney/xamal106—~873Automated safety check: PassMIT

Similar skills

  • Membrane Framework

    membraneframework/membrane_core

    Work with the Membrane multimedia streaming framework in Elixir.

    1.5k GitHub stars~4.2k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Elixir

    streamband/hydra-srt

    A skill your agent uses for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes.

    147 GitHub stars~804 tokensUpdated 24 days ago
    DevelopmentAuto-check passed
  • Idiomatic Elixir

    georgeguimaraes/elixir-agent-tools

    Writes and refactors idiomatic Elixir modules and functions, with rules for pattern matching, error handling, protocols and when a process is really needed.

    184 GitHub stars~2.1k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Alef

    xberg-io/alef

    Use Alef correctly for Rust-to-polyglot binding generation. An agent skill from xberg-io/alef.

    100 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Release

    dmkenney/xamal

    Cut a Xamal release end-to-end (maintainer-only). An agent skill from dmkenney/xamal.

    106 GitHub stars~873 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Change Cleanup

    Simon-Initiative/oli-torus

    Clean up and harden code introduced by the current branch without drifting into broad refactors.

    119 GitHub stars~3.7k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from oliver-kriska/claude-elixir-phoenix

All 109 skills in this repo
  • Codex Ab

    oliver-kriska/claude-elixir-phoenix

    Run 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.

    565 GitHub stars~977 tokensUpdated 5 days ago
    Auto-check passed
  • Audit

    oliver-kriska/claude-elixir-phoenix

    Project health audit and health check — architecture, performance, tests, dependencies, code quality.

    565 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with; Use when consulting past solutions…

    565 GitHub stars~528 tokensUpdated 5 days ago
    Auto-check passed
  • Compound Docs

    oliver-kriska/claude-elixir-phoenix

    Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter.

    565 GitHub stars~547 tokensUpdated 5 days ago
    Auto-check passed
  • Deploy

    oliver-kriska/claude-elixir-phoenix

    Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays.

    565 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Deps Update

    oliver-kriska/claude-elixir-phoenix

    Bump outdated Hex deps — inventory, snapshot changelogs, update, fix breaks, split reviewable PRs (patches bundled, majors solo).

    565 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed

Works with

Categories

Questions about Narrow Bare Rescue

What does Narrow Bare Rescue do?

Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed. Narrow Bare Rescue is an agent skill from oliver-kriska/claude-elixir-phoenix. Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed.

When should I use Narrow Bare Rescue?

Narrow Bare Rescue fits situations like: audit rescues and refactor error handling.

How do I install Narrow Bare Rescue in Claude Code?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill narrow-bare-rescue -a claude-code`. Or copy the skill folder (targets/pi/skills/narrow-bare-rescue in oliver-kriska/claude-elixir-phoenix) into .claude/skills/narrow-bare-rescue in your project. Claude Code loads it when a task matches its description.

How do I install Narrow Bare Rescue in Codex?

Run `npx skills add oliver-kriska/claude-elixir-phoenix --skill narrow-bare-rescue -a codex`. Or copy the skill folder (targets/pi/skills/narrow-bare-rescue in oliver-kriska/claude-elixir-phoenix) into .agents/skills/narrow-bare-rescue in your project. Codex loads it when a task matches its description.

Can I use Narrow Bare Rescue in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oliver-kriska/claude-elixir-phoenix --skill narrow-bare-rescue -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/narrow-bare-rescue, .gemini/skills/narrow-bare-rescue, .github/skills/narrow-bare-rescue and .opencode/skills/narrow-bare-rescue in your project.

What does Narrow Bare Rescue need to run?

SKILL.md names no scripts, command-line tools or credentials: Narrow Bare Rescue is instructions for the agent only.

Does Narrow Bare Rescue access the network?

SKILL.md names 1 domain. As links in the text: erlang.org. This is read from the text; nothing was executed.

Is Narrow Bare Rescue safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Narrow Bare Rescue use?

Narrow Bare Rescue is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Narrow Bare Rescue use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Narrow Bare Rescue?

Skills that share tags, products or a category with Narrow Bare Rescue: Membrane Framework (membraneframework/membrane_core, 1.5k stars), Elixir (streamband/hydra-srt, 147 stars), Idiomatic Elixir (georgeguimaraes/elixir-agent-tools, 184 stars) and Alef (xberg-io/alef, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Narrow Bare Rescue?

oliver-kriska (a GitHub user) maintains it in oliver-kriska/claude-elixir-phoenix, which has 565 GitHub stars. The repository holds 109 skills in this directory. The repository was last updated on October 5, 2026.

Source: oliver-kriska/claude-elixir-phoenix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.