skills/cpp-cookiecutter/SKILL.md
Sets up a standard C++ project repo structure with src (C++ source), test (GTest unit tests), and bin (scripts) directories, plus root CMakeLists.txt, src/CMakeLists.txt, and test/CMakeLists.txt with FetchContent GTest integration. Use when the user asks to "set up cpp project structure", "scaffold a cpp project", "initialize a c++ repo", or "run cpp-cookiecutter". Do NOT use for formatting, refactoring, or building existing C++ code.
npx skillsauth add armandli/get-skilled cpp-cookiecutterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read $ARGUMENTS and extract project_name (the first word/token).
$ARGUMENTS is empty or missing, stop and ask the user: "Please provide a project name, e.g. /cpp-cookiecutter myproject."Run pwd and git rev-parse --show-toplevel 2>/dev/null.
pwd, warn the user and stop. All paths must be relative to the repo root.Run:
mkdir -p src test bin
All three directories are created with -p (no error if already present).
CMakeLists.txt (root)Use Glob to check whether CMakeLists.txt already exists.
Only if it does not exist, use the Write tool to create CMakeLists.txt with this exact content, replacing <project_name> with the value from Step 1:
cmake_minimum_required(VERSION 3.14)
project(<project_name>)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
enable_testing()
add_subdirectory(src)
add_subdirectory(test)
src/CMakeLists.txtUse Glob to check whether src/CMakeLists.txt already exists.
Only if it does not exist, use the Write tool to create src/CMakeLists.txt with this exact content, replacing <project_name> with the value from Step 1:
# add_library(<project_name> STATIC
# <project_name>.cpp
# )
# target_include_directories(<project_name> PUBLIC ${CMAKE_SOURCE_DIR}/src)
test/CMakeLists.txtUse Glob to check whether test/CMakeLists.txt already exists.
Only if it does not exist, use the Write tool to create test/CMakeLists.txt with this exact content, replacing <project_name> with the value from Step 1:
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
# add_executable(<project_name>_test <project_name>_test.cpp)
# target_link_libraries(<project_name>_test GTest::gtest_main)
# add_test(NAME <project_name>_test COMMAND <project_name>_test)
src/<project_name>.cppUse Glob to check whether src/<project_name>.cpp already exists (substitute the actual project name).
Only if it does not exist, use the Write tool to create src/<project_name>.cpp with this exact content:
// <project_name> source
test/<project_name>_test.cppUse Glob to check whether test/<project_name>_test.cpp already exists (substitute the actual project name).
Only if it does not exist, use the Write tool to create test/<project_name>_test.cpp with this exact content, replacing <project_name> with the value from Step 1:
#include <gtest/gtest.h>
TEST(<project_name>, Placeholder) { EXPECT_TRUE(true); }
Print a summary listing each item and whether it was created or skipped (already exists):
src/ — created (always, idempotent with -p)test/ — created (always, idempotent with -p)bin/ — created (always, idempotent with -p)CMakeLists.txt: created or skipped (already exists)src/CMakeLists.txt: created or skipped (already exists)test/CMakeLists.txt: created or skipped (already exists)src/<project_name>.cpp: created or skipped (already exists)test/<project_name>_test.cpp: created or skipped (already exists)After the skill's primary task completes, run:
python3 ${PWD}/.claude/skills/skill-stat/scripts/record-stat.py "cpp-cookiecutter"
tools
--- name: update-readme description: Updates a project README.md with build instructions, unit test instructions, and a mermaid architecture diagram. Use when a project README needs to be created or refreshed. Trigger phrases: "update readme", "generate readme", "create readme", "refresh readme docs". Emphasizes project interfaces, extension points, and customization hooks in the diagram — not concrete implementations. Do NOT use for documentation sites, wikis, or non-project READMEs. argument-h
business
--- name: skill-stat description: Records skill usage statistics and issue reports into .claude/skill-stats.md. Increments the Uses count for a skill name, and optionally logs an issue report that increments the Issues count and appends a row to the Issue Reports table. Use when tracking how often a skill is invoked, when a user reports a problem with a skill, or when another skill needs to log its own usage. Trigger phrases: "record skill stat", "log skill usage", "report skill issue". Do NOT u
testing
--- name: revert description: Reverts ALL git changes in the working directory: staged changes, unstaged modifications, and new untracked files. Use when user asks to "revert all changes", "undo all changes", "discard all changes", "reset all git changes", or "clean working directory". Do NOT use for reverting a specific file or a specific commit — those need targeted git commands. disable-model-invocation: true --- Revert all git changes in the working directory. This is destructive and cannot
tools
Scans a Python codebase for duplicate or near-duplicate logic patterns across functions, classes, and files, then extracts those patterns into typed utility classes in a shared module. Use when the user asks to "refactor this Python code", "find duplicate logic", "extract shared utilities", "apply DRY to Python", "deduplicate Python code", or "find repeated patterns in Python". Groups extracted helpers by the object type they operate on (strings, numbers, dates, collections, etc.). Do NOT use for performance optimization (use optimize-python), for debugging logic errors, or for explaining code. Do NOT extract code that appears only once. Run this skill before optimize-python.