coding-style

coding-style is a skill for Claude Code, Codex from Fuwn/suckless-agent-skills. It costs 26 tokens per session (1,218 once invoked), scanned A, original, MIT.

A set of rules for writing consistent C and POSIX code, including file layout, formatting, declarations, headers, and supported language standards.

In plain words
What is it for?
Use it when writing or reviewing C programs that should follow project conventions and standards such as C99 and POSIX.1-2008.
Why use it?
It reduces style differences that make code harder to read, review, and maintain. It also clarifies which C and POSIX features to use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fuwn/suckless-agent-skills/coding-style
Any agent
npx skills add Fuwn/suckless-agent-skills --skill coding-style
Clone the repo
git clone --depth 1 https://github.com/Fuwn/suckless-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for coding-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/fuwn/suckless-agent-skills/coding-style.svg)](https://agentmods.dev/skills/fuwn/suckless-agent-skills/coding-style)
Your own site
<a href="https://agentmods.dev/skills/fuwn/suckless-agent-skills/coding-style"><img src="https://agentmods.dev/badge/skills/fuwn/suckless-agent-skills/coding-style.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,218 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01218
Opus 5 $0.00013 $0.00609
Sonnet 5 $0.00005 $0.00244
Haiku 4.5 $0.00003 $0.00122

Measured 6d ago against content hash 0046806f8dc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

coding-style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/coding-style/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Style

Note that the following are guidelines and the most important aspect of style is consistency. Strive to keep your style consistent with the project on which you are working. It is up to the project maintainer to take some liberty in the style guidelines.

The following contain good information, some of which is repeated below, some of which is contradicted below.

File Layout

  • Comment with LICENSE and possibly short explanation of file/tool.
  • Headers
  • Macros
  • Types
  • Function declarations:
    • Include variable names.
    • For short files these can be left out.
    • Group/order in logical manner.
  • Global variables.
  • Function definitions in same order as declarations.
  • main

C Features

  • Use C99 without extensions (ISO/IEC 9899:1999).
  • Use POSIX.1-2008:
    • When using gcc define _POSIX_C_SOURCE 200809L.
    • Alternatively define _XOPEN_SOURCE 700.
  • Do not mix declarations and code.
  • Do not use for loop initial declarations.
  • Use /* */ for comments, not //.
  • Variadic macros are acceptable, but remember:
    • __VA_ARGS__ not a named parameter.
    • Arg list cannot be empty.

Blocks

  • All variable declarations at top of block.
  • { on same line preceded by single space (except functions).
  • } on own line unless continuing statement (if else, do while, ...).

Use block for single statement if inner statement needs a block.

for (;;) {
	if (foo) {
		bar;
		baz;
	}
}

Use block if another branch of the same statement needs a block:

if (foo) {
	bar;
} else {
	baz;
	qux;
}

Leading Whitespace

Use tabs for indentation and spaces for alignment. This ensures everything will line up independent of tab size. This means:

  • No tabs except beginning of line.
  • Use spaces - not tabs - for multiline macros as the indentation level is 0, where the #define began.

Functions

  • Return type and modifiers on own line.
  • Function name and argument list on next line. This allows to grep for function names simply using grep ^functionname(.
  • Opening { on own line (function definitions are a special case of blocks as they cannot be nested).
  • Functions not used outside translation unit should be declared and defined static.

Example:

static void
usage(void)
{
	eprintf("usage: %s [file ...]\n", argv0);
}

Variables

  • Global variables not used outside translation unit should be declared static.
  • In declaration of pointers the * is adjacent to variable name, not type.

Keywords

  • Use a space after if, for, while, switch (they are not function calls).
  • Do not use a space after the opening ( and before the closing ).
  • Preferably use () with sizeof.
  • Do not use a space with sizeof().

Switch

  • Do not indent cases another level.
  • Comment cases that FALLTHROUGH.

Example:

switch (value) {
case 0: /* FALLTHROUGH */
case 1:
case 2:
	break;
default:
	break;
}

Headers

  • Place system/libc headers first in alphabetical order.
    • If headers must be included in a specific order add a comment to explain.
  • Place local headers after an empty line.
  • When writing and using local headers.

User Defined Types

  • Do not use type_t naming (it is reserved for POSIX and less readable).
  • Typedef opaque structs.
  • Do not typedef builtin types.
  • Use CamelCase for typedef'd types.

Line Length

  • Keep lines to reasonable length (max 79 characters).

Tests and Boolean Values

  • Do not use C99 bool types (stick to integer types).
  • Otherwise use compound assignment and tests unless the line grows too long:

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 200 lines · 26 tokens per session scan A 0046806f8dc8

Subscribe to this mod's changes

coding-style is a skill published in the GitHub repository Fuwn/suckless-agent-skills (18 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 1,218 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cpp-systems

Modern C++ patterns: RAII and ownership, rule of zero/five, exceptions and error handling, API and ABI boundaries, templates, and CMake tooling. Use when writing, reviewing, refactoring, or debugging C++, working with smart pointers, move semantics, memory leaks, template errors, or gtest. For plain C, see…

iliaal/ai-skills · 78 tokens

cpp

Use when writing modern C++ (17/20/23). Covers RAII, smart-pointer ownership, move semantics, ranges, concepts, and eliminating undefined behavior with sanitizers.

nimadorostkar/Claude-Skills-collection · 38 tokens

arduino-code-generator

Generate Arduino and embedded C++ snippets for sensors, actuators, buses, state machines, timing, data logging, and hardware abstraction. Use when a user requests implementation code and provide the exact board, framework, toolchain, pins, voltage, memory, and library versions first. Bundled templates target UNO…

wedsamuel1230/arduino-skills · 86 tokens

add-rcpp-integration

Add Rcpp or RcppArmadillo integration to an R package for high-performance C++ code. Covers setup, writing C++ functions, RcppExports generation, testing compiled code, and debugging. Use when an R function is too slow and profiling confirms a bottleneck, when you need to interface with existing C/C++ libraries, or…

pjt222/agent-almanac · 93 tokens

library-selection

Use when selecting, replacing, pinning, or auditing an Arduino, ESP32, RP2040, C++, or vendor-framework library. Compare architecture support, framework and version compatibility, API behavior, footprint, maintenance, provenance, security, and hardware assumptions before installation.

wedsamuel1230/arduino-skills · 57 tokens

cpp-sanitizers

Use in C/C++ projects for crashes, hangs, UB, data races, memory errors. ASan/UBSan/TSan runtime checks. Build sanitizer config separately.

Redtropig/harness-anchor · 40 tokens