A Claude skill for writing Python Karel programs on CodeHS. When this skill is active, Claude can accurately help students write, debug, and understand Karel programs using the correct syntax, commands, and patterns for the CodeHS environment.
Without this skill, Claude may suggest Python constructs that don't exist in Karel's limited world (e.g., turn_right() as a built-in, or standard Python input/output). With this skill loaded, Claude:
- Uses only valid Karel commands and conditions
- Defines helper functions like
turn_right()correctly - Chooses
forvswhileloops appropriately - Follows CodeHS indentation and style conventions
- Recognizes common Karel problem patterns and applies the right recipe
python-karel/
├── SKILL.md ← The skill reference loaded by Claude
└── README.md ← This file
| Section | What It Covers |
|---|---|
| Karel's World | Grid, position, direction, balls |
| Built-in Commands | move(), turn_left(), put_ball(), take_ball() |
| Defining Functions | def, naming rules, calling functions |
| Conditions | Movement, direction, and ball sensing |
| Conditional Statements | if, if/else, examples |
| Loops | for (fixed count) and while (condition-based) |
| Comments | Single-line and multi-line |
| Common Patterns | Turn right, move to wall, collect balls, fill a row |
| Tips | Best practices for decomposition and style |
| Quick Reference Card | All commands and structures at a glance |
This skill is triggered when the user:
- Mentions Python Karel or CodeHS Karel
- Asks for help with a Karel assignment or program
- References Karel commands like
move(),turn_left(),put_ball(), ortake_ball() - Asks about Karel conditions, loops, or functions
- Shares a Karel program to debug or extend
Documentation sourced from the official CodeHS Python Karel reference: https://codehs.com/documentation/new/python-karel/print
| Version | Date | Notes |
|---|---|---|
| 1.0.0 | 2026-04-12 | Initial version based on CodeHS documentation |