gc-safe-coding
OfficialWrite safe C++ for Hermes VM runtime.
Authorfacebook
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides essential guidelines for writing and reviewing C++ code within the Hermes VM runtime, specifically focusing on memory safety and preventing crashes related to garbage collection.
Core Features & Use Cases
- GC Safepoint Management: Ensures that raw pointers and PseudoHandles to GC objects are properly rooted before any operation that might trigger a garbage collection.
- Modern Rooting Techniques: Mandates the use of
LocalsandPinnedValuefor new code, discouraging older methods likeGCScopeandmakeHandle(). - Robust Error Handling: Emphasizes checking
CallResultfor exceptions before using the returned values. - Use Case: When developing new features or fixing bugs in the core VM logic of Hermes, developers must adhere to these rules to maintain runtime stability and prevent memory corruption.
Quick Start
Follow the checklist provided in the skill's documentation to ensure your C++ code is GC-safe.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: gc-safe-coding Download link: https://github.com/facebook/hermes/archive/main.zip#gc-safe-coding Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.