agentsclimarketplace

Std c99 proj

Skill ibitato/std-c99-proj-skill/skills/std-c99-proj

Pi skill for pure ANSI C99 projects with memory arena, containerized builds, Valgrind, and static analysis.

Install
npx -y skills add ibitato/std-c99-proj-skill --skill std-c99-proj

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Professional pure ANSI C99 project framework with hardened memory arena, containerized builds via Podman, mandatory Valgrind, -fanalyzer (GCC>=10), and clang-tidy. Enforces: -Werror, no recursion, no leaks, arena-only memory. Per-target output in build/<target>/. Generates AGENTS.md for auto-rules. Targets: RHEL 8/9/10, Debian 11/12, Ubuntu 22.04/24.04. Use when the user wants to create, build, test, or analyze a pure C99 project.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.6 KB, as published. Nobody here has run it

std-c99-proj — Pure ANSI C99 + Memory Arena Framework

Professional framework for pure ANSI C99 projects. All builds, tests, and analysis run inside Podman containers for reproducibility. Output is per-target in build/<target>/ and docs/<target>/.

Philosophy

  • Pure C99: -std=c99 -pedantic — no extensions, no C11+
  • Memory Arena: hardened allocator — aligned, overflow-safe, double-init guard
  • No recursion: iteration only — predictable stack usage
  • Zero tolerance: -Werror -Wall -Wextra -Wconversion -Wshadow — no warnings
  • -fanalyzer: GCC compile-time static analysis (GCC ≥ 10)
  • Valgrind mandatory: every test run checks for leaks and memory errors
  • Hardened Release: -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE
  • Git mandatory: every project starts with version control
  • Containerized: builds never touch the host — fully reproducible
  • AGENTS.md: generated in every project — AI agents auto-follow rules

Invoking Scripts

Scripts are in this skill's scripts/ directory. Use the full absolute path to each script. Do NOT use SKILL_DIR as a shell variable — resolve the path from this SKILL.md's location first.

Example: if this file is at /home/user/.nvm/.../std-c99-proj/SKILL.md, then scripts are at /home/user/.nvm/.../std-c99-proj/scripts/.

Always cd to the project directory first, then call the script with its full path.

Available Actions

1. Initialize a project

From an empty directory (no .git, no src/):

cd /path/to/new-project
/full/path/to/std-c99-proj/scripts/init_project.sh

Creates: AGENTS.md, src/, include/, tests/, containers/, CMakeLists.txt, .gitignore, template source files, and a git repository.

Refuses to run if the directory already has .git, src/, include/, tests/, or CMakeLists.txt.

2. Build

/full/path/to/std-c99-proj/scripts/build.sh <target> [Debug|Release]

Targets: rhel8, rhel9, rhel10, debian11, debian12, ubuntu2204, ubuntu2404

Output goes to build/<target>/. Multiple targets coexist.

3. Test with Valgrind

/full/path/to/std-c99-proj/scripts/test.sh <target>

Builds with BUILD_TESTS=ON into build/<target>/, runs ctest, then Valgrind with --leak-check=full --error-exitcode=1. Any leak = hard failure.

4. Static analysis

/full/path/to/std-c99-proj/scripts/static_analysis.sh <target>

Runs clang-tidy inside the target container with --warnings-as-errors.

5. Generate documentation

/full/path/to/std-c99-proj/scripts/docs.sh <target>

Doxygen output goes to docs/<target>/.

Target Catalog

TargetFamilyBase Image-fanalyzer
rhel8RHELrockylinux:8
rhel9RHELrockylinux:9
rhel10RHELquay.io/rockylinux/rockylinux:10
debian11Debiandebian:bullseye
debian12Debiandebian:bookworm
ubuntu2204Ubuntuubuntu:22.04
ubuntu2404Ubuntuubuntu:24.04

See references/TARGETS.md for full details.

Compiler Flags

DebugRelease
Optimization-O0-O2
Debug info-g3
Warnings-Wall -Wextra -Werror -Wconversion -Wshadow -pedanticsame
Static analysis-fanalyzer (GCC ≥ 10)
Stack protection-fstack-protector-strong-fstack-protector-strong
Buffer overflow-D_FORTIFY_SOURCE=2
PIE-fPIE

Framework Rules

  1. All code compiles with -std=c99 -pedantic -Werror and all warning flags
  2. No recursion — use iteration (loops, explicit stacks)
  3. Memory via arena only — no direct malloc/free in application code
  4. All tests pass Valgrind with zero leaks and zero errors
  5. Git repository required — init creates the first commit
  6. All builds inside Podman containers — never on host

See references/RULES.md for rationale.

Memory Arena API

int   mem_arena_init(MemArena *arena, size_t size);  // aligned, overflow-safe
void *mem_arena_alloc(MemArena *arena, size_t size);  // aligned to MEM_ARENA_ALIGN
void  mem_arena_reset(MemArena *arena);               // reuse without freeing
void  mem_arena_free(MemArena *arena);                // idempotent

See references/ARENA_API.md for full documentation.

Project Layout After Init

my-project/
├── AGENTS.md
├── CMakeLists.txt
├── Doxyfile
├── .gitignore
├── containers/
│   ├── Containerfile.rhel
│   └── Containerfile.debian
├── src/
│   ├── main.c
│   ├── mem_arena.c
│   └── utils.c
├── include/
│   ├── mem_arena.h
│   └── utils.h
├── tests/
│   └── test_arena.c
├── build/<target>/          # per-target output
└── docs/<target>/           # per-target docs

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.