adopt-c-bounds-safety
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHow to Use This Skill
如何使用本Skill
When helping with 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在协助进行适配或代码修改时,建议先询问用户关于其代码库和目标的澄清问题,再提出修改建议。对于涉及多个文件或非平凡注解决策的复杂任务,先使用规划模式提出实施方案,再进行落地。
-fbounds-safety-fbounds-safety
Language Extension
-fbounds-safety-fbounds-safety
语言扩展
-fbounds-safety-fbounds-safety-fbounds-safetyDetailed 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:
- adoption-strategies.md — the workflow for adopting in an existing C project (full and header-only modes).
-fbounds-safety - language-overview.md — the language reference for : pointer kinds, annotations, and the rules that govern them.
-fbounds-safety - common-patterns-and-pitfalls.md — recipes and anti-patterns encountered during real-world adoption.
在开始适配任务时,你必须通过阅读工具完整阅读以下三份文档,并且在适配流程中任何修改源代码的步骤之前,若这些文档的内容未清晰保留在你的当前上下文里,需再次通过阅读工具重新阅读:
- adoption-strategies.md — 现有C项目适配的工作流程(完整模式与仅头文件模式)。
-fbounds-safety - language-overview.md — 的语言参考:指针类型、注解及其遵循的规则。
-fbounds-safety - common-patterns-and-pitfalls.md — 实际适配过程中遇到的常用方案与反模式。
Other references (read on demand)
其他参考文档(按需阅读)
For compiler flags, Xcode build settings, soft trap mode, and configuration, read build-settings.md.
ptrcheck.hFor debugging bounds violations at runtime — trap behavior, LLDB commands, wide pointer inspection, watchpoints, crash log analysis, and soft trap debugging, read runtime-debugging.md.
关于编译器标志、Xcode构建设置、软陷阱模式和配置,请阅读build-settings.md。
ptrcheck.h关于运行时调试边界违例——陷阱行为、LLDB命令、宽指针检查、观察点、崩溃日志分析以及软陷阱调试,请阅读runtime-debugging.md