pet-development

pet-development is a skill for Claude Code, Codex from nschneir/PET-Project. It costs 66 tokens per session (2,677 once invoked), scanned A, original, MIT.

A development workflow for writing, running, observing, and debugging Commodore PET programs in an emulator. The Commodore PET is a vintage computer, and 6502 is the processor family used by many of its programs.

In plain words
What is it for?
It is for developing Commodore BASIC or 6502 assembly software, viewing screen output, waiting for expected text, and debugging with breakpoints.
Why use it?
It gives the agent a defined loop for checking program output and handling emulator state instead of guessing when a program has finished.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nschneir/pet-project/pet-development
Any agent
npx skills add nschneir/PET-Project --skill pet-development
Clone the repo
git clone --depth 1 https://github.com/nschneir/PET-Project

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pet-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/nschneir/pet-project/pet-development.svg)](https://agentmods.dev/skills/nschneir/pet-project/pet-development)
Your own site
<a href="https://agentmods.dev/skills/nschneir/pet-project/pet-development"><img src="https://agentmods.dev/badge/skills/nschneir/pet-project/pet-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,677 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.02677
Opus 5 $0.00033 $0.01339
Sonnet 5 $0.00013 $0.00535
Haiku 4.5 $0.00007 $0.00268

Measured 5d ago against content hash 7eb6b98fd96d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

pet-development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pet-development/SKILL.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Developing for the Commodore PET

This skill drives an emulated Commodore PET through the pet command line (or the equivalent pet-tools MCP tools). Full command reference: docs/cli.md. Every command takes --json for machine-readable output.

Using MCP instead of the CLI? The tools map mechanically — pet screenpet_screen_text, pet break addpet_break_add, and so on — with the same sessions, semantics, and stopped-state rule. Two differences: pet wait is split into pet_wait_text / pet_wait_mem / pet_wait_break, and wait timeouts return {"fired": null, ...} as data instead of an error.

The loop

Write → run → observe → fix:

  1. Write BASIC (.bas) or 6502 assembly (.s).
  2. pet run FILE — tokenizes/assembles as needed, loads, and RUNs.
  3. Observe with pet screen (decoded screen text) — this is the primary way to see output. Use pet wait --text "..." to block until expected output appears; loading and running take a few emulated seconds even in warp, so never assume a program has finished — wait for a signal.
  4. Fix and repeat.

Start a machine with pet session start before anything else, and pet session stop when done.

Sessions and models

pet session start --model pet4032 boots a PET 4032 (the default). Add --warp to run at full speed for automation and --headless to suppress the window (SDL builds of VICE only — on Linux/GTK3 builds a window may still appear; use xvfb-run -a on a display-less machine). Models: pet2001 (BASIC 1.0), pet3032 (BASIC 2.0), pet4032 (BASIC 4.0), pet8032 and pet8296 (BASIC 4.0, 80-column). The 40- vs 80-column split matters when reading the screen; BASIC version matters for which tokens and ROM routines exist.

Writing BASIC

BASIC sources follow the petcat convention: write keywords AND string text in lowercase. Lowercase ASCII maps to unshifted PETSCII, which the PET displays as uppercase — so 10 print "hello" shows on screen as 10 PRINT "HELLO". Writing uppercase in the source produces shifted PETSCII, which shows as graphics characters instead of letters. This is the single most common mistake.

Read the full file on GitHub · 189 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 189 lines · 66 tokens per session scan A 7eb6b98fd96d

Subscribe to this mod's changes

pet-development is a skill published in the GitHub repository nschneir/PET-Project (1 stars, last pushed 13d ago), licensed MIT. It adds 66 tokens to every session and 2,677 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

c64-development

Use when developing, running, or debugging Commodore 64 software (Commodore BASIC or 6510/6502 assembly) on the VICE emulator with the c64 CLI or the c64-tools MCP server. Covers the build/run/observe/debug loop, the stopped-state discipline, C64 text encodings, graphics and sprites, and the memory map.

nschneir/Project64 · 78 tokens

6502-assembly

Use when writing or debugging 6502 assembly for the Commodore 64 with ca65/ld65 via c64 build or c64 run. Covers the C64 program skeleton, the BASIC SYS stub, calling ROM routines, and 6502 gotchas.

nschneir/Project64 · 58 tokens

cartridge-programming

Use when writing, building, or debugging a Commodore 64 cartridge — plain 8K/16K/Ultimax or bank-switched EasyFlash — with the c64 CLI or the c64-tools MCP server. Covers the two boot mechanisms (CBM80 vs the $FFFC reset vector), the memory modes, cart-native code in ROM, the EasyFlash banking discipline from…

nschneir/Project64 · 96 tokens

6502-debugging

Use when a C64 program misbehaves at runtime — crashes, corruption, wrong values, dead input, visual glitches — and you need a procedure, not a guess. Symptom-indexed playbook of runtime debugging procedures using c64-tools.

nschneir/Project64 · 55 tokens

disk-io-programming

Use when a Commodore 64 program has to touch a disk while it runs — loading levels, music or graphics on demand, saving a high-score file, or streaming a data file byte by byte. Covers the KERNAL LOAD/SAVE and channel calls, device and secondary-address conventions, reading the DOS error channel, and the…

nschneir/Project64 · 89 tokens

analyze-tensegrity-system

Analyze a tensegrity system by identifying compression struts and tension cables, classifying type (class 1/2, biological/architectural), computing prestress equilibrium, verifying stability via Maxwell's rigidity criterion, and mapping biological tensegrity (microtubules, actin, intermediate filaments). Use when…

pjt222/agent-almanac · 94 tokens