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.
npx skills add nschneir/PET-Project --skill 6502-assemblygit clone --depth 1 https://github.com/nschneir/PET-ProjectWrote 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.
[](https://agentmods.dev/skills/nschneir/pet-project/6502-assembly)<a href="https://agentmods.dev/skills/nschneir/pet-project/6502-assembly"><img src="https://agentmods.dev/badge/skills/nschneir/pet-project/6502-assembly.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01874 |
| Opus 5 | $0.00027 | $0.00937 |
| Sonnet 5 | $0.00011 | $0.00375 |
| Haiku 4.5 | $0.00005 | $0.00187 |
Grade A, and why
6502-assembly 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
6502 assembly for the PET
Assemble with ca65/ld65 through pet build FILE.s (produces a .prg plus a
VICE label file) or run in one step with pet run FILE.s (assembles, loads,
and RUNs, registering the labels on the session for symbolic debugging). The
machine-level reference for addresses and ROM routines is the pet-development
skill's reference files (memory map, ROM routines, zero page, PETSCII).
The program skeleton
A PET program loads at $0401 and needs a tiny BASIC stub so that RUN
transfers control to your machine code. This skeleton assembles as-is (it is
the project’s tests/programs/hello-asm example):
; print a message via the ROM CHROUT routine, then return to BASIC.
; Layout: 2-byte load address ($0401), then a BASIC stub "10 SYS 1037",
; then code at $040D (= 1037).
CHROUT = $FFD2
.segment "LOADADDR"
.word $0401
.segment "EXEHDR"
.word nextln ; pointer to next BASIC line
.word 10 ; line number 10
.byte $9E, "1037", $00 ; SYS 1037
nextln: .word $0000 ; end of BASIC program
.segment "CODE"
start: ldx #0
loop: lda msg,x
beq done
jsr CHROUT
inx
bne loop
done: rts
msg: .byte "HELLO FROM ASM", $0D, $00
Why SYS 1037
The load address $0401 is emitted by the LOADADDR segment (not loaded into
RAM as data — it is the PRG header). Starting at $0401 the EXEHDR segment
lays down a single BASIC line — next-line pointer, line number 10, the SYS
token $9E, the digits "1037", and a $00 terminator — followed by the
$0000 end-of-program marker. That stub occupies 12 bytes ($0401–$040C),
so your CODE segment begins at $040D, which is decimal 1037. Hence
SYS 1037 jumps to start. Change the message and the code, not the stub.
Segments available in the linker config: CODE, RODATA, DATA, BSS
(and ZEROPAGE). Put executable code and mutable data in CODE/DATA,
constants in RODATA, and uninitialized storage in BSS.
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.
- 8d ago First seen · 137 lines · 54 tokens per session scan A 4df74f08a0b8
6502-assembly is a skill published in the GitHub repository nschneir/PET-Project (1 stars, last pushed 16d ago), licensed MIT. It adds 54 tokens to every session and 1,874 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.
Other skills, from other repositories
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.
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.
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…
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.
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…
annotate-source-files
Add PUT workflow annotations to source files using the correct language-specific comment prefix. Covers annotation syntax, skeleton generation via putgenerate(), multiline annotations, .internal variables, and validation. Supports 30+ languages with automatic comment prefix detection. Use after analyzing a codebase…