raylib
About
This skill helps developers leverage raylib's existing API to avoid reinventing solutions for graphics, input, or audio. It directs you to consult the official cheatsheet to find built-in functions before writing custom code. Use it to quickly check for available utilities in modules like shapes, textures, and audio.
Quick Install
Claude Code
Recommended/plugin add https://github.com/EvanLavender13/audio-jonesgit clone https://github.com/EvanLavender13/audio-jones.git ~/.claude/skills/raylibCopy and paste this command in Claude Code to install this skill
Documentation
raylib Development
Check raylib's built-in functions before writing custom implementations.
Cheatsheet First
Reference: https://www.raylib.com/cheatsheet/cheatsheet.html
Before implementing any rendering, input, or audio feature:
- Identify the module (shapes, textures, text, models, shaders, audio)
- Scan that module's functions in the cheatsheet
- Only write custom code if no raylib function exists
Use WebFetch to retrieve and search the cheatsheet when uncertain.
Module Categories
| Module | Covers | Common Functions |
|---|---|---|
| rcore | Window, input, timing | GetFrameTime, IsKeyPressed, GetMousePosition |
| rshapes | 2D primitives | DrawLineEx, DrawRectangleRounded, DrawCircleSector |
| rtextures | Images, textures | DrawTexturePro, LoadRenderTexture, BeginTextureMode |
| rtext | Font rendering | DrawTextEx, MeasureTextEx |
| rmodels | 3D geometry | DrawMesh, LoadModel |
| raudio | Sound, music | LoadSound, PlaySound, SetSoundVolume |
| rlgl | Low-level OpenGL | Use only when raylib lacks the feature |
Before You Implement
Check these functions first for common tasks:
| Task | Check First |
|---|---|
| Thick lines | DrawLineEx(start, end, thickness, color) |
| Rounded rectangles | DrawRectangleRounded, DrawRectangleRoundedLines |
| Rotated/scaled sprites | DrawTexturePro(texture, source, dest, origin, rotation, tint) |
| Bezier curves | DrawLineBezier, DrawLineBezierQuad, DrawLineBezierCubic |
| Render to texture | LoadRenderTexture, BeginTextureMode, EndTextureMode |
| Screen capture | TakeScreenshot, LoadImageFromScreen |
| Shader uniforms | GetShaderLocation, SetShaderValue |
| Delta time | GetFrameTime() returns seconds since last frame |
Naming Conventions
raylib uses consistent verb prefixes:
Load*/Unload*— Resource lifecycleBegin*/End*— Scoped state (drawing, shader, texture mode)Draw*— Immediate renderingGet*/Set*— Property accessIs*— Boolean queries (IsKeyPressed,IsWindowResized)Check*— Collision detection
rlgl: Last Resort
rlgl exposes raw OpenGL. Use only when:
- raylib provides no built-in function
- Performance requires batched custom geometry
- Custom vertex attributes needed
For simple shapes, rshapes functions outperform hand-rolled rlgl.
Verification
When implementing graphics features, verify:
- Searched cheatsheet for existing function
- Checked
rshapesbeforerlgl - Used
DrawTextureProfor any sprite transforms - Paired all
Begin*/End*calls
GitHub Repository
Related Skills
creating-opencode-plugins
MetaThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
evaluating-llms-harness
TestingThis Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.
langchain
MetaLangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.
cloudflare-turnstile
MetaThis skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.
