perl-patterns

perl-patterns is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 42 tokens per session (3,457 once invoked), scanned A, a copy of perl-patterns, MIT.

A collection of modern Perl 5.36 and later coding patterns for writing, reviewing, and restructuring Perl applications. Perl is a programming language often used for scripts, automation, and web back ends.

In plain words
What is it for?
Use it when writing new Perl code, reviewing modules, refactoring older Perl, or planning module structure.
Why use it?
It helps developers replace older Perl conventions with clearer syntax, explicit modules, and focused error handling. It also provides guidance for making code easier to test and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when writing new Perl code, reviewing modules, refactoring older Perl, or planning module structure.

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

Made for: Claude Code, Codex.

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/gongyijie85/dsh-ecc/perl-patterns/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/perl-patterns)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/perl-patterns"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/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/gongyijie85/dsh-ecc/perl-patterns"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/perl-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,457 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 86% 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.00042 $0.03457
Opus 5 $0.00021 $0.01729
Sonnet 5 $0.00008 $0.00691
Haiku 4.5 $0.00004 $0.00346

Measured 7d ago against content hash 617ced86628e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 7d 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

86% identical to perl-patterns — 14 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 · 506 lines

How it starts

The opening of the file, as written. The whole thing — 506 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 · 506 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. 7d ago First seen · 506 lines · 42 tokens per session scan A 617ced86628e

Subscribe to this mod's changes

perl-patterns is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 3,457 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to perl-patterns, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

qiskit

A collection of quantum algorithms implemented using Qiskit, covering a wide range of topics including quantum search, quantum phase estimation, amplitude amplification, and more. Provides efficient implementations and examples for various quantum computing applications.

unitarylab/quantum-practices · 46 tokens

unitarylab

Use UnitaryLab for local quantum circuit construction, simulation, measurement, expectation values, transpilation, drawing, serialization, and algorithms provided by unitarylab.library. Trigger for runnable UnitaryLab workflows; consult bundled references for package APIs and dedicated algorithm skills for…

unitarylab/quantum-practices · 60 tokens

dsh-web-pet-developer

Create a pet for the dsh-pet plugin and integrate it into the dsh web GUI — author a v2 pet.json manifest plus an 8-column x 9-row atlas per the Codex/hatch-pet contract (live2d pets, voice packs and status decorations included), drop it into the pet-center user directory or contribute it as a built-in asset under…

zhu1090093659/dsh-web · 162 tokens

xiaohongshu-search

A tool for searching and ranking popular Xiaohongshu posts, a Chinese social content platform. It uses keywords, engagement, relevance, and recency to recommend content and related search directions.

redfox-data/redfox-community-dsh · 61 tokens

investor-distiller

An analysis tool for studying investment bloggers on WeChat, a Chinese messaging and publishing platform. It collects their articles and builds a structured profile of their trading methods, market views, writing style, topics and audience interaction.

redfox-data/redfox-community-dsh · 113 tokens