Creates solutions and hints for specific base stages of a Codecrafters course in a given language. Use this skill when the user wants to implement solutions for stages beyond Stage 1 (e.g., 'Add solutions for base stages 2-5 in Rust').
Implement working solutions and hints for specified base stages of a programming language that already has Stage 1 support in the course.
Ensure all necessary tools are installed before proceeding:
curl -fsSL https://bun.sh/install | bash and source the shell configuration (e.g., source ~/.bashrc).sudo service docker startsudo docker infodocker run fails with an error like unable to apply cgroup configuration: cannot enter cgroupv2 ... with domain controllers -- it is in threaded mode, the --memory and --cpus resource limit flags used by are incompatible with the host's cgroup configuration. Fix this by wrapping the binary to strip those flags:
This strips and flags from all invocations, allowing to work in environments where cgroupv2 resource controllers are unavailable.course-sdk testdockersudo mv /usr/bin/docker /usr/bin/docker.real
sudo tee /usr/bin/docker << 'WRAPPER'
#!/bin/bash
args=()
for arg in "$@"; do
case "$arg" in
--memory=*|--cpus=*) ;;
*) args+=("$arg") ;;
esac
done
exec /usr/bin/docker.real "${args[@]}"
WRAPPER
sudo chmod +x /usr/bin/docker
--memory--cpusdocker runcourse-sdk testbun install and make install in the repository root to compile the SDK.Before writing any code, understand what you're building:
stage_descriptions/base-<stage-number>-<stage-slug>.md or equivalent) to understand what each requested stage expects — inputs, expected outputs, and behavior.solutions/python/, solutions/go/, solutions/rust/) for each requested stage. Pay close attention to:
/code/config.yml structure — how hints are written for each stage.solutions/<LANGUAGE>/<previous-stage>/code/ — this is the baseline code you'll build on.For each requested stage, in order:
solutions/<LANGUAGE>/ exists and contains the solution for the stage immediately before the first requested stage (e.g., if implementing stage 3, confirm stage 2's solution is present).solutions/<LANGUAGE>/<NN>-<stage-slug>/code/).
solutions/ folder. Stage directories typically follow a pattern like 01-<slug>/, 02-<slug>/, etc.solutions/<LANGUAGE>/<previous-stage>/code/ into the new stage's code/ directory.solutions/<LANGUAGE>/.solutions/<LANGUAGE>/diff directory, the compile command handles that.For each requested stage, add hints to solutions/<LANGUAGE>/<stage-number>-<stage-slug>/code/config.yml:
config.yml files.config.yml is valid YAML — watch for indentation, multiline strings, and special characters.For each stage, repeat until tests pass:
sudo -E course-sdk compile <LANGUAGE>.
sudo -E course-sdk test <LANGUAGE>.
Once all requested stages pass:
sudo -E course-sdk test <LANGUAGE> to confirm all implemented stages pass together.config.yml to ensure: