Skip to content

TsukiNi22/ai-utils / skills/cpp/cpp-class

cpp-class

Unverified

Generate C++ (C++20) .hpp/.cpp files and class architectures in Tsukini's style (Xartania header, indented include guards, INCLUDE/CLASS sections, Pre-Function/Function/Operator/Constructor/Destructor blocks, libutils attributes or standard [[...]]), with empty bodies only (never the logic), then register the .cpp in the CMakeLists.txt. Also creates the main.cpp entry point in the same style. Use whenever the user asks to create, scaffold or add a C++ class, a main / entry point, interface (I*), abstract class (A*), template, struct/Type or Define header, module or set of .hpp/.cpp files.

scripts/detect_libutils.sh

View on GitHub
#!/bin/bash
# Detect how attributes must be written in the given project.
#
# Usage: detect_libutils.sh [project_dir]
#
# Output (first line):
#   internal  -> the project IS libutils: use the macros (_hot, _nodiscard...) with relative includes
#   libutils  -> libutils is linked in the CMake or installed: use the macros + <utils/utils.hpp>
#   std       -> no libutils: use the standard attributes ([[gnu::hot]], [[nodiscard]]...)
# Output (second line): the reason of the choice

set -uo pipefail # no -e: a grep without match is an answer, not an error (xstyle: ignore-file SH-STRICT)

PROJECT="${1:-.}"
CMAKE="$PROJECT/CMakeLists.txt"

# The project is libutils itself
if [[ -f "$PROJECT/include/utils/attribute/Attribute.hpp" ]] && [[ -f "$PROJECT/include/utils/utils.hpp" ]]; then
    echo "internal"
    echo "project is libutils ($PROJECT/include/utils)"
    exit 0
fi

# libutils referenced by the CMake (find_package, linked target or embedded lib)
if [[ -f "$CMAKE" ]]; then
    if tr '\n' ' ' < "$CMAKE" | grep -qE 'find_package\(\s*utils\b|utils::|target_link_libraries\([^)]*[[:space:]](utils|utils_debug|\$<[^>]*:utils(_debug)?>)[[:space:])]|libutils'; then
        echo "libutils"
        echo "referenced in $CMAKE"
        exit 0
    fi
fi

# libutils installed on the computer
for dir in /usr/include /usr/local/include "$HOME/.local/include"; do
    if [[ -f "$dir/utils/attribute/Attribute.hpp" ]]; then
        echo "libutils"
        echo "installed in $dir/utils"
        exit 0
    fi
done

echo "std"
echo "libutils not found (CMake & system)"
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 192kUpdated Claude CodeCodexVerifiedInstall