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.
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a claude-codeWhat 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-safetymode - configure Xcode build flags and
ptrcheck.hheaders - 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-code2Manually: put the files in place
~/.claude/skills/c-bounds-safety/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/c-bounds-safety/
1Skills CLI (Vercel)
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a codex2Manually: put the files in place
.agents/skills/c-bounds-safety/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a cursor2Manually: put the files in place
.cursor/skills/c-bounds-safety/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install superagents-lab/xcode27-skills c-bounds-safety2Manually: put the files in place
.github/skills/c-bounds-safety/SKILL.md1Skills CLI (Vercel)
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a gemini-cli2Platform CLI
gemini skills install https://github.com/superagents-lab/xcode27-skills --path c-bounds-safetyManually: put the files in place
.devin/skills/c-bounds-safety/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add superagents-lab/xcode27-skills --skill c-bounds-safety -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.