技能 编程开发 内存安全模式

内存安全模式

v20261116
memory-safety-patterns
跨语言内存安全编程模式,涵盖 RAII、所有权、智能指针、资源管理、防止内存泄漏以及系统代码中的内存问题调试。
获取技能
300 次下载
概览

Memory Safety Patterns

Cross-language patterns for memory-safe programming including RAII, ownership, smart pointers, and resource management.

Use this skill when

  • Writing memory-safe systems code
  • Managing resources (files, sockets, memory)
  • Preventing use-after-free and leaks
  • Implementing RAII patterns
  • Choosing between languages for safety
  • Debugging memory issues

Do not use this skill when

  • The task is unrelated to memory safety patterns
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
信息
分类 编程开发
名称 memory-safety-patterns
版本 v20261116
大小 6.21KB
更新时间 2026-11-17
语言