cpp
Skill0 starsChanged 6 days agoMITView on GitHub
How C++ is written for him - he does not read the code, so use every abstraction C++ gives (classes, RAII, templates, concepts, views, ranges, variant/optional, lambdas, constexpr) instead of typing boilerplate; build a helper the second time, keep it zero-cost, prove it with the compiler and the project checks. Use for any .cpp/.hpp file, C++ projects like symbiotecpp, or when code feels repetitive.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- TsukiNi22/skillstheir own version, first seen Nov 16, 2026
- TsukiNi22/ai-utilstheir own version, first seen Nov 16, 2026
- testdino-hq/google-styleguides-skillstheir own version, first seen Nov 8, 2026
- its-ash/skillstheir own version, first seen Nov 1, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
Used with
Projects with it also use kotlin, ci-cd and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
margeloSkillkotlin
Design, implement, and review Kotlin and Android APIs. Use when working on .kt files, Kotlin nullability, sealed classes/interfaces, coroutines, Android threading, Java interop, or Kotlin-backed React Native Nitro Module implementations.
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
MicrosoftSkillgit-commit
Stage user-selected paths, confirm the exact staged set, and create one local Conventional Commit, or generate a commit message for staged changes without committing. Use when you want a guarded commit or a ready-to-paste message.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- Mindrally/skills★ 275same name
- margelo/react-native-skills★ 172same name
- nimadorostkar/Claude-Skills-collection★ 41same name
- G1Joshi/Agent-Skills★ 15same name
- testdino-hq/google-styleguides-skills★ 15same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- TsukiNi22/ai-utils★ 1same name
- TsukiNi22/skills★ 1same name
- its-ash/skills★ 0same name
- mordechai30/cpp_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- skills/model-surgery/references/agents.mdAGENTS.md
- alienspaceSkill
- announce-anythingSkill
- ask-older-brotherSkill
- audit-everythingSkill
- automate-everythingSkill
- bash-everythingSkill
- claudeSkill
- cleandocsSkill
- cli-everythingSkill
- codeSkill
- conventionsSkill
- day-traderSkill
- decideSkill
- distribute-everythingSkill
- economistSkill
- evolveSkill
- founderSkill
- godotSkill
- hardware-anythingSkill
- karpathySkill
- model-surgerySkill
- nonconformistSkill
- orchestratorSkill
- paying-demandSkill
- publish-anythingSkill
- reaSkill
- rulesSkill
- scrape-everythingSkill
- seedSkill
- ship-anythingSkill
- skill-everythingSkill
- teardownSkill
- uiSkill
- which-licenseSkill
- whiteboard-programmingSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Use the language: classes with RAII for anything that owns (file, map, buffer, thread), std::span / string_view for borrowed data, optional …
- Very specific: line 38
No raw new/delete, no manual malloc in new code, no void* plumbing, no macros that a constexpr or template does.
- Very specific: line 46
No compiler extensions, no -march=native in the default build, no inline asm without a plain-C++ twin.
- Very specific: line 58
Keep data flat and contiguous (std::vector<T> of structs of arrays as the project does).
- Distinctive: line 78
Use them; add the next repeated thing next to them.
- Distinctive: line 82
When a new feature repeats an old one (two ViT encoders, three attention wrappers), fold the old one onto the shared piece in the same …
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cpp
He does not read the C++ and has not the years to learn its corners. So the code is written for the compiler and the
checks, and the abstractions carry the work. Typing the same loop, index arithmetic or load-and-check block again is the
mistake, not using a template. (The C manifest in code (languages) is for C; here C++ is allowed to be C++.)
Always
- Use the language: classes with RAII for anything that owns (file, map, buffer, thread),
std::span/string_viewfor borrowed data,optional/variant/expected-style results instead of sentinel values,enum class, structured bindings, lambdas,constexpr,<algorithm>and ranges over hand loops,std::formatwhere the project has it. - Second time you type something, make the helper; third time is already late. Typical helpers: a strided view
(
View2D<T>,Img(c,y,x)withoperator()),parallel_for, a scoped timer / progress, a table of commands registered by data, aConfigread from JSON by one generic function, a shared encoder loop taking a name prefix instead of one copy per model. - Templates and concepts for "same algorithm, different element or layout";
static_assertandrequiresso a wrong use is one readable error. Heavy templates get an explicit instantiation in one.cpp(compile time is a cost too). - Operators: overload them wherever the meaning is the obvious one -
+ - * /and+=on vectors, matrices, tensors and views;operator()(c,y,x)/[]for indexing;<=>and==defaulted for keys and configs;operator|to chain steps (x | norm | silu) or ranges;operator()on small structs as zero-cost function objects;operator<<or astd::formatterso a type prints itself;explicit operator boolfor "ok"; user-defined literals for units (4_GiB). Never an operator whose meaning surprises (+that mutates,<<that does not stream/shift). - Composition first: a type has parts (
Decoderhas aCache, aTokenizer, aRope). Inheritance only for a true runtime interface with few implementations and calls outside hot loops (Weights-> Map / Checkpoint / Cached), withfinalon leaves and a virtual destructor on the base. Same algorithm over many types -> template / concept / CRTP, not a base class. Different alternatives known at compile time ->std::variant+std::visit, not a hierarchy. - Pick the abstraction by the cost of being wrong: a small value type (copyable, no virtuals) is always safe; a hierarchy, a global singleton or a deep template metaprogram is not - choose those only when no simpler one fits.
- No raw
new/delete, no manualmallocin new code, novoid*plumbing, no macros that aconstexpror template does. - Errors: the project's one
fail(...)/ result type, with the name of the thing that was wrong in the message.
Runs everywhere, specialised by anyone
- Standard: read the project's (
CMAKE_CXX_STANDARD) and stay inside it. For software others build on their own machines the baseline is C++20 (GCC 11+, Clang 13+, Apple Clang, MSVC 2022); C++23 only behind a fallback, and CUDA / nvcc code stays C++17. A newer library feature that is 50 lines to write (mdspan-likeView) is written, not required. - No compiler extensions, no
-march=nativein the default build, no inline asm without a plain-C++ twin. SIMD and GPU code are optional backends; the plain f32 reference kernel always exists and defines the right answer. - Kernels sit behind the project's registry (symbiotecpp:
ops::registry(), one table per slot, key = op id + backend name). Anyone adds a kernel for their hardware by registering one function under the same id; selection is resolved once (cpuid / device probe), never a virtual call per element. New ops get a slot + a reference + a test hook from the start, and the header says how to add a backend.
Zero-cost or it does not ship
- Abstractions in hot loops must compile away: no
virtual, nostd::function, no allocation per iteration, noshared_ptrthere. Use templates /inline/ function objects; check with a-O2build and a bench (code (bench)), not a guess. A view must not copy; a helper must not hide a copy. - Keep data flat and contiguous (
std::vector<T>of structs of arrays as the project does); abstraction sits around the data, it does not turn it into a pointer graph.
Because he does not read it
- The header comment says what, the maths, the layout, who uses it, who tests it (symbiotecpp rule); the names say the rest. Cleverness that needs a comment to survive is cut; cleverness the compiler checks stays.
- Proof lives outside the code: warnings as errors (
-Wall -Wextra), a sanitizer build, the project'scheck/testscripts, two compilers when cheap. Report what was compiled / run, never "looks right". - A project's own rules win (symbiotecpp: one file per algorithm, config in data files, no tests unless he says, never commit).
Symbiotecpp helpers that exist already
core/view.hpp (View2/View3, Img(c,y,x), transpose), core/parallel.hpp (parallel_for(n, f, min_parallel)),
model/layer_names.hpp (Path with /, names:: presets, count_numbered), model/linear_layer.hpp (Linear, Bias),
model/conv1d_layer.hpp (Conv1d), model/transformer_layer.hpp (LayerNorm, RmsNorm, Attention, Ffn, Encoder,
DecoderLayer: pre- and post-norm), ops/layers/kernels.hpp (swappable layer kernels), model/transformer_ops.hpp
(tf:: blocks, tf::add_into), model/vit_tokens.hpp (the ViT encoder, patchify). Verify a refactor with a golden run:
synthetic weights from a name hash, checksums and the list of requested tensors before and after, bit-exact or explained.
Use them; add the next repeated thing next to them.
Refactor when it pays
When a new feature repeats an old one (two ViT encoders, three attention wrappers), fold the old one onto the shared piece in the same change - dedupe is part of the feature, not a later chore. Rename, move, keep old interfaces working.
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.

