skills/advent-cookiecutter/SKILL.md
Generates a starter C++ file for a new Advent of Code problem, pre-loaded with type aliases, optional 2D/3D coordinate structs (P, D, PD), and an input parsing template inferred from an example input file. Use when the user asks to "create a C++ template for AoC", "generate an advent of code starter", "scaffold a new advent of code solution", or "run advent-cookiecutter". Do NOT use for formatting, optimizing, or debugging existing C++ code.
npx skillsauth add armandli/get-skilled advent-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.
Split $ARGUMENTS on whitespace:
.cpp filename (required)Valid specifiers: p2, pd2, pdpd2, p3, pd3, pdpd3, none
If token 1 or 2 is missing, stop and ask the user. If token 3 is present and not in the valid list, stop and ask the user.
Read token 2 with the Read tool. Examine all lines, then pick one classification:
| Signal | Classification |
|---|---|
| All lines same length, only printable ASCII, no digit-only lines | grid |
| Lines contain only digits, spaces, minus signs | int-tokens |
| Any line contains a comma | comma-separated |
| Lines match a repeated template like "key: val" or "p=%d,%d v=%d,%d" | structured-sscanf |
| Blank lines divide the file into distinct groups of lines | multi-group |
| Lines contain a mix of words and integers | space-separated |
| Unrecognized or file unreadable | stub |
If the file cannot be read, use stub and warn the user.
Look up the exact code in references/struct-templates.md. Paste each listed section in order when assembling the file. D must always be emitted before P when both are present (P-2D-full / P-3D-full use D inline).
| Specifier | Sections to include (in order) |
|---|---|
| p2 | P-2D-simple, Comparators-2D, hash-P-2D |
| pd2 | D-2D, P-2D-full, Comparators-2D, Free-Operators-2D, hash-P-2D, Direction-Constants-2D, hashing-turn-helpers |
| pdpd2 | All of pd2 + PD-2D, hash-PD-2D |
| p3 | P-3D-simple, Comparators-3D, hash-P-3D |
| pd3 | D-3D, P-3D-full, Comparators-3D, Free-Operators-3D, hash-P-3D, Direction-Constants-3D |
| pdpd3 | All of pd3 + PD-3D, hash-PD-3D |
| absent / none | (nothing) |
Construct the file text in this exact order:
1. Includes (always emit these):
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <array>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
Add extra includes based on classification:
comma-separated, space-separated → also add #include <sstream>int-tokens with multiple values per line → also add #include <sstream>structured-sscanf → also add #include <cstdio>2. Type aliases (always):
using namespace std;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned;
template <typename T> using uset = unordered_set<T>;
template <typename K, typename V> using umap = unordered_map<K, V>;
3. Coordinate structs — paste the sections from references/struct-templates.md
identified in Step 3. Separate each section with one blank line.
4. Parsing function — paste the matching section from references/parsing-templates.md:
| Classification | Section to paste |
|---|---|
| grid | Grid |
| int-tokens | Integer-Tokens |
| comma-separated | Comma-Separated |
| space-separated | Space-Separated |
| structured-sscanf | Structured-sscanf |
| multi-group | Multi-Group |
| stub | Stub |
5. main() (always):
int main(){
auto input = parse();
// Part 1
cout << 0 << endl;
// Part 2
cout << 0 << endl;
}
Use the Write tool to create the file at the exact path from token 1.
Then report:
After the skill's primary task completes, run:
python3 ${PWD}/.claude/skills/skill-stat/scripts/record-stat.py "advent-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.