Skills to Plugins (`skills-to-plugins`)
This skill provides an expert workflow for migrating legacy flat skills repositories into Agent Plugins v1.0.0 Specification packages, authoring new plugins from scratch, and linting plugins for ongoing spec conformance.
Canonical Specifications
- Agent Plugins Specification: agentplugins/agent-plugins-spec (Normative Text: spec/1.0.0.md)
- Agent Skills Specification: agentskills.io/specification.md
- Reference Summary: See
references/spec-summary.mdfor a condensed lookup table of normative rules and schema boundaries.
Reference & Asset Files (Progressive Disclosure)
references/spec-summary.md— Normative reference for Agent Plugins v1.0.0 and Agent Skills spec constraints.references/discovery-compatibility.md— Detailed analysis ofnpx skills,gemini skills, andagydiscovery algorithms and.claude-plugin/marketplace.jsonindexing.references/migration-playbook.md— Step-by-step phased migration guide (Phases 0 through 5).references/conformance-debt-catalog.md— Symptom and resolution lookup for common skills frontmatter and path anti-patterns.scripts/audit-conformance.sh— Read-only debt auditor that scans a repository for frontmatter issues, oversized descriptions, non-executable scripts, and parent-relative link dependencies.scripts/validate-plugins.sh— Spec validator enforcing$schemaURLs, name↔directory matches, description limits ($\le 1024$), script executable bits, and marketplace JSON syntax.assets/plugin.json.template— Template forplugin.jsonpackage manifest.assets/mcp.json.template— Template formcp.jsonserver definitions.assets/marketplace.json.template— Template for.claude-plugin/marketplace.json.
Modes
Mode 1: Audit an Existing Repository (Read-Only)
Execute a comprehensive, non-destructive audit of an existing skills repository before planning a migration.
- Run the audit script from the repository root:
Terminal window scripts/audit-conformance.sh - Read
references/conformance-debt-catalog.mdto classify every detected debt item (missing frontmatter, oversized descriptions, non-executable scripts, un-nested top-levelversion:fields). - Analyze parent-relative links (e.g.
../sibling/SKILL.md) to identify co-dependent orchestrator and sub-skills that belong in the same plugin bundle. - Present an Audit & Grouping Proposal table to the user listing:
- Conformance debt items to resolve.
- Proposed thematic plugin groupings (
plugins/<plugin-name>/skills/<skill-name>). - Confirmation prompt before proceeding to Mode 2.
Mode 2: Migrate Repository to Agent Plugins v1.0.0
Prerequisite: Mode 1 audit completed and user approved the grouping proposal.
Execute the migration in strict phase order as detailed in references/migration-playbook.md:
- Phase 0 (Hygiene): Add untracked machine-local tooling directories to
.gitignoreand confirm no symlinks escape the repository root. - Phase 1 (Conformance Debt): Resolve all frontmatter issues, truncate descriptions > 1024 characters, move
version:undermetadata:, addlicense: Apache-2.0,chmod +xscripts, and move static assets fromreferences/toassets/. - Phase 2 (Directory Restructure): Execute directory moves into
plugins/<plugin>/skills/<skill>usinggit mvto preserve commit history. - Phase 3 (Manifests): Generate
plugins/<plugin>/plugin.jsonfor each plugin and.claude-plugin/marketplace.jsonat root using templates inassets/. - Phase 4 (Validation): Run
scripts/validate-plugins.shand verify 0 errors.
Mode 3: Author a New Plugin
Create a new conformant plugin package inside an existing or new repository.
- Choose a spec-valid plugin name (
^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$). - Create directory structure
plugins/<plugin-name>/skills/<skill-name>/. - Copy
assets/plugin.json.templatetoplugins/<plugin-name>/plugin.jsonand fill in$schema,name,version, and metadata. - Create
plugins/<plugin-name>/skills/<skill-name>/SKILL.mdwith valid frontmatter (name,description$\le 1024$,license). - Update
.claude-plugin/marketplace.jsonto include the new plugin and skill paths. - Validate with
scripts/validate-plugins.sh.
Mode 4: Lint Ongoing Conformance
Verify ongoing spec compliance for CI/CD or local pre-commit checks.
- Run
scripts/validate-plugins.shlocally or in GitHub Actions (.github/workflows/validate.yml). - Fix any flagged issues: schema URL mismatches, frontmatter description overruns (> 1024 chars), or un-indexed marketplace entries.
Guiding Principles
- Strict Containment (§4.1): Symlinks or relative paths escaping the plugin root violate spec §4.1 containment. Never create symlink farms pointing outside a plugin.
- Cross-Skill Coupling Detection: Parent-relative links (
../) insideSKILL.mdindicate co-dependent skills that MUST be packaged together inside the same plugin root so links resolve legally. - Phase Ordering: Always resolve frontmatter and license debt before running
git mvso history records clean directory renames without noisy content diffs. - Canonical Spec Verification: Always verify specification questions against canonical sources (agentplugins/agent-plugins-spec and agentskills.io/specification.md) rather than relying solely on local summary distillations.