Agent Skillsaduermael/herm › c-bounds-safety

c-bounds-safety

GitHub

指导 C 语言 -fbounds-safety 扩展的采用,涵盖语言模型、指针注解、现有代码适配、编译器设置及运行时调试。要求先阅读参考文档,复杂任务需规划。

skills/c-bounds-safety/SKILL.md aduermael/herm

Trigger Scenarios

C语言代码边界安全加固 -fbounds-safety 注解添加 解决越界访问漏洞

Install

npx skills add aduermael/herm --skill c-bounds-safety -g -y
More Options

Use without installing

npx skills use aduermael/herm@c-bounds-safety

指定 Agent (Claude Code)

npx skills add aduermael/herm --skill c-bounds-safety -a claude-code -g -y

安装 repo 全部 skill

npx skills add aduermael/herm --all -g -y

预览 repo 内 skill

npx skills add aduermael/herm --list

SKILL.md

Frontmatter
{
    "name": "c-bounds-safety",
    "effort": "high",
    "description": "Guide for the C -fbounds-safety language extension. Covers the language model, pointer annotations, adopting bounds-safety in existing C code, compiler build settings and modes, and runtime debugging of bounds violations.\n",
    "when_to_use": "When working with, reading, reviewing, comparing, debugging or analyzing C code that has adopted -fbounds-safety or wants to adopt it.  Key syntax to look for Bounds annotations (__counted_by, __counted_by_or_null, __sized_by, __sized_by_or_null, __ended_by, __single, __indexable, __bidi_indexable, __unsafe_indexable, __null_terminated, __terminated_by), its helper functions (e.g.: __unsafe_forge_bidi_indexable, __unsafe_forge_single,  __null_terminated_to_indexable, __unsafe_null_terminated_to_indexable,  __unsafe_null_terminated_from_indexable) or other macros  (e.g. __ptrcheck_abi_assume_single) or includes of \"ptrcheck.h\".\n"
}

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.

Version History

  • 49ed79d Current 2026-07-05 11:54

Same Skill Collection

app/apple/herm/Skills/apple-context/SKILL.md
app/apple/herm/Skills/beautiful-pdfs/SKILL.md
app/apple/herm/Skills/image-vision/SKILL.md
app/apple/herm/Skills/webbrowser/SKILL.md
skills/device-interaction/SKILL.md
skills/modernize-tests/SKILL.md
skills/uikit-app-modernization/SKILL.md
skills/audit-xcode-security-settings/SKILL.md
skills/swiftui-specialist/SKILL.md
skills/swiftui-whats-new-27/SKILL.md

Metadata

Files
0
Version
f2da284
Hash
ae145c10
Indexed
2026-07-05 11:54

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 12:07
浙ICP备14020137号-1 $お客様$