← 返回 Skills 市场
1083
总下载
2
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install c
功能描述
Avoid common C mistakes — memory leaks, buffer overflows, undefined behavior, and pointer traps.
使用说明 (SKILL.md)
Quick Reference
| Topic | File |
|---|---|
| malloc/free, leaks, double free | memory.md |
| Null, dangling, pointer arithmetic | pointers.md |
| Null terminator, buffer overflow | strings.md |
| Integer overflow, signed/unsigned | types.md |
| Macro traps, include guards | preprocessor.md |
| Common undefined behavior | undefined.md |
Critical Rules
mallocreturnsvoid*— cast required in C++, optional in C but check for NULLfree(ptr); ptr = NULL;— always null after free to prevent double-freesizeof(array)in function gives pointer size, not array size — pass length separatelychar str[5] = "hello";— no room for null terminator, UB when used as stringstrcpydoesn't check bounds — usestrncpyand manually null-terminate- Signed overflow is UB — compiler can optimize assuming it never happens
i++ + i++is UB — no sequence point between modifications- Returning pointer to local variable — dangling pointer, UB on use
#define SQUARE(x) x*x—SQUARE(1+2)=1+2*1+2= 5, not 9memcpywith overlapping regions — usememmoveinstead- Uninitialized variables — contain garbage, UB if used
- Array out of bounds — no runtime check, silent corruption or crash
安全使用建议
This skill is a documentation/reference pack about safe C practices and appears internally consistent. It's instruction-only (no code to run or install) and requests no secrets, so the direct risk is low. Two points to consider before installing: (1) The metadata requires both gcc and clang to be present — that is unnecessary for a docs-only skill and may be a configuration mistake; if you expect the agent to compile or run code as part of using the skill, ensure compilations happen in a sandbox. (2) Although the skill itself doesn't exfiltrate data or require credentials, if you let the agent autonomously compile or execute arbitrary C (with your source), that execution could do anything your environment allows — only permit that in isolated/sandboxed environments. If you want maximum safety, keep this skill as read-only reference and avoid letting the agent compile or run untrusted code on your host.
功能分析
Type: OpenClaw Skill
Name: c
Version: 1.0.1
The skill bundle provides educational content on safe C programming, focusing on avoiding common pitfalls, memory corruption, buffer overflows, and undefined behavior. All `.md` files contain legitimate information aligned with this purpose. The `SKILL.md` requests `gcc` and `clang` binaries, which are standard and necessary for C development. There is no evidence of prompt injection, malicious code, data exfiltration, or any other harmful intent.
能力评估
Purpose & Capability
The skill's name, description, and included markdown files consistently cover C safety topics. The only minor mismatch is that the metadata declares two required binaries (gcc and clang) as both required; for a pure documentation/reference skill requiring both compilers is unnecessary but not malicious — it likely intends to assume a C toolchain is present.
Instruction Scope
SKILL.md and the topic files contain guidance about C pitfalls (memory, pointers, preprocessor, strings, types, undefined behavior). No instructions direct the agent to read unrelated files, access environment variables, or transmit data externally.
Install Mechanism
No install spec or downloads are present; the skill is instruction-only and does not write code to disk or fetch external archives. This is the lowest-risk pattern under the evaluator rules.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The declared requirement for gcc and clang is proportionate to a C-focused skill, though requiring both compilers simultaneously is stricter than necessary.
Persistence & Privilege
always is false and the skill is user-invocable with normal autonomous invocation allowed. There is no indication it modifies other skills or agent-wide settings or requests elevated persistence.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install c - 安装完成后,直接呼叫该 Skill 的名称或使用
/c触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
常见问题
C 是什么?
Avoid common C mistakes — memory leaks, buffer overflows, undefined behavior, and pointer traps. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1083 次。
如何安装 C?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install c」即可一键安装,无需额外配置。
C 是免费的吗?
是的,C 完全免费(开源免费),可自由下载、安装和使用。
C 支持哪些平台?
C 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 C?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.1。
推荐 Skills