← 返回 Skills 市场
1384
总下载
2
收藏
9
当前安装
2
版本数
在 OpenClaw 中安装
/install cpp
功能描述
Avoid common C++ mistakes — memory leaks, dangling references, undefined behavior, and ownership confusion.
使用说明 (SKILL.md)
Quick Reference
| Topic | File |
|---|---|
| RAII, smart pointers, new/delete | memory.md |
| Raw pointers, references, nullptr | pointers.md |
| Rule of 3/5/0, inheritance, virtual | classes.md |
| Containers, iterators, algorithms | stl.md |
| Templates, SFINAE, concepts | templates.md |
| Threads, mutex, atomics | concurrency.md |
| C++11/14/17/20, move semantics | modern.md |
| Undefined behavior traps | ub.md |
Critical Rules
- Raw
newwithoutdeleteleaks — usestd::unique_ptrorstd::make_unique - Returning reference to local — undefined behavior, object destroyed on return
==for C-strings compares pointers — usestd::stringorstrcmp()- Signed integer overflow is UB — not wrap-around like unsigned
- Virtual destructor required in base class — otherwise derived destructor skipped
std::movedoesn't move — it casts to rvalue, enabling move semantics- Moved-from object valid but unspecified — don't use without reassigning
- Data race on non-atomic is UB — use
std::mutexorstd::atomic vector\x3Cbool>is not a real container — returns proxy, usedeque\x3Cbool>map[key]inserts default if missing — usefind()orcontains()to check- Braced init
{}prevents narrowing —int x{3.5}errors,int x(3.5)truncates - Iterator invalidation on
push_back— vector may relocate, invalidating iterators string_viewdoesn't own data — underlying string must outlive the view
安全使用建议
This skill is a set of C++ reference notes and appears coherent with that purpose. It doesn't request secrets or install code. The only minor oddity is that it declares g++ as a required binary even though it contains only documentation — that's reasonable but not strictly necessary. If you install it, review any code samples the agent produces before compiling or running them, and avoid granting unrelated credentials or elevated permissions to the agent just because a skill is installed.
功能分析
Type: OpenClaw Skill
Name: cpp
Version: 1.0.1
The OpenClaw AgentSkills bundle contains only documentation files (`.md`) and a metadata file (`_meta.json`). The `SKILL.md` file, which is the primary attack surface for prompt injection, describes C++ programming traps and best practices and legitimately declares a dependency on the `g++` compiler. There is no executable code, no instructions for the agent to perform unauthorized actions, no attempts at data exfiltration, persistence, or any other malicious behavior. All content is purely informational and aligned with the stated purpose of providing C++ knowledge.
能力评估
Purpose & Capability
The skill is a C++ guidance/reference pack and declares g++ as a required binary. Requiring g++ is reasonable for a C++ skill (compilation/testing), but the skill is instruction-only and contains only documentation — it does not actually include compile/run steps. This is a minor mismatch but not concerning.
Instruction Scope
SKILL.md and the included Markdown files are purely reference material about C++ pitfalls (memory, UB, concurrency, STL, templates). There are no instructions to read unrelated files, access environment variables, or transmit data to external endpoints.
Install Mechanism
No install spec or code files — the skill is instruction-only, so nothing is downloaded or executed during install.
Credentials
The skill requests no environment variables, credentials, or config paths. No disproportionate access is requested.
Persistence & Privilege
The skill is not set to always: true and uses default autonomous invocation settings. It does not request persistent system-level changes or other skills' configurations.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cpp - 安装完成后,直接呼叫该 Skill 的名称或使用
/cpp触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
常见问题
C++ 是什么?
Avoid common C++ mistakes — memory leaks, dangling references, undefined behavior, and ownership confusion. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1384 次。
如何安装 C++?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cpp」即可一键安装,无需额外配置。
C++ 是免费的吗?
是的,C++ 完全免费(开源免费),可自由下载、安装和使用。
C++ 支持哪些平台?
C++ 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 C++?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.1。
推荐 Skills