raylib
关于
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.
快速安装
Claude Code
推荐/plugin add https://github.com/EvanLavender13/audio-jonesgit clone https://github.com/EvanLavender13/audio-jones.git ~/.claude/skills/raylib在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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 仓库
相关推荐技能
creating-opencode-plugins
元该Skill为开发者创建OpenCode插件提供指导,涵盖命令、文件、LSP等25+种事件类型。它详细说明了插件结构、事件API规范及JavaScript/TypeScript实现模式,帮助开发者构建事件驱动的模块。适用于需要拦截操作、扩展功能或自定义AI助手行为的插件开发场景。
evaluating-llms-harness
测试该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。
langchain
元LangChain是一个用于构建LLM应用程序的框架,支持智能体、链和RAG应用开发。它提供多模型提供商支持、500+工具集成、记忆管理和向量检索等核心功能。开发者可用它快速构建聊天机器人、问答系统和自主代理,适用于从原型验证到生产部署的全流程。
cloudflare-turnstile
元这个Skill提供完整的Cloudflare Turnstile集成知识,用于在表单、登录页面和API端点中实现无验证码的机器人防护。它支持React/Next.js/Hono等框架集成,涵盖令牌验证、错误代码调试和端到端测试等场景。通过运行后台不可见挑战,在保持用户体验的同时有效阻止自动化流量和垃圾信息。
