tune-perl-ci
Use when modernizing a Perl project's GitHub Actions CI — applies seven idempotent transforms (fail-fast flag, Perl 5.42 matrix, perl-tester image bump, default-branch push, concurrency cancel, setup-cpm + cpm install, drop pre-5.24 macOS/Windows cells) to Dist::Zilla-style workflows.
What this skill does
# Tune Perl CI
## Overview
**Seven transforms applied to Perl CI workflows under `.github/workflows/`:**
1. `fail-fast: false` on every matrix job
2. Extend Linux + macOS matrices through Perl 5.42
3. Bump build + coverage jobs to `perldocker/perl-tester:5.42`
4. Restrict the `push:` trigger to the default branch
5. Add a workflow-level `concurrency:` cancel-in-progress block
6. Install deps with `setup-cpm` + a `cpm install` run step
7. Drop macOS + Windows tests for Perls < 5.24
**Core principle:** modernize the workflow without changing intent. Each transform lands as its own commit so any single change is revertable. Re-running the skill on an already-tuned workflow is a no-op.
## Dispatch this skill to a subagent
When this skill is invoked, dispatch the work to a `general-purpose` subagent via the `Agent` tool. **Do not run the seven transforms inline in the caller's context.**
Why:
- Each transform reads every in-scope workflow, computes a diff, writes the file, runs `yaml.safe_load` + a structural assertion, then stages and commits. Across seven transforms and multiple workflows, that is a lot of `Read`/`Edit`/`Bash` tool traffic — none of it useful to the caller's session.
- The caller only needs the final summary line (`Applied N transforms across M files in K commits`) and the list of commit SHAs. Everything else is intermediate state.
How to dispatch:
- Brief the subagent with this SKILL.md as its working spec — pass the path to the file or invoke the skill from inside the subagent.
- Tell the subagent the working directory and (optionally) a single workflow path if the caller specified one.
- Require the subagent to report back, in under 200 words: the summary line, the per-transform commit SHAs, and any skipped transforms with reason.
- If a transform's verification fails, the subagent must stop and surface the failure rather than continuing or auto-reverting.
If the user explicitly asks to run inline (e.g. "do it here so I can watch"), honour that — the subagent dispatch is the default, not a hard requirement.
## When to Use
- User asks to tune / modernize / harden CI on a Perl repo
- Workflow uses `perldocker/perl-tester`, `shogo82148/actions-setup-perl`, `perl-actions/install-with-cpm`, or `perl-actions/install-with-cpanm`
- A Dist::Zilla starter template has produced a CI workflow that is a few years stale
**Skip when:**
- No `.github/workflows/*.yml` matches the action-signature detection rule below — there's nothing to tune
- The user has deliberately customised concurrency or branch filters — idempotency preserves their choices
## Scope Detection
For each `.github/workflows/*.yml`, the file is **in scope** if it mentions any of:
- `perldocker/perl-tester`
- `shogo82148/actions-setup-perl`
- `perl-actions/install-with-cpm`
- `perl-actions/install-with-cpanm`
Other workflows are skipped silently. If no workflow file matches across the repo, report "no Perl workflows found" and exit cleanly.
If the caller passes a single workflow path as an argument, operate only on that file (still apply the detection rule for safety; bail out with a clear message if it isn't Perl-shaped).
## The Six Transforms
### 1. `fail-fast: false` on every matrix job
**What:** insert `fail-fast: false` under every `strategy:` block whose nested `matrix:` exists. Flip `fail-fast: true` to `false` if already present. No-op if `false` already.
**Why:** when `fail-fast:` is missing it defaults to `true`. One failing Perl/OS cell shouldn't mask the rest of the matrix.
**Before:**
```yaml
test_linux:
strategy:
matrix:
perl-version: ["5.34"]
```
**After:**
```yaml
test_linux:
strategy:
fail-fast: false
matrix:
perl-version: ["5.34"]
```
### 2. Extend Linux + macOS matrices through Perl 5.42
**What:** in jobs whose `matrix.perl-version` axis exists **and** the job is either
- a Linux container (`container.image` starts with `perldocker/perl-tester`), or
- macOS (`runs-on: macos-*` or matrix `os:` includes a `macos-*` entry),
append any of `"5.36"`, `"5.38"`, `"5.40"`, `"5.42"` not already in the list. Preserve older entries. Match the file's quote style.
**Skip Windows.** Disabling or extending Windows is situational, not a general best practice.
**Hard-coded target:** `5.42`. A future revision can teach the skill to discover the latest stable.
**Before:**
```yaml
perl-version:
- "5.10"
- "5.30"
- "5.34"
```
**After:**
```yaml
perl-version:
- "5.10"
- "5.30"
- "5.34"
- "5.36"
- "5.38"
- "5.40"
- "5.42"
```
### 3. Bump build + coverage jobs to `perldocker/perl-tester:5.42`
**What:** replace `container.image:` values matching `perldocker/perl-tester:<X.YY>` with `perldocker/perl-tester:5.42`, but **only when the tag is a literal version** — never touch an image whose tag contains `${{` (those use the matrix variable on purpose).
**Why:** the build job produces the release artifact and the coverage job produces the coverage report. Both should run on the latest stable image, not a stale pin.
**Before:**
```yaml
build:
container:
image: perldocker/perl-tester:5.34
```
**After:**
```yaml
build:
container:
image: perldocker/perl-tester:5.42
```
### 4. Restrict `push:` to the default branch
**What:** in top-level `on.push.branches:`, replace the list with a single-entry list naming the default branch. Leave `pull_request:` and `workflow_dispatch:` alone (even if they have their own `branches:` filter).
**Skip** transform 4 if `on.push:` itself is absent — nothing to restrict. If the key is present but `branches:` is missing, add `branches:` with the resolved default branch.
**Default branch resolution:** Resolve the default branch with `gh repo view --json defaultBranchRef -q .defaultBranchRef.name` (fall back to `main`, then `master`).
**Why:** avoid double CI runs when a push is also part of a PR. Each pushed commit triggers both a push run and a PR run, doubling queue time and burning Actions minutes.
**Before:**
```yaml
on:
push:
branches:
- "*"
pull_request:
workflow_dispatch:
```
**After (default branch is `main`):**
```yaml
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
```
### 5. Add a workflow-level `concurrency:` block
**What:** insert this block at workflow level, directly after the `on:` block:
```yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
```
**Skip** if any `concurrency:` already exists at workflow level — the user has deliberately customised the concurrency block.
**Why:** new pushes to the same ref cancel the still-running job from the previous push.
### 6. Install deps with `setup-cpm` + a `cpm install` run step
**What:** for every step using either `perl-actions/install-with-cpm@<any-ref>` or `perl-actions/install-with-cpanm@<any-ref>`, replace the single composite step with **two** steps:
1. A setup step that installs the single-file `cpm` tool:
```yaml
- uses: perl-actions/setup-cpm@v1
with:
version: compat
```
2. An explicit install run step (faithful arg mapping from the old step):
```yaml
- name: <old-step-name>
run: cpm install -g --cpanfile <cpanfile-value> <args-verbatim>
```
Mapping rules:
- Carry the old step's `name:` onto the `cpm install` run step so the CI log keeps its descriptive label. If the old step had no `name:`, omit it.
- The old `cpanfile:` value becomes `--cpanfile <value>`. If no `cpanfile:` key was present, omit `--cpanfile` (cpm reads `./cpanfile` by default).
- The old `args:` value is appended verbatim after `--cpanfile …` (e.g. `--with-recommends --with-suggests --with-test`).
- Keep `-g` (global install) to preserve `install-with-cpm`'s default global-install behavior.
- **Drop the old `sudo:` key.** No sudo is needed: `perldocker/perl-tester` containers run as root, and `shogo82148/actions-setup-perl` provisions a user-local Perl, so the install target is already writableRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.