PTENES
TRACK 5 β€’ FEATURED

🦜 polyskill β€” cross-runtime skills

One source definition, outputs optimized for each runtime. Claude ↔ Codex round-trip, automatic drift policy, pluggable adapters for new runtimes.

2
Modules
14
Topics
~90min
Duration
Adv.
Level

Learning path map

Detailed content

5.1~45 min

πŸ›οΈ The Agent Skills standard, the pain point, and the polyskill architecture

Before the CLI, the concept. Why polyskill exists and what it solves.

What it is:

An open spec originating at Anthropic and adopted by 40+ tools. It defines the canonical skill format: a file SKILL.md, frontmatter with name e description, Markdown body, folder convention scripts/, references/, assets/.

Why learn:

It's the real common denominator. Everything you write within this spec works in any compatible runtime. Everything outside it ties you to a single runtime.

Key concepts:

The 4 pillars (SKILL.md, name, description, body), folder convention, open commitment, agentskills.io as the authority.

What it is:

You create a skill in Claude. You copy/adapt it for Codex. It works. A week later, you improve the Claude version. You forget to propagate the change. Then you improve the Codex version. You forget again. In a month, you have two DIFFERENT skills, and nobody knows which one is correct.

Why learn:

Without understanding the pain, polyskill seems like overkill. Anyone who has experienced skill drift (or worse, lost a version) understands the value immediately.

Key concepts:

Organic drift, accidental fork, ambiguous source of truth, cognitive cost of β€œwhich version is the right one,” silent functionality breakage.

What it is:

You write the skill ONCE in the canonical portable format (definition.md). The polyskill compiles to dist/claude/ e dist/codex/, each optimized for the target runtime. Like Babel/TypeScript for skills.

Why learn:

This is the "aha moment." Once it clicks that the skill is the source and both outputs are generated, everything else about polyskill makes sense.

Key concepts:

Canonical source, build artifacts (dist/), selective compilation by target, runtime optimization (truncate description, rewrite injection).

What it is:

(1) GO β€” Neutral Internal Representation, not tied to any runtime; (2) Adapters β€” 1 TypeScript file per runtime, able to read AND write its format; (3) CLI β€” orchestrates the adapters through the registry.

Why learn:

Adding a new runtime is literally one file: the adapter. Once you understand this, you know that Gemini, Cursor, and Copilot are β€œjust” new adaptersβ€”not a polyskill rewrite.

Key concepts:

Frontend/middle/backend compiler, plugin via registry, Adapter interface (parse, emit, validate), separation of concerns.

What it is:

The Adapter β€œreads AND writes.” You can import an existing Claude skill (--from claude), make it portable, then emit for both. Same thing starting from Codex (--from codex).

Why learn:

You don’t have to start from scratch. Have a Claude skill you love? Import it, generate the portable version, then emit it. Have a Codex skill? Same process from the other side.

Key concepts:

Required adapter bidirectionality, lossy vs. lossless, support for scripts/, references/, assets/ in every direction.

What it is:

Every time it builds, polyskill calculates hashes of the generated files. On the next build, if any target file was edited by hand, the build aborts with an error. You decide: --force (overwrites) or polyskill reconcile (inspects drift).

Why learn:

Without this, you might manually adjust a Claude output for a specific case, build the next day, and lose the adjustment. Drift policy is your insurance policy.

Key concepts:

File hash, detection of out-of-band modification, opt-in to overwrite (--force), interactive reconciliation, "no silent loss" principle.

What it is:

Polyskill itself comes as an installable skill in both runtimes. You invoke it in natural language: /polyskill converte minha skill x pra funcionar nos dois (Claude) or $polyskill converte ... (Codex). The skill calls the CLI under the hood.

Why learn:

You never memorize flags. You ask in Brazilian Portuguese, and the skill translates it to polyskill import --from claude, polyskill build, etc.

Key concepts:

Skill as a CLI wrapper, NL interface, Path A (drag & drop without CLI) vs. Path B (source + CLI), dogfooding.

View Full
5.2~45 min

⚑ The polyskill CLI in practice

From installation to reconcile. Each command explained and used in a real example.

What it is:

A: copy skill/dist/claude/polyskill to ~/.claude/skills/ e skill/dist/codex/polyskill to ~/.agents/skills/. Works like a skill. B: clones repo, npm install && npm run build && npm link, you get the full CLI.

Why learn:

Path A only runs the skill β€” without the CLI, some commands break. Path B is complete. To build your own cross-runtime skills, B is required.

Key concepts:

Prebuilt bundle vs. source, npm link, validation with polyskill --version e polyskill detect.

What it is:

Command that creates a skill workspace with the portable structure: definition.md (frontmatter YAML + body), folders scripts/, references/, assets/, and build config.

Why learn:

A new skill starts here. You never create SKILL.md by hand β€” create definition.md once, and polyskill takes care of the rest.

Key concepts:

Initial structure, definition.md vs. SKILL.md, minimal frontmatter, interactive body editing.

What it is:

Point to an existing skill in any runtime and generate the equivalent portable workspace. It works both ways: --from claude gets from .claude/skills/, --from codex gets from .agents/skills/.

Why learn:

You have 10 Claude skills you love. Import each with one command, then run build and gets a Codex version of each. Free reverse engineering.

Key concepts:

Import preserves scripts/references/assets, normalizes frontmatter, and converts dynamic injection to prose when it comes from Claude.

What it is:

Generates dist/claude/<skill>/SKILL.md e dist/codex/<skill>/SKILL.md (+ sidecar agents/openai.yaml (when there's branding or MCP deps). It's the compilation step.

Why learn:

It's the command you run every time you edit definition.md. It can (and should) go in a watch or pre-commit hook.

Key concepts:

Hash cache, flag --force to override drift, dist as a git-ignorable output (but the polyskill repo commits it for illustration).

What it is:

Combines build + copy to the canonical directories: ~/.claude/skills/<skill> e ~/.agents/skills/<skill>. The skill instantly becomes available in both runtimes.

Why learn:

It's the command for a "local deploy." After editing, test by running install, run it in the Claude or Codex terminal without manually managing folders.

Key concepts:

Automatic reload (Claude) vs. manual refresh (Codex), idempotency, scope (global vs. project), uninstall (direct rm from the folder).

What it is:

detect shows which runtimes are on the machine; status shows which targets are in sync with the latest build; adapters lists the installed adapters (currently: portable, claude, codex).

Why learn:

For debugging. Skill not triggering? Run detect to check whether the runtime is visible. Weird build? status shows what’s out of sync.

Key concepts:

Read-only commands, script-parseable, JSON output when --json, troubleshooting without editing anything.

What it is:

validate runs a linter per adapter (rules by target: description length limits in Codex, injection syntax in Claude, etc.). reconcile compares dist/ with the installed directories and shows discrepancies, offering a guided merge.

Why learn:

Validate runs in CI before merge. Reconcile resolves the real-world situation where "someone edited it manually outside polyskill."

Key concepts:

Rules per adapter, exit code 0 vs. 1 for CI, interactive drift report, decision to "keep override / overwrite / merge".

View Full
← Track 4: Conversion Track 6: Flows β†’