perl-patterns

perl-patterns is a skill for Claude Code from multiplex-ai/muggle-ai-teams. It costs 28 tokens per session (3,440 once invoked), scanned A, a copy of perl-patterns, MIT.

A guide to modern Perl 5.36 and later coding practices for building maintainable applications. It covers features such as subroutine signatures, explicit modules, focused error handling, and testable boundaries.

In plain words
What is it for?
Use it when writing or reviewing Perl code, designing modules, refactoring older Perl, or moving code toward Perl 5.36 practices.
Why use it?
It helps developers write new Perl code consistently and update older code to current conventions. It also gives a clearer structure for reviewing and refactoring Perl applications.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the muggle-ai-teams plugin — 166 skills, 55 commands, 30 agents, 4 hooks shipped together

Good fit Use it when writing or reviewing Perl code, designing modules, refactoring older Perl, or moving code toward Perl 5.36 practices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/multiplex-ai/muggle-ai-teams/perl-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 multiplex-ai/muggle-ai-teams --skill perl-patterns
Clone the repo
git clone --depth 1 https://github.com/multiplex-ai/muggle-ai-teams

Made for: Claude Code.

Or install muggle-ai-teams, the plugin that ships this one along with the rest of its 166 skills, 55 commands, 30 agents, 4 hooks.

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 perl-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/multiplex-ai/muggle-ai-teams/perl-patterns/github.svg)](https://agentmods.dev/skills/multiplex-ai/muggle-ai-teams/perl-patterns)
Your own site
<a href="https://agentmods.dev/skills/multiplex-ai/muggle-ai-teams/perl-patterns"><img src="https://agentmods.dev/badge/skills/multiplex-ai/muggle-ai-teams/perl-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 perl-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/multiplex-ai/muggle-ai-teams/perl-patterns"><img src="https://agentmods.dev/badge/skills/multiplex-ai/muggle-ai-teams/perl-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,440 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.
Origin 94% copy Near-identical to another mod 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.00028 $0.03440
Opus 5.5 $0.00011 $0.01376
Sonnet 5.5 $0.00006 $0.00688
Haiku 4.5 $0.00003 $0.00344

Measured 1mo ago against content hash 7051a5b3b005, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

perl-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 1mo 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.

Origin

This is a copy

94% identical to perl-patterns — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/perl-patterns/SKILL.md · 505 lines

How it starts

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

Modern Perl Development Patterns

Idiomatic Perl 5.36+ patterns and best practices for building robust, maintainable applications.

When to Activate

  • Writing new Perl code or modules
  • Reviewing Perl code for idiom compliance
  • Refactoring legacy Perl to modern standards
  • Designing Perl module architecture
  • Migrating pre-5.36 code to modern Perl

How It Works

Apply these patterns as a bias toward modern Perl 5.36+ defaults: signatures, explicit modules, focused error handling, and testable boundaries. The examples below are meant to be copied as starting points, then tightened for the actual app, dependency stack, and deployment model in front of you.

Core Principles

1. Use v5.36 Pragma

A single use v5.36 replaces the old boilerplate and enables strict, warnings, and subroutine signatures.

# Good: Modern preamble
use v5.36;

sub greet($name) {
    say "Hello, $name!";
}

# Bad: Legacy boilerplate
use strict;
use warnings;
use feature 'say', 'signatures';
no warnings 'experimental::signatures';

sub greet {
    my ($name) = @_;
    say "Hello, $name!";
}

2. Subroutine Signatures

Use signatures for clarity and automatic arity checking.

use v5.36;

# Good: Signatures with defaults
sub connect_db($host, $port = 5432, $timeout = 30) {
    # $host is required, others have defaults
    return DBI->connect("dbi:Pg:host=$host;port=$port", undef, undef, {
        RaiseError => 1,
        PrintError => 0,
    });
}

# Good: Slurpy parameter for variable args
sub log_message($level, @details) {
    say "[$level] " . join(' ', @details);
}

# Bad: Manual argument unpacking
sub connect_db {
    my ($host, $port, $timeout) = @_;
    $port    //= 5432;
    $timeout //= 30;
    # ...
}

3. Context Sensitivity

Understand scalar vs list context — a core Perl concept.

use v5.36;

my @items = (1, 2, 3, 4, 5);

my @copy  = @items;            # List context: all elements
my $count = @items;            # Scalar context: count (5)
say "Items: " . scalar @items; # Force scalar context

Read the full file on GitHub · 505 lines

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. 1mo ago First seen · 505 lines · 28 tokens per session scan A 7051a5b3b005

Subscribe to this mod's changes

perl-patterns is a skill published in the GitHub repository multiplex-ai/muggle-ai-teams (2 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 3,440 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 94% identical to perl-patterns, differing in 9 lines, and is treated as a copy.

Related

perl-patterns compared with skills from other repositories

perl-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
perl-patternsmultiplex-ai/muggle-ai-teamsSkill21mo agoMITA28Claude Code
codex-handoffParaGenie/claude-codex-handoffSkill12mo agoMITA119Claude Code
discussshawnla90/recursive-driftSkill198mo agoMITA56Claude Code, Codex
skill-nameshawnla90/recursive-driftSkill198mo agoMITA16Claude Code, Codex
codex-handoffParaGenie/claude-codex-handoffSkill12mo agoMITA119Claude Code
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code