TsukiNi22/ai-utils / skills/libutils/libutils-setup
libutils-setup
UnverifiedSet up libutils in the current C++ project - find_package(utils X.Y.Z) with the installed version, utils::utils on every target, and optionally the custom exception codes (JSON config, generator scripts, CMake generation block, include/exception, .gitignore) - in the user's CMake layout, installing libutils first when it is missing; libutils v4 (no v3 names), its Windows build too (MinGW-w64). Use whenever the user wants to add/use libutils in an existing project, link it in the CMake, or set up custom libutils exceptions in a repository.
libutils in the current project
<name> (a skill) = the folder of that skill: ~/.claude/skills/<name> (setup.sh) or ${CLAUDE_SKILL_DIR}/../../*/<name> (plugin of the marketplace).
libutils freshness
First, once per conversation: the freshness check of the libutils skill (bash <libutils skill>/scripts/check.sh,
section "Freshness check" of libutils/SKILL.md). Outdated -> reuse the answer already given in this conversation,
else ask once (continue / update the installed libutils with libutils-install / the project's requirement with
libutils-setup / the skills reference) and remember it.
SKILL_DIR = the directory of this file.
1. Is libutils installed?
bash <libutils-install>/scripts/libutils.sh status
Not installed (or older than needed) -> libutils-install skill (libutils.sh install, last version through
libutils-pre; root needed: give the user the command to run with ! ), then come back.
A /usr/local source install shadowing the packages is reported: tell the user (it decides which version compiles).
2. Set it up
python3 SKILL_DIR/scripts/setup_project.py <project root> [--exceptions] [--targets a,b] [--version X.Y.Z] [--dry-run]
Run it with --dry-run first when the CMake isn't in the user's layout, show the diff, then for real.
Idempotent (a second run changes nothing). In the cmake-style sections (created when missing):
# Requirement:find_package(utils <installed version> CONFIG REQUIRED) # Check utils dependencies existance(+find_package(Python3 REQUIRED)with--exceptions), before the ccache block;# Special Targets(--exceptions): the generation ofinclude/exception/generated_external_exception_header.hppfromcmake/config/exceptions/*.json;# Dependencies:utils::utilsappended to the existingtarget_link_libraries(<target> PRIVATE ...)or a new line, and with--exceptionstarget_include_directories(<target> PRIVATE include include/exception)+add_dependencies(<target> generated_external_exception_header), for everyadd_executable/add_library(or--targets; addunit_testsintests/CMakeLists.txtby hand the same way);- files (
--exceptions, only if missing):cmake/scripts/{const.py, generate_exception_header.py, requirements.txt}and an examplecmake/config/exceptions/global.json(from thelibutils-exceptiontemplates),include/exception/, the generated header in.gitignore.
3. Then
- Replace the example codes of
global.jsonwith the project ones and use them: libutils-exception skill. - Code:
#include <utils/utils.hpp>(or partial:#define _Exception... before it), APIs: libutils skill; amainin the user's style: cpp-class (templates/main.cpp). Debug/Asanbuilds need thelibutils-db[-pre]/libutils-as[-pre]packages (libutils-install--variants).- v4.0.0 removed every v3 compatibility name (
isloaded,auto_cast,setStyle,utils::network::socket::*...): a project moving tofind_package(utils 4.0.0)replaces them (xstyle --rtk --fixlists them:LU-*rules). - For Windows too (libutils v4.1.0: packages
mingw64-libutils*):libutils-installwindowsinstalls them in the MinGW sysroot, then the project builds with the toolchain of cpp_project_template (-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/mingw-w64.cmake),mingw64-cmake -S . -B build-windows(Fedora) or another MinGW toolchain (find_package(utils 4.1.0)for themingw64-libutils*packages /utils::utils, which also linksws2_32;Debug:mingw64-libutils-db); a source build into a prefix instead (no package): add-DCMAKE_FIND_ROOT_PATH=<prefix>. The code goes throughutils::platform::for the system calls,<windows.h>before<utils/utils.hpp>,utils::iomanip::enable_ansi()once inmain(details:libutilsskill, Platforms). - Check:
cmake -S . -B build && cmake --build build(the header is generated at the first build), then report the libutils version used and what was added.
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: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | 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: 318k | Updated | Claude CodeCodex | Unverified | 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: 318k | Updated | Claude CodeCodex | Unverified | Install |