coding-standard-c
CommunityEnforce clean, consistent C coding standards.
Software Engineering#linting#static-analysis#coding-standards#naming-conventions#c#snake_case#header-guards
Authorjdubray
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Enforce consistent C coding standards to improve readability, maintainability, and reduce errors across C projects.
Core Features & Use Cases
- File Naming: Source files use snake_case with a .c extension; header files use snake_case with a .h extension; names should be short but descriptive (max ~20 characters).
- Header Guards: Guards follow UPPER_SNAKE_CASE with an _H suffix; include path in guard examples is PROJECT_MODULE_FILE_H.
- Variable Naming: Local variables use snake_case; global variables use g_ prefix; static variables use s_ prefix; pointers include p or ptr suffix when helpful.
- Constant/Macro Naming: Macros and enums use UPPER_SNAKE_CASE; compile-time constants use #define with UPPER_SNAKE_CASE.
- Function Naming: Functions use snake_case with a module prefix; static functions use snake_case; init/cleanup or create/destroy patterns are recommended.
- Type Naming: Structs can be snake_case with _t suffix or PascalCase; typedefs use _t suffix; enums use snake_case with _e suffix for the type.
- Organization: Organize code with headers first, then macros, then types, prototypes, global/static vars, and implementations.
- Use Case: Refactor legacy C code or write new modules that need consistent naming and structure across a project.
Quick Start
Apply these guidelines to a C module by renaming identifiers to snake_case and adding header guards.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: coding-standard-c Download link: https://github.com/jdubray/puffin/archive/main.zip#coding-standard-c Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.