anti-patterns

anti-patterns is a skill for Claude Code from vinnie357/claude-skills. It costs 33 tokens per session (2,726 once invoked), scanned A, original, MIT.

A guide to spotting and rewriting common Elixir coding patterns that make programs harder to read, maintain, or document.

In plain words
What is it for?
Use it when reviewing Elixir code, finding code smells, or refactoring functions, comments, configuration, and error handling.
Why use it?
It helps replace confusing code with clearer Elixir code and avoids comments or error-handling structures that obscure what the program does.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the elixir plugin — 9 skills, 1 agent shipped together

Good fit Use it when reviewing Elixir code, finding code smells, or refactoring functions, comments, configuration, and error handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinnie357/claude-skills/anti-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinnie357/claude-skills --skill anti-patterns
Clone the repo
git clone --depth 1 https://github.com/vinnie357/claude-skills

Made for: Claude Code.

Or install elixir, the plugin that ships this one along with the rest of its 9 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for anti-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinnie357/claude-skills/anti-patterns/github.svg)](https://agentmods.dev/skills/vinnie357/claude-skills/anti-patterns)
Your own site
<a href="https://agentmods.dev/skills/vinnie357/claude-skills/anti-patterns"><img src="https://agentmods.dev/badge/skills/vinnie357/claude-skills/anti-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for anti-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinnie357/claude-skills/anti-patterns"><img src="https://agentmods.dev/badge/skills/vinnie357/claude-skills/anti-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,726 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.02726
Opus 5 $0.00016 $0.01363
Sonnet 5 $0.00007 $0.00545
Haiku 4.5 $0.00003 $0.00273

Measured 10d ago against content hash b7e9a903b482, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

anti-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/languages/elixir/skills/anti-patterns/SKILL.md · 385 lines

How it starts

The opening of the file, as written. The whole thing — 385 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elixir Anti-Patterns Detection and Refactoring

You are an expert at identifying Elixir anti-patterns and suggesting idiomatic refactorings. Use this knowledge to analyze code, suggest improvements, and help developers write better Elixir.

1. Comments Overuse

Problem: Excessive or self-explanatory comments reduce readability rather than enhance it.

Detection:

  • Inline comments explaining obvious code
  • Comments for every function line
  • Comments duplicating what code already says clearly

Refactoring:

  • Use clear function and variable names instead of explanatory comments
  • Replace inline comments with @doc and @moduledoc for documentation
  • Use module attributes for configuration values

Example:

# Bad
def calculate() do
  # Get current time
  now = DateTime.utc_now()
  # Add 5 minutes
  DateTime.add(now, 5 * 60, :second)
end

# Good
@minutes_to_add 5

def timestamp_five_minutes_from_now do
  now = DateTime.utc_now()
  DateTime.add(now, @minutes_to_add * 60, :second)
end

2. Complex else Clauses in with

Problem: Flattening all error handling into a single complex else block obscures which clause produced which error.

Detection:

  • Large else blocks with many pattern match clauses
  • Difficulty determining error sources
  • Complex error handling logic in else

Refactoring:

  • Normalize return types in private functions
  • Handle errors closer to their source
  • Let with focus on success paths

Example:

# Bad
def read_config(path) do
  with {:ok, content} <- File.read(path),
       {:ok, decoded} <- Jason.decode(content) do
    {:ok, decoded}
  else
    {:error, :enoent} -> {:error, :file_not_found}
    {:error, %Jason.DecodeError{}} -> {:error, :invalid_json}
    {:error, reason} -> {:error, reason}
  end
end

# Good
def read_config(path) do
  with {:ok, content} <- read_file(path),
       {:ok, config} <- parse_json(content) do
    {:ok, config}
  end
end

defp read_file(path) do
  case File.read(path) do
    {:ok, content} -> {:ok, content}
    {:error, :enoent} -> {:error, :file_not_found}
    error -> error
  end
end

defp parse_json(content) do
  case Jason.decode(content) do
    {:ok, data} -> {:ok, data}
    {:error, _} -> {:error, :invalid_json}
  end
end

Read the full file on GitHub · 385 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 385 lines · 33 tokens per session scan A b7e9a903b482

Subscribe to this mod's changes

anti-patterns is a skill published in the GitHub repository vinnie357/claude-skills (25 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 2,726 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.