adopt-c-bounds-safety

adopt-c-bounds-safety is a skill for Claude Code from tartinerlabs/skills. It costs 50 tokens per session (639 once invoked), scanned A, a copy of c-bounds-safety, MIT.

A guide to adopting -fbounds-safety, a C language extension that checks whether memory accesses stay within their valid limits. It covers pointer annotations, compiler settings, and debugging bounds violations.

In plain words
What is it for?
Use it to plan an adoption, annotate pointers, configure builds, and investigate out-of-bounds memory-access failures.
Why use it?
It helps teams introduce memory-safety checks into existing C code and find out why unsafe pointer operations fail during compilation or at runtime.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to plan an adoption, annotate pointers, configure builds, and investigate out-of-bounds memory-access failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tartinerlabs/skills/adopt-c-bounds-safety
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 tartinerlabs/skills --skill adopt-c-bounds-safety
Clone the repo
git clone --depth 1 https://github.com/tartinerlabs/skills

Made for: Claude Code.

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 adopt-c-bounds-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/tartinerlabs/skills/adopt-c-bounds-safety/github.svg)](https://agentmods.dev/skills/tartinerlabs/skills/adopt-c-bounds-safety)
Your own site
<a href="https://agentmods.dev/skills/tartinerlabs/skills/adopt-c-bounds-safety"><img src="https://agentmods.dev/badge/skills/tartinerlabs/skills/adopt-c-bounds-safety/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 adopt-c-bounds-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/tartinerlabs/skills/adopt-c-bounds-safety"><img src="https://agentmods.dev/badge/skills/tartinerlabs/skills/adopt-c-bounds-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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 97% copy Near-identical to another mod 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.00050 $0.00639
Opus 5 $0.00025 $0.00319
Sonnet 5 $0.00010 $0.00128
Haiku 4.5 $0.00005 $0.00064

Measured 12d ago against content hash 531fd0d74a76, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

adopt-c-bounds-safety 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 12d 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.

Origin

This is a copy

97% identical to c-bounds-safety — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

xcode-skills/adopt-c-bounds-safety/SKILL.md · 31 lines

What it actually says

How to Use This Skill

When helping with -fbounds-safety adoption or code changes, ask clarifying questions about the user's codebase and goals before suggesting changes. For complex tasks involving multiple files or non-trivial annotation decisions, use plan mode to propose an approach before implementing.

-fbounds-safety Language Extension

-fbounds-safety is a C language extension that prevents out-of-bounds memory access by enforcing bounds safety at the language level. It inserts automatic bounds checks at runtime, rejects unsafe pointer operations at compile time, and requires programmers to provide bounds annotations so the compiler can guarantee safety. Out-of-bounds accesses become deterministic traps instead of exploitable vulnerabilities.

Detailed Documentation

Required reading before adoption work

You MUST have fully read the following three documents (via the Read tool) at the start of an adoption task, and re-read them via the Read tool before any source-modifying step in the adoption workflow unless their content is verifiably fresh in your active context:

Other references (read on demand)

For compiler flags, Xcode build settings, soft trap mode, and ptrcheck.h configuration, read build-settings.md.

For debugging bounds violations at runtime — trap behavior, LLDB commands, wide pointer inspection, watchpoints, crash log analysis, and soft trap debugging, read runtime-debugging.md.

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 31 lines · 50 tokens per session scan A 531fd0d74a76

Subscribe to this mod's changes

adopt-c-bounds-safety is a skill published in the GitHub repository tartinerlabs/skills (8 stars, last pushed 20d ago), licensed MIT. It adds 50 tokens to every session and 639 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to c-bounds-safety, differing in 4 lines, and is treated as a copy.

Related

Other skills, from other repositories

swift-concurrency

Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3)…

patrickserrano/lacquer · 158 tokens

printing-press-polish

Polish a generated CLI to pass verification and become publish-ready. Runs diagnostics (dogfood, verify, scorecard, go vet, gosec), automatically fixes all issues (verify failures, static-analysis findings, dead code, descriptions, README, MCP tool quality), reports the before/after delta, and offers to publish. Use…

mvanhorn/cli-printing-press · 125 tokens

cpp-debugging

Use when a C++ failure involves memory lifetime, undefined behavior, native crashes, or debugger-only state — debug with symbols, sanitizers, and platform-native debuggers before patching symptoms.

drvoss/everything-copilot-cli · 42 tokens

ag-corrigir-tipos

Corrige erros TypeScript com auto-routing. Scan (diagnosticar), Fix (batch incremental), Sweep (varredura com ratchet), Audit-any (auditoria proativa de any/inferencias fracas). Substitui workflow manual de typecheck.

andregusman-raiz/a-gusman-claude · 60 tokens

async-await-patterns

Use when writing JavaScript or TypeScript code with asynchronous operations, fixing promise-related bugs, or converting callback/promise patterns to async/await. Triggers: 'promise chain', 'unhandled rejection', 'race condition in JS', 'callback hell', 'Promise.all', 'sequential vs parallel async', 'missing await'.…

axiomantic/spellbook · 81 tokens

pmd

Set up, run, and triage PMD static analysis on a Maven/Java project — the ruleset, the plugin wiring, parsing the report by rule and priority, copy-paste detection, and how to suppress a finding at the right level. Use when the user says "run PMD", "PMD is failing", "fix the PMD violations", "add static analysis"…

alexmond/alexmskills · 110 tokens