c-programming-language

c-programming-language is a skill for Claude Code, Codex from DamiMartinez/book-skills. It costs 167 tokens per session (1,379 once invoked), scanned A, original, MIT.

A C-programming guide based on Kernighan and Ritchie’s *The C Programming Language*, 2nd Edition. It covers pointers, arrays, memory ownership, undefined behavior, compilation, and other core C concepts.

In plain words
What is it for?
It is for C programming tasks, including code writing, reviews, debugging, and explanations of C behavior.
Why use it?
It gives a consistent way to write, review, debug, and explain C while accounting for the language’s limited runtime safety checks.

Skill for Claude CodeCodex

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

Good fit It is for C programming tasks, including code writing, reviews, debugging, and explanations of C behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/damimartinez/book-skills/c-programming-language
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.

Any agent
npx skills add DamiMartinez/book-skills --skill c-programming-language
Clone the repo
git clone --depth 1 https://github.com/DamiMartinez/book-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 c-programming-language

README.md
[![agentmods](https://agentmods.dev/badge/skills/damimartinez/book-skills/c-programming-language/github.svg)](https://agentmods.dev/skills/damimartinez/book-skills/c-programming-language)
Your own site
<a href="https://agentmods.dev/skills/damimartinez/book-skills/c-programming-language"><img src="https://agentmods.dev/badge/skills/damimartinez/book-skills/c-programming-language/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for c-programming-language

Your own site · 80×15
<a href="https://agentmods.dev/skills/damimartinez/book-skills/c-programming-language"><img src="https://agentmods.dev/badge/skills/damimartinez/book-skills/c-programming-language.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 167 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,379 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00167 $0.01379
Opus 5.5 $0.00067 $0.00552
Sonnet 5.5 $0.00033 $0.00276
Haiku 4.5 $0.00017 $0.00138

Measured 2mo ago against content hash 87a4ecb37ea6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

c-programming-language 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 2mo 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/c-programming-language/SKILL.md · 43 lines

How it starts

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

The C Programming Language (K&R, 2nd Edition)

Apply this skill when writing, reviewing, or debugging C code, or explaining C semantics — grounded in K&R's philosophy that C trusts the programmer completely: no hidden costs, no runtime safety net, and correctness is the programmer's explicit responsibility at every step.

Core concepts

"Trust the programmer" — C deliberately omits bounds checking, garbage collection, and most runtime safety nets, on the premise the programmer knows what they're doing and wants no hidden cost. This means C code that "looks fine" can still be wrong in ways the compiler won't catch — when reviewing C, actively look for what the language won't stop, not just syntax errors.

Pointer/array duality & pointer arithmetic — a[i] is defined as *(a + i); arrays decay to pointers in most expressions, and pointer arithmetic is scaled by the pointee's size automatically. Understanding this equivalence is the key to reading and writing idiomatic C (pointer-walking a buffer instead of indexing, passing arrays as pointer+length). When debugging array/pointer code, mentally rewrite between the two forms to spot off-by-one or scaling errors.

Declarations mirror use (the right-left / "spiral" rule) — A declaration like int *a[10] or int (*a)[10] should be read by working outward from the identifier following C's precedence rules ([] and () bind tighter than *), not left-to-right. When a declaration is confusing (arrays of pointers, pointers to functions, pointers to arrays), decompose it this way rather than guessing — this is the single most common source of "wait, what does this even declare" confusion in C.

Manual memory management & ownership — Every malloc/calloc needs an unambiguous owner responsible for exactly one matching free; there's no garbage collector to fall back on. When reviewing allocation code, explicitly trace: who allocates, who's responsible for freeing, and what happens on every exit path (including error returns) — leaks and double-frees are almost always a broken answer to "who owns this."

Read the full file on GitHub · 43 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. 2mo ago First seen · 43 lines · 167 tokens per session scan A 87a4ecb37ea6

Subscribe to this mod's changes

c-programming-language is a skill published in the GitHub repository DamiMartinez/book-skills (13 stars, last pushed 3mo ago), licensed MIT. It adds 167 tokens to every session and 1,379 once invoked, about $0.0007 per session on Opus 5.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

c-programming-language compared with skills from other repositories

c-programming-language next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
c-programming-languageDamiMartinez/book-skillsSkill133mo agoMITA167Claude Code, Codex
erlang-otp-behaviorsbenchflow-ai/skillsbenchSkill1.9k3d agoApache-2.0A52Claude Code, Codex
omh-rustrlaope/oh-my-hermesSkill5.2ktodayMITA74Claude Code, Codex
axiom-concurrencyCharlesWiltgen/AxiomSkill1.3kyesterdayMITA49Claude Code
tddcodewithmukesh/dotnet-claude-kitSkill8072d agoMITA81Claude Code
precisemicroprediction/preciseSkill3385d agoMITA76Claude Code, Codex
haskell-prormyndharis/antigravity-skillsSkill2.0k23d agoMITA41Claude Code, Codex