meirborowski/Lodestone / .claude/skills/add-dependency
add-dependency
VerifiedAdd a third-party library to Lodestone - pinned to an exact version, verified by hash, license-checked and documented. Use whenever new code needs a library that isn't fetched yet.
Add a Dependency
- Check the license - only permissive licenses are allowed: MIT, BSD, zlib, Apache 2.0, public domain or CC0. Anything else needs the user's decision first (see
AGENTS.md). Checkdocs/TechStack.md#libraries- the library may already be planned, with a chosen version policy. - Pick an exact version - a release tag, or a specific commit when releases are stale (as for sol2). Never a branch.
- Hash the archive - download the release archive (GitHub:
https://github.com/<owner>/<repo>/archive/refs/tags/<tag>.tar.gz, or.../archive/<commit>.tar.gz) into an empty scratch directory, and compute its SHA256 (sha256sum, orGet-FileHashon Windows). If the project publishes checksums, compare against them. - Declare it in
cmake/Dependencies.cmake:
and add it to# <name> - <what it's for> (<license>) ls_declare_dependency(<name> URL <archive URL> SHA256 <hash> ) set(<OPTION> <value> CACHE BOOL "" FORCE) # turn off the dependency's tests, examples and install rulesFetchContent_MakeAvailable(). If it has no CMake build, define its target afterFetchContent_MakeAvailable(), as Lua's is. - Respect the layering - link it only to the targets that need it.
LodestoneCoremust never link GLFW, nvrhi, miniaudio or anything that needs a window, GPU or audio device (docs/Architecture.md#targets-and-layering). - Document it - add the library, version, license, purpose and whether it ships in exported games to
THIRD_PARTY_LICENSES.md, with the full license text from the archive. Add it todocs/TechStack.md#librariesif it isn't listed. - Test it - build every configuration on your platform and run the tests (
build-and-testskill). CI checks the other platforms. If the library throws exceptions, catch them where Lodestone calls it and returnstd::expectederrors (docs/CodeStyle.md#error-handling).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |