libutils-setup
Skill1 starsChanged 3 days agoMITView on GitHub
Set 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.
In this repository70 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-at-endSkill
- clarifySkill
- continue-workSkill
- exportSkill
- full-permissionSkill
- ideationSkill
- interactive-questionsSkill
- onboardSkill
- pauseSkill
- presentationSkill
- rtkSkill
- setup-contextSkill
- write-like-meSkill
- audit-bugsSkill
- audit-depsSkill
- audit-qualitySkill
- audit-securitySkill
- benchmarkSkill
- cmake-styleSkill
- cpp-classSkill
- cpp-commentsSkill
- cpp-projectSkill
- cpp-styleSkill
- better-explain-docSkill
- better-html-docSkill
- better-html-styleSkill
- better-protocol-docSkill
- docs-updateSkill
- explain-docSkill
- html-docSkill
- html-styleSkill
- protocol-docSkill
- readme-styleSkill
- reportSkill
- wiki-styleSkill
- ci-cdSkill
- git-commitSkill
- git-conventionsSkill
- pre-commitSkill
- legal-checkSkill
- legal-setupSkill
- licenseSkill
- libutils-exceptionSkill
- libutils-installSkill
- libutilsSkill
- python-classSkill
- python-commentsSkill
- python-projectSkill
- python-styleSkill
- auditSkill
- cppSkill
- devSkill
- docSkill
- gitSkill
- legalSkill
- pythonSkill
- setup-projectSkill
- styleSkill
- setup-studioSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Not installed (or older than needed) -> libutils-install skill (libutils.sh install, last version through libutils-pre.
- Very specific: line 32
Run it with --dry-run first when the CMake isn't in the user's layout, show the diff, then for real.
- Very specific: line 60
Check: cmake -S . -B build && cmake --build build (the header is generated at the first build), then report the libutils version used and …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 statusNot 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

