dev-engine-lesson
Add an engine/toolchain lesson — build systems, C fundamentals, debugging, project structure
от Nebulavenus★ 51 звезда на GitHub
Установить dev-engine-lesson в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Create a new engine lesson teaching practical engineering skills — the build systems, C language features, debugging techniques, and project structure that make graphics applications work.
When to use this skill:
- You need to teach a concept about CMake, compilers, linkers, or build systems
- A learner is struggling with C language features (pointers, memory, structs)
- A GPU lesson requires build/toolchain knowledge that isn't covered yet
- You want to explain debugging techniques or common error patterns
- A lesson should cover adding or extending engine features — resource managers, asset pipelines, configuration systems, logging, input abstraction, or other infrastructure that supports a graphics application
Smart behavior:
- Before creating a lesson, check if an existing engine lesson already covers it
- Engine lessons are practical — they should include a buildable example project
- Focus on the why behind tools and techniques, not just the how
- Show common errors and how to diagnose them — this is what learners actually need
- Cross-reference GPU and math lessons where the concept appears in practice
Arguments
The user (or you) can provide:
- Number: two-digit lesson number (e.g. 01, 02)
- Topic name: kebab-case (e.g. cmake-fundamentals, pointers-and-memory)
- Description: what this teaches (e.g. "CMake targets, properties, linking")
If any are missing, infer from context or ask.
Steps
1. Analyze what's needed
- Check existing engine lessons: Is there already a lesson for this topic?
- Identify the scope: What specific concepts does this lesson cover?
- Find cross-references: Which GPU/math lessons use or benefit from this knowledge?
2. Create the lesson directory
lessons/engine/NN-topic-name/
3. Create an example program (main.c)
A small, focused C program that demonstrates the concept. Engine lessons differ from GPU lessons — the program might:
- Show a build concept in action (e.g. linking, include paths)
- Demonstrate a C language feature (e.g. pointer arithmetic, struct layout)
- Reproduce and fix a common bug (e.g. memory leak, uninitialized variable)
- Print diagnostic output explaining what's happening
Requirements:
- Standalone — Builds independently with its own CMakeLists.txt
- Clear output — Shows the concept through printed results or behavior
- Well-commented — Explains what's happening and why
- Demonstrates errors — Where appropriate, show what goes wrong and how to fix it (commented-out "wrong" versions are valuable)
Template structure:
/*
* Engine Lesson NN — Topic Name
*
* Demonstrates: [what this shows]
*
* SPDX-License-Identifier: Zlib
*/
#include <SDL3/SDL.h>
int main(int argc, char *argv[])
{
(void)argc;
(void)argv;
/* SDL_Init(0) initializes no subsystems — just core SDL state and error
* handling. This gives us SDL_Log and SDL_GetError without pulling in
* video, audio, etc. Pass SDL_INIT_VIDEO when you need a window. */
if (!SDL_Init(0)) {
SDL_Log("SDL_Init failed: %s", SDL_GetError());
return 1;
}
/* Demonstrate the concept here */
SDL_Quit();
return 0;
}
Notes on the template:
- Use
SDL_Loginstead ofprintffor consistent cross-platform output - Include SDL even for non-GPU lessons — it provides platform abstractions
(
SDL_Log,SDL_malloc,SDL_GetBasePath) that are used throughout forge-gpu - If the lesson truly needs no SDL functionality, a plain
printf-based program is acceptable
Console output formatting:
- Use ASCII-only characters for console output (cross-platform compatibility)
- Avoid Unicode box-drawing, symbols, or special characters that may not render on Windows Terminal
- Good:
-,=,*,|,->,[OK],[!], "bytes", "offset" - Bad:
─,═,•,↓,→,✓,⚠(may render as garbled text on Windows)
4. Create CMakeLists.txt
add_executable(NN-topic-name main.c)
target_include_directories(NN-topic-name PRIVATE ${FORGE_COMMON_DIR})
target_link_libraries(NN-topic-name PRIVATE SDL3::SDL3)
add_custom_command(TARGET NN-topic-name POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:SDL3::SDL3-shared>
$<TARGET_FILE_DIR:NN-topic-name>
)
Adapt as needed: Some engine lessons may need additional sources, headers,
or libraries depending on the topic. For example, a lesson on multi-file
projects would have multiple .c files.
5. Create README.md
Structure:
# Engine Lesson NN — Topic Name
[Brief subtitle explaining what this teaches]
## What you'll learn
[Bullet list of concepts covered]
## Why this matters
[1-2 paragraphs connecting this topic to real graphics/game development.
Explain when and why a learner will encounter this.]
## Result
[Brief description of what the example program demonstrates]
**Example output:**
```text
[Copy actu
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-engine-lesson?
Add an engine/toolchain lesson — build systems, C fundamentals, debugging, project structure
Как установить скилл dev-engine-lesson?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-engine-lesson запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…