From story-to-ship
Use when building, adding dependencies, configuring CMake options, troubleshooting build failures, or managing Flatpak packaging for Particle-Viewer.
How this skill is triggered — by the user, by Claude, or both
Slash command
/story-to-ship:buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
YOU MUST BUILD LOCALLY AND VERIFY IT PASSES BEFORE EVERY PUSH.
No exceptions.
Violating the letter of this rule is violating the spirit of this rule.
Announce at start: "I am using the build skill to [build/configure/troubleshoot] [description]."
Before pushing any change:
cmake --build build exits 0 - no build errors./build/tests/ParticleViewerTests exits 0 - all tests passFetchContent_Declare has a GIT_TAG pinned to a tag or commit SHA, not a branch nameViewer-Assets/shaders/ is current[+] All met -> proceed to push [-] Any unmet -> fix before pushing
All build configuration lives in CMakeLists.txt. No manual file copying, no build scripts beyond convenience wrappers.
# Standard build
cmake -B build -S .
cmake --build build
# Development mode (all warnings + coverage)
cmake -B build -S . -Dalloutput=ON
cmake --build build
# Run the application
./build/Viewer
# Install (copies binary + shader assets to bin/)
cmake --install build
| Requirement | Minimum Version |
|---|---|
| CMake | 3.24 |
| C++ compiler | C++20 (GCC >= 10, Clang >= 11, MSVC 2019+) |
| OpenGL | Development libraries (OpenGL::GL target) |
| GLM | System-installed |
| SDL3 | Auto-downloaded via FetchContent (local) or Flatpak module |
| clang-format | For code formatting |
| clang-tidy | For static analysis (advisory) |
CMakeLists.txt calls find_package(SDL3) first, falls back to FetchContent if not found.SDL_X11 and SDL_WAYLAND. FetchContent is NOT used in Flatpak.FetchContent.src/glad/ -- GLAD OpenGL loadersrc/stb_*.h -- stb single-header librariesIron Gate: One version of each dependency in the build. No version aliases, no parallel installations, no if(FOUND v1) else(use v2) chains.
Rule: Before adding or upgrading any dependency:
CMakeLists.txt -- never use HEAD or main as a FetchContent ref in production buildsGate: grep -r "FetchContent_Declare" CMakeLists.txt -- every FetchContent_Declare must have a GIT_TAG pinned to a specific version, not a branch name.
[+] All tags pinned to a version tag or commit SHA -> proceed to add or upgrade the dependency [-] Any tag references a branch name -> fix the ref before proceeding
# CORRECT -- pinned to tag
FetchContent_Declare(some_lib GIT_REPOSITORY ... GIT_TAG v1.2.3)
# WRONG -- pinned to branch (non-reproducible)
FetchContent_Declare(some_lib GIT_REPOSITORY ... GIT_TAG main)
Rationalization: "The HEAD version has the fix we need." Counter: pin to the commit SHA that contains the fix, not to HEAD. Unpinned HEAD = a different build every cmake run.
src/shaders/ are auto-copied to Viewer-Assets/shaders/ during build.BUILD_TESTS=ON). Run with ./build/tests/ParticleViewerTests.versioning skill for how version is resolved at build time.Missing SDL3:
Run cmake -B build -S . -- SDL3 downloads automatically via FetchContent.
OpenGL headers not found:
Install OpenGL development packages. Ensure OpenGL::GL CMake target is available.
Shader files not found at runtime:
Run from the build directory, or ensure Viewer-Assets/shaders/ exists alongside the binary.
Flatpak build issues:
See the flatpak skill for MSAA fallback, SDL3 module setup, NVIDIA GL workarounds, and setenv gotchas.
| Excuse | Reality |
|---|---|
| "Small change, can't break the build" | Even single-line changes break builds. Run cmake --build build first. |
| "CI will catch it if the build fails" | CI is a safety net. Don't push broken builds intentionally. |
| "It built fine yesterday" | Dependencies change. State changes. Build locally before every push. |
| "The CMake error is too confusing to parse" | Read the first 10 lines of error output -- that's always where the root cause is. |
| "I'll fix the FetchContent pin later" | Unpinned dependencies produce non-reproducible builds. Pin to tag/commit now. |
| "The tests don't need to be in the build target" | All test targets must build cleanly. No orphaned test binaries. |
If you catch yourself thinking any of these, stop and follow the rule:
cmake --build build locallyAll of these mean: Run cmake --build build locally. Read the full output. Fix errors before pushing.
flatpak/org.particleviewer.ParticleViewer.yamlflatpak skillscripts/linuxBuildAndInstall.sh, scripts/build-flatpak.shnpx claudepluginhub jpegthedev/story-to-ship --plugin story-to-shipProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.