Skip to content

MoYuan-Skills/CodeHS.KarelPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

python-karel.skill

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.


What This Skill Does

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 for vs while loops appropriately
  • Follows CodeHS indentation and style conventions
  • Recognizes common Karel problem patterns and applies the right recipe

File Structure

python-karel/
├── SKILL.md      ← The skill reference loaded by Claude
└── README.md     ← This file

SKILL.md Contents

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

When Claude Uses This Skill

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(), or take_ball()
  • Asks about Karel conditions, loops, or functions
  • Shares a Karel program to debug or extend

Source

Documentation sourced from the official CodeHS Python Karel reference: https://codehs.com/documentation/new/python-karel/print


Version History

Version Date Notes
1.0.0 2026-04-12 Initial version based on CodeHS documentation

About

Here's a concise repo description you can paste into GitHub: > Reference skill for Claude to accurately assist with Python Karel programs on CodeHS — covers commands, conditions, functions, loops, and common patterns.

Topics

Resources

License

Stars

Watchers

Forks

Contributors