c-cpp-systems
Skill0 starsChanged 3 months agoMITView on GitHub
Writes, analyzes, optimizes, and debugs low-level C and C++ systems code, memory safety, pointers, manual RAII, struct alignment, bitwise arithmetic, and sanitizers (ASan/UBSan). Use when inspecting C/C++ source code, emulator cores, compiler flags, memory corruption, or native bindings.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- core/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- avoid-ai-writingSkill
- doubt-driven-developmentSkill
- marketing-copywritingSkill
- mempalace-recallSkill
- mempalaceSkill
- mempalace-taskSkill
- retro-emulation-engineeringSkill
- seo-optimization-and-auditSkill
- skill-ai-mlSkill
- skill-backend-architectSkill
- skill-codebase-onboardingSkill
- skill-code-reviewSkill
- skill-context-engineeringSkill
- skill-creative-designSkill
- skill-data-analysisSkill
- skill-data-scienceSkill
- skill-design-engineeringSkill
- skill-devops-cloudSkill
- skill-emulator-wasmSkill
- skill-frontend-architectSkill
- skill-graph-analyticsSkill
- skill-graphics-webglSkill
- skill-low-level-programmingSkill
- skill-master-orchestratorSkill
- skill-mcp-builderSkill
- skill-monorepo-architectSkill
- skill-osint-engineeringSkill
- skill-plugin-architectureSkill
- skill-qa-engineerSkill
- skill-researchSkill
- skill-resume-tailorSkill
- skill-stealth-scrapingSkill
- skill-system-diagnosticsSkill
- skill-web-architectureSkill
- skill-web-performanceSkill
- spec-driven-developmentSkill
- spec-minerSkill
- wasm-emscriptenSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Every dynamically allocated pointer (malloc, calloc, new) must have an unambiguous single owner responsible for its deallocation (free, …
- Very specific: line 21
Never dereference a pointer after freeing (use-after-free).
- Distinctive: line 64
When compiling native cores or diagnostic builds:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C & C++ Systems Programming Skill
Specialist in high-performance C and C++ systems engineering, memory safety, zero-overhead abstractions, binary representation, and low-level debugging.
1. Memory Management & Pointer Arithmetic
- Manual RAII & Ownership Rules:
- Every dynamically allocated pointer (
malloc,calloc,new) must have an unambiguous single owner responsible for its deallocation (free,delete,unique_ptr). - Never dereference a pointer after freeing (
use-after-free). Explicitly set freed pointers toNULL/nullptrin non-RAII code.
- Every dynamically allocated pointer (
- Alignment & Padding:
- Align data types according to machine natural boundary (4 bytes for 32-bit, 8 bytes for 64-bit).
- For binary headers (ROMs, network packets), use explicit packing to prevent compiler padding:
#pragma pack(push, 1) typedef struct { uint32_t magic; uint32_t clock_rate; uint32_t pc; uint32_t release; uint32_t crc1; uint32_t crc2; } RomHeader; #pragma pack(pop)
2. Bitwise Manipulation & Endianness Handling
- Byte Extraction:
uint8_t byte = (val >> (shift * 8)) & 0xFF; - Bitmask Assertion:
if ((status_reg & STATUS_READY) != 0) - Big-Endian to Little-Endian (32-bit swap):
static inline uint32_t swap32(uint32_t val) { return ((val & 0x000000FF) << 24) | ((val & 0x0000FF00) << 8) | ((val & 0x00FF0000) >> 8) | ((val & 0xFF000000) >> 24); } - Byte-Swapped (16-bit Middle-Endian swap for .v64):
static inline uint16_t swap16(uint16_t val) { return (val << 8) | (val >> 8); }
3. Sanitizers & Diagnostic Verification
When compiling native cores or diagnostic builds:
- AddressSanitizer (ASan):
-fsanitize=address -fno-omit-frame-pointer— Catches out-of-bounds access, stack overflows, and use-after-free. - UndefinedBehaviorSanitizer (UBSan):
-fsanitize=undefined— Catches integer overflows, invalid bit shifts, and misaligned pointer dereferences. - MemorySanitizer (MSan):
-fsanitize=memory— Detects uninitialized memory reads. - Valgrind Memcheck:
valgrind --leak-check=full --track-origins=yes ./binary
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.

