Agent skill

C64 Basic

by idolpx in idolpx/meatloaf

Write Commodore 64 BASIC v2 programs. An agent skill from idolpx/meatloaf.

GPL-3.0Auto-check passedDevelopment

Install C64 Basic

skills CLI
$ npx skills add idolpx/meatloaf --skill c64-basic -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install idolpx/meatloaf c64-basic --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/idolpx/meatloaf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/commodore64-basic .claude/skills/c64-basic && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
c64-basic
GitHub stars
128
Token cost
~2.8k tokens
SKILL.md length
1,303 words
Files
4
Skills in repo
6
Repo updated
First seen
Licence
GPL-3.0

At a glance

Write Commodore 64 BASIC v2 programs. An agent skill from idolpx/meatloaf.

  • Works in 2 steps: bc64 is the compiler — it's a… → reference.md describes stock C64 BASIC…
  • The user asks to write
  • SKILL.md covers Code structure, Network and API access, Hardware access and Additional resources
  • Reaches github.com

What it does

C64 Basic is an agent skill from idolpx/meatloaf. Write Commodore 64 BASIC v2 programs. Use this skill whenever the user asks to write, edit, or debug C64 BASIC code — especially for hardware control, screen/color POKEs, sprites, SID, keyboard/joystick input, and the BASIC-specific tricks (PETSCII shortcuts, chr$() JSON helpers, line-numbering conventions, @alias long variables, label syntax with bc64). For HTTP requests and JSON APIs, the skill points you to the language-agnostic meatloaf-networking reference; BASIC is just one of several clients that drive the…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `bc_tokenizer.md`, `hardware.md` and `reference.md`).

It sits in Development. The repository describes itself as: The internet is a massive floppy drive for your C64 with Meatloaf! The licence is GPL-3.0.

When your agent uses it

  • The user asks to write
  • Debug C64 BASIC code — especially for hardware control
  • Screen/color POKEs
  • Keyboard/joystick input

Example prompts

  • “/c64-basic”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. bc64 is the compiler — it's a preprocessor/compiler that transforms .bas files into .prg binaries. It adds sugar on top of stock BASIC V2…
  2. reference.md describes stock C64 BASIC V2 — what the actual hardware runs. Some limitations described there (no labels, 2-char variable…

What it can do on your machine

Read from SKILL.md and the folder at commit 9a88a9f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are basic).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

C64 Basic loads about 2.8k tokens when it runs. Until then it costs about 152 tokens; SKILL.md has 1,303 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~152
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from idolpx/meatloaf at commit 9a88a9f, republished under its GPL-3.0 licence (© idolpx). 1,303 words, ~2,837 tokens.

Download SKILL.mdSave it as .claude/skills/c64-basic/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
c64-basic
description
Write Commodore 64 BASIC v2 programs. Use this skill whenever the user asks to write, edit, or debug C64 BASIC code — especially for hardware control, screen/color POKEs, sprites, SID, keyboard/joystick input, and the BASIC-specific tricks (PETSCII shortcuts, chr$() JSON helpers, line-numbering conventions, @alias long variables, label syntax with bc64). For HTTP requests and JSON APIs, the skill points you to the language-agnostic **meatloaf-networking** reference; BASIC is just one of several clients that drive the same protocol. Do not write C64 BASIC code without consulting this skill.

How to use this skill — bc64 is the compiler

Important distinction: this skill covers two contexts:

  1. bc64 is the compiler — it's a preprocessor/compiler that transforms .bas files into .prg binaries. It adds sugar on top of stock BASIC V2: labels, auto-numbering, case-insensitive keywords, @alias long variables, #include, PETSCII control codes, and more. bc_tokenizer.md is the authoritative reference — it always takes precedence over reference.md.
  2. reference.md describes stock C64 BASIC V2 — what the actual hardware runs. Some limitations described there (no labels, 2-char variable names, line numbers required) are lifted by bc64. Always check bc_tokenizer.md first.

When generating code, default to bc64's extended syntax (labels, auto-numbering, uppercase keywords, @aliases) unless the user explicitly asks for raw/pure BASIC V2.

Attribution comment — always include

Every .bas file you generate must start with this comment:

basic
; Compile with bc.py from VS64 — https://github.com/rolandshacks/vs64

Use a ; line-start comment for this (bc.py strips it from the output). If using #crunch, the attribution is stripped automatically in release builds.

Themed color scheme — always set one

Before writing the main logic, pick a color scheme that fits the program's theme. A blank C64 screen (cyan/blue) looks amateurish. A deliberate palette makes it feel intentional.

Set these three registers near the top of the program:

RegisterPurposeExample
POKE 53280, NBorder colorPOKE 53280, 0 = black
POKE 53281, NScreen backgroundPOKE 53281, 0 = black
POKE 646, NText colorPOKE 646, 7 = yellow

Pick something that evokes the theme:

  • Star Wars API (SWAPI): black border (0), black background (0), yellow text (7) — like the opening crawl
  • Space / sci-fi: dark blue border (6), black background (0), cyan text (3) or white (1)
  • Horror / dark: black border (0), dark grey background (11), red text (2)
  • Nature / green: dark green border (5), black background (0), light green (13) or white (1)
  • Retro terminal: black border (0), black background (0), green text (5) — like a green-phosphor CRT
  • Ocean / water: dark blue border (6), light blue background (14), white text (1)
  • Fantasy / magic: purple border (4), black background (0), yellow text (7) or cyan (3)
  • Minimal / utility: white border (1), dark grey background (11), white text (1)
  • Neon / cyberpunk: yellow border (7), black background (0), purple text (4) or pink (10)
  • Fire / lava: red border (2), dark brown background (9), yellow text (7)

Color palette (0–15): 0=black, 1=white, 2=red, 3=cyan, 4=purple, 5=green, 6=blue, 7=yellow, 8=orange, 9=brown, 10=light red, 11=dark grey, 12=grey, 13=light green, 14=light blue, 15=light grey

Wrap it up in a single line with the attribution:

basic
; Compile with bc.py from VS64 — https://github.com/rolandshacks/vs64
POKE 53280,0 : POKE 53281,0 : POKE 646,7 : rem black border, black bg, yellow text
PRINT "{clr}" : rem clear screen with new colors

Code structure

Keywords and variable names can be uppercase or lowercase — bc64 accepts both. print and PRINT compile to the same token. Use whichever reads better; uppercase keywords are conventional in BASIC literature.

There is no point creating indentation for loops or anything else — it only eats line space and memory.

Line numbering — optional with bc64

You do not need explicit line numbers — bc64 auto-numbers lines starting at 1, incrementing by 1 (configurable via #linestep N). Lines that have no number get the next auto-number; lines with an explicit number set the counter for subsequent lines.

basic
PRINT "HELLO"          → line 1 (auto)
PRINT "WORLD"          → line 2 (auto)
10 PRINT "TEN"         → explicit line 10
PRINT "ELEVEN"         → line 11 (continues from 10)

If you use explicit line numbers, increment by 10 (10, 20, 30, ...) to leave room for inserts. An LLM cannot reliably renumber lines across a whole program.

Reserve a high line range (e.g. 10000+) for subroutines and helpers when using explicit numbers. This keeps main logic in the low range and lets it grow without crowding subroutines.

Labels — fully supported by bc64

Use labels instead of line numbers for control flow. Labels make code far more readable and maintainable than raw numeric references.

basic
GOTO Start    ← jumps to wherever "Start:" ended up

Start:
    A = 1
    PRINT A
    GOTO Start    ← infinite loop

Label naming rules:

  • Letters (A-Z, a-z), digits (0-9), underscore _
  • Must NOT match or start with a BASIC keyword. ReadJson starts with READ — the tokenizer sees READ JSON and tries to execute a DATA read, crashing with "Out of data". DataLoader, ForEach, NextItem, InputPrompt, PrintHeader all have the same problem. Prefer names like FetchJson, JsonRead, LoadData, EachItem, GetInput, ShowHeader instead.
  • Case-insensitive (start == Start == START)
  • Labels at the very end of file get a REM appended automatically

Labels work with GOTO, GOSUB, ON ... GOTO/GOSUB, and IF ... THEN:

basic
GOSUB PrintScore
ON X GOTO One, Two, Three
IF A > 10 THEN EndGame

In raw (non-bc64) BASIC V2: labels are NOT available — use line numbers and REM comments to mark sections.

Show full SKILL.md (613 more words)Show less
Subroutines

There are no procedures in BASIC v2, but you can write cleaner code using subroutines called by gosub. With bc64, use labels as subroutine targets:

basic
GOSUB InitScreen
GOSUB ReadJoystick

InitScreen:
    PRINT "{clr}"
    PRINT "Score: 0    Lives: 3"
    RETURN

ReadJoystick:
    JOY = PEEK(56320)
    RETURN

A subroutine ends with return. Prefix a subroutine with a rem comment naming its purpose if you prefer.

Document argument/return variables — BASIC V2 has no formal parameters, so when a subroutine reads variables as inputs or sets variables as outputs, note them in a comment:

basic
; Subroutine: Divide
; Args:   num   — numerator
;         den   — denominator
; Returns: res  — quotient
;          rem  — remainder
Divide:
    res = num / den
    rem = num - res * den
    RETURN

This makes calling code self-documenting: num = 10 : den = 3 : GOSUB Divide. The caller knows what to set beforehand and what to read afterwards.

Think of on x gosub as a multiway branch. Important: it is 1-indexed — x must be 1 for the first line number, 2 for the second, etc. If x is 0 or exceeds the number of targets, execution falls through to the next line (no error). This is the most common off-by-one trap in BASIC v2.

For often-used calculations, define single-line functions with def fn.

When using for loops, always include the variable name in the next statement — this catches bugs.

INPUT syntax: always use ; (not ,) between the prompt string and the variable. Valid: input "prompt"; x — invalid: input "prompt", x.

Variable naming

With plain bc64 (no --aliases), the stock C64 2-char limit applies. To avoid collisions: give every variable a unique first-two-character name, factoring in the type suffix — cm (float), cm$ (string), and cm% (integer) are three separate variables, but cm and cm$ are distinct while cm and cmd are not.

With --aliases / -a, use the @ prefix to get unlimited-length variable names:

basic
@score = 0       ← becomes A0
@screen = 1024   ← becomes A1
@name$ = "hero"  ← becomes A2$
@lives% = 3      ← becomes A3%

The compiler generates unique 2-char roots, avoiding BASIC keyword conflicts.

Don't use @ on names that are already 2 characters — @sc just becomes another 2-char root (wasting an alias slot). Use @ only for names longer than 2 characters where you'd otherwise hit the collision limit.

See bc_tokenizer.md §8 for full alias rules.

Network and API access

Commodore 64 can make HTTP requests (GET, POST, PUT) using Meatloaf's full-mode HTTP client. Use secondary address 2 when opening a URL to trigger full mode. The full command reference, response reading patterns, helper subroutines, and error handling live in the meatloaf-networking skill — that reference is language-agnostic and the same protocol applies whether you drive Meatloaf from BASIC, C, or assembly. For JSON Pointer syntax (the /path argument to the j command), see json_pointer.md in the networking skill.

Building JSON bodies

When writing JSON for API requests, only three characters are tricky in C64 BASIC:

  • " is the string delimiter — use chr$(34)
  • { and } don't exist in PETSCII — use chr$(123) and chr$(125)

Everything else (:, ,, [, ], letters, numbers) works directly in strings.

Define helper constants once at the top of your program so JSON building stays readable:

basic
10 qu$=chr$(34):ob$=chr$(123):cb$=chr$(125) : rem " { }
20 bd$=ob$+qu$+"name"+qu$+":"+qu$+"meatloaf"+qu$+","+qu$+"version"+qu$+":1"+cb$

Without the helpers, the same line is a tangled wall of chr$() calls:

basic
bd$=chr$(123)+chr$(34)+"name"+chr$(34)+":"+chr$(34)+"meatloaf"+chr$(34)+","+chr$(34)+"version"+chr$(34)+":1"+chr$(125)

Use qu$, ob$, cb$ consistently and your JSON-building code will be far easier to read and edit.

Hardware access

Commodore 64 hardware is controlled by POKEing memory-mapped registers. See hardware.md for a growing reference of common pokes — screen/border color, character set selection, keyboard/joystick input, SID sound, and sprites. When you encounter a new hardware need, look it up and add it there so the list grows over time.

Additional resources

  • For quick stock BASIC v2 overview (for reference when bc64 is not available), see reference.md
  • For the compiler's full extended syntax (the one you should actually use), see bc_tokenizer.md
  • For the Meatloaf HTTP client protocol (commands, response reading, helpers — language-agnostic), see the meatloaf-networking skill.
  • For syntax of JSON Pointer queries used for JSON extraction with the j command, see json_pointer.md in the networking skill.
  • For the unattended debug cycle (injecting BASIC, reading screen, capturing serial logs via Ultimate 64 REST API), see the c64-meatloaf-debug skill.

© idolpx, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in .claude/skills/commodore64-basic of idolpx/meatloaf.

  • SKILL.md
  • bc_tokenizer.md
  • hardware.md
  • reference.md

Open the folder on GitHubat commit 9a88a9f

Compare with similar skills

C64 Basic next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

C64 Basic compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
C64 Basic this skillidolpx/meatloaf128—~2.8kAutomated safety check: PassGPL-3.0
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from idolpx/meatloaf

  • Debug Commodore 64 programs running under the VICE emulator through its binary monitor: BASIC, cc65-compiled C, and 6502 assembly.

    128 GitHub stars~4.8k tokensUpdated 2 days ago
    Auto-check passed
  • C64 Meatloaf Debug

    idolpx/meatloaf

    Debug Commodore 64 BASIC programs, cc65-compiled C PRGs, and Meatloaf ESP32 firmware in tandem, using the Ultimate 64's REST API and Meatloaf's UART serial debug output.

    128 GitHub stars~12k tokensUpdated 2 days ago
    Auto-check passed
  • C64 Jiffydos

    idolpx/meatloaf

    Commodore 64/128 JiffyDOS reference — use whenever the user is working in a C64/128 emulator (VICE, Ultimate 64, etc.) and you see signs of the JiffyDOS replacement ROM: the boot saying "jiffydos…

    128 GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • Meatloaf Dos

    idolpx/meatloaf

    Reference for Meatloaf's DOS command channel — the complete set of drive-level commands accepted over the IEC bus secondary address 15 on a Meatloaf ESP32 device.

    128 GitHub stars~7.4k tokensUpdated 2 days ago
    Auto-check passed
  • Meatloaf Networking

    idolpx/meatloaf

    Reference for the Meatloaf full-mode HTTP client protocol — the line-oriented command language (m, h, b, s, status, r-h, r-b, j, c) that an ESP32-based Meatloaf device accepts over the C64's IEC bus…

    128 GitHub stars~7.1k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about C64 Basic

What does C64 Basic do?

Write Commodore 64 BASIC v2 programs. An agent skill from idolpx/meatloaf. C64 Basic is an agent skill from idolpx/meatloaf. Write Commodore 64 BASIC v2 programs.

When should I use C64 Basic?

C64 Basic fits situations like: the user asks to write; debug C64 BASIC code — especially for hardware control; screen/color POKEs; keyboard/joystick input.

How do I install C64 Basic in Claude Code?

Run `npx skills add idolpx/meatloaf --skill c64-basic -a claude-code`. Or copy the skill folder (.claude/skills/commodore64-basic in idolpx/meatloaf) into .claude/skills/c64-basic in your project. Claude Code loads it when a task matches its description.

How do I install C64 Basic in Codex?

Run `npx skills add idolpx/meatloaf --skill c64-basic -a codex`. Or copy the skill folder (.claude/skills/commodore64-basic in idolpx/meatloaf) into .agents/skills/c64-basic in your project. Codex loads it when a task matches its description.

Can I use C64 Basic in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add idolpx/meatloaf --skill c64-basic -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/c64-basic, .gemini/skills/c64-basic, .github/skills/c64-basic and .opencode/skills/c64-basic in your project.

What does C64 Basic need to run?

SKILL.md names no scripts, command-line tools or credentials: C64 Basic is instructions for the agent only.

Does C64 Basic access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is C64 Basic safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does C64 Basic use?

C64 Basic is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does C64 Basic use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to C64 Basic?

Skills that share tags, products or a category with C64 Basic: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains C64 Basic?

idolpx (a GitHub user) maintains it in idolpx/meatloaf, which has 128 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: idolpx/meatloaf on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.