c-code-style skill
Recommended C style and coding rules
This skill applies Tilen Majerle's C style guide and runs clang-format on every code edit.
- 1,359 ★ on the repository
- Last commit
- MIT
Minimal access
Why this level
- The skill only edits code for style and runs a local formatter, with no network calls and no access to secrets.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/recommended-c-style-and-coding-rulesDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill only edits code for style and runs a local formatter, with no network calls and no access to secrets.
This is third-party code. Review the repository files before installing.
What it does
c-code-style is a C coding style guide from embedded-library developer Tilen Majerle, packaged as a Claude Code plugin. The skill triggers on any work with `.c` and `.h` files in a project that adopts this style: it writes and edits code by the rules (names, comments, functions, structures, switch statements, macros), then checks and applies `clang-format` for automatic formatting. The single source of truth is the `CODING_RULES.md` file at the repository root; `README.md` is just a symlink to it so it renders on GitHub. The project also ships a ready `.clang-format` file that can go into a project's own root or a shared root for several projects.
Who it is for. Embedded C developers who want one consistent code style, checked and applied by an agent automatically.
Good fit when
- A C project adopts a specific naming, comment and file-structure style.
- A patch to existing code should keep the surrounding lines' style rather than introduce its own.
- Code needs `clang-format` run against current rules right after editing.
- Several repositories need to share the same `.clang-format` file.
Not a fit when
- The project is in another language, not C or compatible header files.
- Existing code already follows a different style, and switching the whole project's style has not been agreed.
- `clang-format` is unavailable in the agent's environment: without it, formatting cannot be checked.
Example request
Refactor this .c file following the c-code-style rules and run clang-format after editing.Limitations
The author advises directly: when patching existing code, matching the surrounding lines' style matters more than blindly following the document if a project already lives by a different style. Format checking depends on `clang-format` (part of the LLVM package) being installed; without it, automatic formatting is unavailable, though the style rules themselves can still be applied by hand. Formatting looks for a `.clang-format` file by walking up the folder tree from the current directory, falling back to clang-format's own defaults if none is found. The file to copy into a project is `CODING_RULES.md`, not this repository's `README.md`, which is only a symlink.
How to disable. Remove the `c-code-style` plugin with the reverse Claude Code command, or delete the copied `CODING_RULES.md` and `.clang-format` files from your repository.
FAQ
How do I install the plugin in Claude Code?
Run `/plugin marketplace add MaJerle/c-code-style`, then install the `c-code-style` plugin through the plugin menu.
What should I copy into my project without the plugin?
The `CODING_RULES.md` file at the repository root, not `README.md`, which is only a symlink to it for rendering on GitHub.
What if my project already uses a different style?
Matching the surrounding lines' style when patching existing code matters more than introducing a new style from this document.
How does formatting get run?
Through an installed `clang-format`; without it, format checking does not run, though the naming and structure rules can still be applied by hand.
Can the `.clang-format` file be shared across several repositories?
Yes, the file can go into a shared root for several projects: `clang-format` finds it by walking up the folder tree.
Discussion
No questions or reviews yet.
Related
SkillsMindrally skills collection
Claude Code Skills Collection
Over two hundred coding-guideline skills for frameworks and languages, converted from Cursor rules to SKILL.md
kyy-logs code-review-skill
code-review-skill
A code review skill with four independent probes, evidence-backed findings and a merge gate derived from JSON
A code review skill across many languages and frameworks: architecture, performance, security, anti-patterns and common bugs
The csharp-guidelines plugin checks agent-written .NET code against Dennis Doomen's AV0100–AV2400 rules, up to language v14.
A skill that finds AI slop in code: duplicate helpers, empty abstractions, weak tests. It cleans one pattern per commit.
lencx skills
lencx-skills
Two skills for Claude Code and Codex: keel works through architecture questions, coding-protocol keeps code edits inside the task
README in short
The author quotes a GNOME developer's point that the single most important rule when writing code is to study the surrounding code and imitate it, not blindly follow the document.