Skip to main content
skill CX Codex

c-bounds-safety — Claude Code skill: what it does, how to install

Guides the adoption of the -fbounds-safety C language extension, helping add pointer annotations and debug runtime bounds violations.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a claude-code
Open on GitHub

What c-bounds-safety does

This skill guides developers through adopting -fbounds-safety in existing C projects. The extension stops buffer overflows by enforcing bounds checking at compile time and turning out-of-bounds access into deterministic runtime traps. The model asks clarifying questions about codebase goals and uses plan mode before modifying multiple files.

The skill references documentation covering pointer annotations like __counted_by or __null_terminated, helper conversion functions, and ptrcheck.h macros. It also covers Xcode build settings, soft trap modes, and runtime troubleshooting. For crash diagnosis, it details LLDB inspection of wide pointers, watchpoints, and crash log analysis.

Your toolchain must support -fbounds-safety and include ptrcheck.h, because standard C compilers will fail on these annotations.

What it helps with

  • annotate C pointers using __counted_by, __single, and __sized_by
  • migrate legacy C codebases to -fbounds-safety mode
  • configure Xcode build flags and ptrcheck.h headers
  • diagnose runtime traps and wide pointer crashes in LLDB

Example prompts for the agent

  • Help me annotate pointer bounds with __counted_by in this C header
  • How do I configure Xcode build settings for -fbounds-safety and soft traps?
  • Debug this LLDB crash log caused by an out-of-bounds trap

How to install c-bounds-safety

1Skills CLI (Vercel)

npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a claude-code

2Manually: put the files in place

~/.claude/skills/c-bounds-safety/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/c-bounds-safety/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about c-bounds-safety

How do I install c-bounds-safety in Claude Code?

Run npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a claude-code in your terminal.

What does c-bounds-safety do?

It guides the model through applying pointer annotations, migrating existing C codebases to -fbounds-safety, and debugging bounds violation traps in LLDB.

Which pointer annotations does this skill cover?

It covers bounds attributes such as __counted_by, __sized_by, __ended_by, __single, __indexable, and __null_terminated, along with manual conversion functions.

Similar skills

Everything for Security →

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor