Guide
Agent skills — Claude Code & Qwen Code
One package, both agents: three skills in the Agent Skills layout teach Claude Code and Qwen Code the language, the five media formats and the toolchain — on macOS in the Terminal, on Windows in PowerShell, with a cloud model or a local one through Ollama.
polytone-skills.zip is on the download page behind the early-access password. Inside: polytone (the frozen language card the IDE sends, the verify-and-repair loop, the spec, the whole stdlib reference, the Error Lab, verified examples), polytone-media (the five formats with their full specifications) and polytone-toolchain (finding ptc, every subcommand, tests under mocks, packages, the MCP server, the Pro CLI) — plus install.sh, install.ps1, a context-snippet.md paragraph for your CLAUDE.md or QWEN.md, and a README. Both agents load the same directory shape: Claude Code from .claude/skills/, Qwen Code from .qwen/skills/ (project-level, or in your home directory for every project). Every reference is generated from the toolchain's sources on deploy, so the package always carries this site's version.
macOS, in the Terminal. Unpack the toolchain and the skills next to each other, allow the unsigned binaries once, put ptc on the PATH, install the skills into your project (or --global), paste the context snippet, register the MCP server, start the agent in the project:
# 1. from the download page: the toolchain + the skills
tar -xzf polytone-macos-arm64.tar.gz # Intel: polytone-macos-x86_64.tar.gz
unzip polytone-skills.zip
xattr -d com.apple.quarantine polytone/ptc polytone/polytone-lsp polytone/polytone-mcp
export PATH="$PWD/polytone:$PATH" # add the line to ~/.zshrc to keep it
ptc version
# 2. install the skills into your project (add --global for every project)
cd ~/code/my-project
~/Downloads/polytone-skills/install.sh claude # → .claude/skills/
~/Downloads/polytone-skills/install.sh qwen # → .qwen/skills/
# 3. the context line + the MCP server (toolchain as structured tools)
cat ~/Downloads/polytone-skills/context-snippet.md >> CLAUDE.md # or QWEN.md
claude mcp add polytone -- ~/Downloads/polytone/polytone-mcp
qwen mcp add polytone ~/Downloads/polytone/polytone-mcp
# 4. start the agent here and ask for a .pt program
claude # or: qwenAsk for something small first — "a program that counts the words in a text, with tests". The agent loads the polytone skill, writes the file in canonical form, runs ptc check and ptc test, and reports the real summary line. If it writes from memory without running ptc, the context-snippet paragraph is missing from CLAUDE.md / QWEN.md — that one line is the reliable trigger for both agents.
Windows, in PowerShell, with a local model through Ollama. Ollama serves the OpenAI-compatible API Qwen Code speaks and the Anthropic-compatible API Claude Code speaks, so either agent runs fully locally. Install Ollama from ollama.com/download, pull a coding model, and raise the context length: quit Ollama in the tray, create the user environment variable OLLAMA_CONTEXT_LENGTH = 65536 (Settings → Edit environment variables for your account), start Ollama again — its default of 4096 is far too small for an agent loop; 64k or more is recommended. Then:
# 1. from the download page: the toolchain + the skills
Expand-Archive polytone-windows-x86_64.zip -DestinationPath .
Expand-Archive polytone-skills.zip -DestinationPath .
$env:Path = "$PWD\polytone;$env:Path" # this session; System settings → Path to keep it
ptc version
# 2. the local model
ollama pull qwen3-coder # then OLLAMA_CONTEXT_LENGTH = 65536, see above
# 3a. Qwen Code against Ollama (OpenAI-compatible endpoint)
npm install -g @qwen-code/qwen-code@latest # needs Node.js 22+
$env:OPENAI_BASE_URL = "http://localhost:11434/v1"
$env:OPENAI_API_KEY = "ollama"
$env:OPENAI_MODEL = "qwen3-coder" # or put the three lines into .qwen\.env
# 3b. Claude Code against Ollama (Anthropic-compatible endpoint)
irm https://claude.ai/install.ps1 | iex
$env:ANTHROPIC_BASE_URL = "http://localhost:11434"
$env:ANTHROPIC_AUTH_TOKEN = "ollama"
$env:ANTHROPIC_API_KEY = ""
# 4. install the skills into the project + register the MCP server
cd C:\code\my-project
powershell -ExecutionPolicy Bypass -File ..\polytone-skills\install.ps1 qwen # or: claude
Get-Content ..\polytone-skills\context-snippet.md | Add-Content QWEN.md # or: CLAUDE.md
qwen mcp add polytone C:\path\to\polytone\polytone-mcp.exe
claude mcp add polytone -- C:\path\to\polytone\polytone-mcp.exe
# 5. start
qwen # or: claude --model qwen3-coderThe environment variables live for the PowerShell session; to keep them, set them once as user variables (the same Settings dialog as OLLAMA_CONTEXT_LENGTH) or, for Qwen Code, put the OPENAI_* lines into .qwen\.env inside the project, which Qwen Code loads automatically. ollama launch claude does steps 3b and 5 in one go. With a cloud account instead of Ollama, skip step 2 and the four $env lines of 3a/3b — everything else is identical.