Skip to content

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

cpp-class

Verified

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/list_attributes.sh

View on GitHub
#!/bin/bash
# List the attribute macros really available from libutils for the given project.
#
# Usage: list_attributes.sh [project_dir]
#
# Looks for utils/attribute/Attribute.hpp hard imported in the project first (include/, lib/,
# external/, FetchContent _deps...), then installed on the computer, and prints every
# `#define _x` of Attribute.hpp and of the C++ version file used (c++20.hpp, else c++17/c++14).
# Exit code 1 = no attribute file found (write the standard [[...]] form).

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

PROJECT="${1:-.}"

# Hard import of the project first, then the system
FOUND=""
while IFS= read -r file; do
    FOUND="$file"
    break
done < <(find "$PROJECT" -path "*/utils/attribute/Attribute.hpp" -not -path "*/.git/*" 2>/dev/null | sort)
if [[ -z "$FOUND" ]]; then
    for dir in /usr/include /usr/local/include "$HOME/.local/include"; do
        if [[ -f "$dir/utils/attribute/Attribute.hpp" ]]; then
            FOUND="$dir/utils/attribute/Attribute.hpp"
            break
        fi
    done
fi
if [[ -z "$FOUND" ]]; then
    echo "no utils/attribute/Attribute.hpp found (project & system)"
    exit 1
fi

DIR="$(dirname "$FOUND")"
echo "# $DIR"
for version in c++20 c++17 c++14; do
    if [[ -f "$DIR/$version.hpp" ]]; then
        grep -hE "^\s*#define _[a-z]" "$DIR/Attribute.hpp" "$DIR/$version.hpp" | sed -E 's/^\s+//' | sort -u -t' ' -k2,2
        break
    fi
done
grep -q "hardware_destructive_interference_size" "$DIR/Attribute.hpp" && echo "# std::hardware_destructive_interference_size / std::hardware_constructive_interference_size guaranteed (fallback 64)"
exit 0
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: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated 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: 193kUpdated Claude CodeCodexVerifiedInstall