mcpField
A
adopt-c-bounds-safety

adopt-c-bounds-safety

github.com/tartinerlabsDevelopment8277 installsUpdated 5d ago
Repository

About adopt-c-bounds-safety

A skill for guiding `-fbounds-safety` adoption and code changes in C projects. It emphasizes consulting required language and migration references before proposing or making changes.

Key features

  1. 01Guidance for adopting `-fbounds-safety`
  2. 02Clarifying questions before suggesting changes
  3. 03Planning for complex multi-file work
  4. 04Required documentation review

Use cases

  1. 01Adopting bounds safety in an existing C project
  2. 02Assessing pointer annotations before code changes
  3. 03Investigating runtime bounds violations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tartinerlabs/skills --skill adopt-c-bounds-safety

After installing, type/adopt-c-bounds-safetyin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
adoption-strategies.md
build-settings.md
common-patterns-and-pitfalls.md
language-overview.md
runtime-debugging.md

Details

From the project README

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.

Comments

Markdown supported