From ajbm-dev
Transforms PAI-embedded skills into standalone Claude Code plugin skills by stripping PAI-specific scaffolding, decoupling from PAI runtime dependencies, and applying Anthropic skill best practices.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ajbm-dev:pai-skill-transferThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
PAI (Personal AI Infrastructure) ships excellent skills, but they assume the PAI runtime — a specific harness with its own memory system, Algorithm workflow, customization directory, and voice-notification hooks. When you want one of those skills to work as a standard Claude Code plugin skill (marketplace-distributable, portable across environments, usable without PAI installed), you need to tr...
PAI (Personal AI Infrastructure) ships excellent skills, but they assume the PAI runtime — a specific harness with its own memory system, Algorithm workflow, customization directory, and voice-notification hooks. When you want one of those skills to work as a standard Claude Code plugin skill (marketplace-distributable, portable across environments, usable without PAI installed), you need to transform it.
This skill describes the transformation.
~/.claude/skills/<name>/ is being pulled into a marketplace plugin## Customization block pointing to ~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/… and it needs to work for users who don't have PAIPAI skills typically carry six categories of environment-specific content. Each needs a decision: strip, rewrite generically, or keep but document the dependency.
| PAI element | Default action | Notes |
|---|---|---|
## Customization block referencing ~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/ | Strip | Path won't exist for plugin users |
Voice curl (curl -s -X POST http://localhost:8888/notify …) | Strip | PAI-specific notifier — not a portable dependency |
PAI/Algorithm/ references, phase names (OBSERVE/THINK/PLAN/BUILD/EXECUTE/VERIFY/LEARN) | Rewrite generically | e.g., "the calling workflow's planning phase" |
MEMORY/WORK/{slug}/PRD.md | Rewrite or strip | Mention a working-log pattern without PAI specifics, or drop |
| ISC (Ideal State Criteria) terminology | Rewrite generically | "verifiable criteria", "acceptance checks" |
~/.claude/PAI/… paths | Rewrite skill-local | Reference files inside the skill's own directory |
{PRINCIPAL.NAME} or other {PRINCIPAL.*} template vars | Strip or rewrite | Replace with generic nouns ("the user", "someone") or drop the sentence |
Canonical-doc references (PAI/USER/WRITINGSTYLE.md, PAI/USER/WORLDVIEW.md, etc.) | Drop or inline | If the referenced content is already present in the skill, drop the reference. If load-bearing, inline the relevant portion. |
Parent router SKILL.md (just a Route To table pointing to child skills) | Often collapse | One child → flatten. Multiple children → split into separate plugin skills. |
Hardcoded external CLI tools (fabric -y, specific unusual commands) | Soften | Rephrase as "if installed" or list alternatives; provide a fallback for users without it. |
Apply this sequentially to each SKILL.md and every reference file in the transfer:
## Customization block if it references SKILLCUSTOMIZATIONS (including the header itself, not just the path)curl … localhost:8888/notify voice commands (and the prose around them)PRDSync hook references, work.json referencesimplied_sentiment / algorithm-reflections.jsonl write instructions{PRINCIPAL.NAME} / {PRINCIPAL.*} template variables — replace with generic nouns or drop the sentencePAI/USER/WRITINGSTYLE.md, PAI/USER/WORLDVIEW.md, etc.) unless load-bearing — in which case inline the relevant portion(CRITICAL) / (REQUIRED) / ALL-CAPS parenthetical suffixes on section headers — use softer language ("non-negotiable", "required") or dropPAI/Algorithm/ or "the Algorithm" with "the calling workflow" or dropISC criteria with "verifiable criteria" or "acceptance checks"MEMORY/WORK/{slug}/PRD.md pattern with "a working log file in the task's directory" (if the pattern is useful) or drop~/.claude/PAI/* paths with references/ or similar skill-local pathsEFFORT LEVEL / tier names (Standard, Extended, Advanced, Deep, Comprehensive) with generic effort languagename (kebab-case) and description (with USE WHEN cluster)If the skill is part of the Algorithm (a thinking mode), reframe it as standalone: "This technique can be invoked during any planning or decision phase" — describe it as a tool, not as a stage.
If the skill is called by the Algorithm (skill-distiller, authoring-skills), rewrite references generically ("when you need to capture patterns from a working session" instead of "during the Algorithm's LEARN phase").
If the writing is incidental (logging progress), replace with a skill-local working-log pattern (./working-log.md in the task's output dir, or drop entirely).
If the writing is the core deliverable (PRD stubs for session tracking), the skill is Algorithm-coupled — consider whether transferring it makes sense at all. Sometimes the right answer is "this skill can't be meaningfully ported without its runtime."
These work fine in standard Claude Code plugins (Task tool, TeamCreate tool are available). Just remove any PAI-specific references to agent definitions (~/.claude/agents/Engineer.md etc.) and let the user spawn standard subagents.
Note Opus 4.7 spawns fewer subagents by default — if the skill relies on parallel subagents, make the spawn triggers explicit in the transferred skill.
Always strip. The voice is a PAI-user preference, not a skill feature. No curl commands that depend on a specific local service.
Always strip. Customizations are out of band for plugin skills — if users want to customize, they fork the plugin.
SKILL.md only has a Route To table)"PAI uses a pattern where a container skill (ContentAnalysis/) routes to one or more child skills (ContentAnalysis/ExtractWisdom/). For plugin transfer:
SKILL.md, move child Workflows/*.md into references/.references/routing.md or expand the parent SKILL.md to describe the whole flow inline.These files exist only in PAI. Two options:
Never leave a dangling PAI/USER/… path in a plugin skill.
Don't assume plugin users have PAI-user tooling installed. Soften:
fabric -y on the URL" → "Use a transcript tool (e.g., fabric -y if installed, yt-dlp --write-auto-sub, or a captioning service). Fall back to asking the user for the transcript if none are available."Keep the tool name as a hint, but don't make it a hard dependency.
Once PAI-specifics are stripped, apply the standard checklist:
name (kebab-case, matches directory) and description under 1024 chars with trigger keywordsreferences/ for more)references/{name}.mdreferences/---
name: IterativeDepth
description: 2-8 scientific lens passes to surface hidden requirements single-pass analysis misses. USE WHEN iterative depth, deep exploration, multi-angle analysis, multiple perspectives, examine from angles, surface hidden requirements.
---
## Customization
**Before executing, check for user customizations at:**
`~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/IterativeDepth/`
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
# IterativeDepth
**Structured multi-angle exploration of the same problem to extract deeper understanding and richer ISC criteria.**
Grounded in 20 established scientific techniques across cognitive science...
## Core Concept
Instead of analyzing a problem once, run 2-8 structured passes through the same problem, each from a systematically different **lens**. Each pass surfaces requirements, edge cases, and criteria invisible from other angles. The combination yields ISC criteria that no single-pass analysis could produce.
---
name: iterative-depth
description: USE WHEN iterative depth, deep exploration, multi-angle analysis, multiple perspectives, examine from angles, surface hidden requirements. 2-8 scientific lens passes to surface hidden requirements single-pass analysis misses.
---
# iterative-depth
Structured multi-angle exploration of the same problem to extract deeper understanding and richer acceptance criteria.
Grounded in 20 established scientific techniques across cognitive science...
## Core Concept
Instead of analyzing a problem once, run 2-8 structured passes through the same problem, each from a systematically different **lens**. Each pass surfaces requirements, edge cases, and criteria invisible from other angles. The combination yields acceptance criteria that no single-pass analysis could produce.
Changes: frontmatter name kebab-cased, customization block dropped, "ISC criteria" → "acceptance criteria" (twice). The substance is untouched.
Source tree:
ContentAnalysis/
├── SKILL.md (14 lines — just a routing table)
└── ExtractWisdom/
├── SKILL.md (229 lines — the real skill)
└── Workflows/
└── Extract.md (60 lines — procedure reference)
Destination tree:
content-analysis/
├── SKILL.md (promoted from ExtractWisdom/SKILL.md)
└── references/
└── extract-workflow.md (moved from Workflows/Extract.md)
Router parent dropped entirely — it had one child, so it was dead weight. The child's content becomes the new skill's root. Workflow files move into references/ (the plugin convention for progressive disclosure).
grep -r "PAI\|SKILLCUSTOMIZATIONS\|MEMORY/WORK\|Algorithm" <destination>/ — should return zero results (or only legitimately generic mentions).IterativeDepth/, destination should be iterative-depth/. Claude Code works with both but repo convention is kebab-case.After the transfer, verify:
DEST=plugins/<plugin>/skills/<skill>
# No PAI markers remaining (includes template vars, canonical docs, Customization headers, voice_id tokens)
grep -rnE 'PAI/|SKILLCUSTOMIZATIONS|MEMORY/WORK|PRD\.md|ISC criteria|Algorithm phase|localhost:8888/notify|\{PRINCIPAL|WRITINGSTYLE|WORLDVIEW|^## Customization|voice_id' "$DEST/" || echo "clean"
# All SKILL.md have frontmatter
for f in $(find "$DEST" -name SKILL.md); do
head -1 "$f" | grep -q '^---$' || echo "missing frontmatter: $f"
done
# Directory basenames are kebab-case (strips absolute path so uppercase in parent dirs doesn't false-positive)
find "$DEST" -maxdepth 2 -type d | awk -F/ '{print $NF}' | grep -E '[A-Z]' && echo "PascalCase/camelCase dirs found" || echo "naming clean"
skill-distiller — for extracting reusable patterns from a working session (not PAI-transfer specific)prompt-craft — for refining the transferred skill's description after stripping PAI contentbe-creative — example of a well-formed post-rework skill in this repo (was originally PAI-adjacent, now standalone)npx claudepluginhub ajbmachon/ajbm-skills --plugin ajbm-devProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.