coding-standard-c
Installation
SKILL.md
C Coding Standards
When reviewing or generating C code, follow these rules:
File Naming
- Source files: snake_case with
.cextension (e.g.,user_service.c,data_parser.c) - Header files: snake_case with
.hextension (e.g.,user_service.h,data_parser.h) - Keep names short but descriptive (max ~20 characters)
Header Guards
- Format: UPPER_SNAKE_CASE with
_Hsuffix - Include path in guard: (e.g.,
PROJECT_MODULE_FILE_H)
#ifndef USER_SERVICE_H
#define USER_SERVICE_H
// content
#endif /* USER_SERVICE_H */