← Back to Skills Marketplace
ivangdavila

C

by Iván · GitHub ↗ · v1.0.1
linuxdarwinwin32 ✓ Security Clean
1083
Downloads
2
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install c
Description
Avoid common C mistakes — memory leaks, buffer overflows, undefined behavior, and pointer traps.
README (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

  • malloc returns void* — cast required in C++, optional in C but check for NULL
  • free(ptr); ptr = NULL; — always null after free to prevent double-free
  • sizeof(array) in function gives pointer size, not array size — pass length separately
  • char str[5] = "hello"; — no room for null terminator, UB when used as string
  • strcpy doesn't check bounds — use strncpy and 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*xSQUARE(1+2) = 1+2*1+2 = 5, not 9
  • memcpy with overlapping regions — use memmove instead
  • Uninitialized variables — contain garbage, UB if used
  • Array out of bounds — no runtime check, silent corruption or crash
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install c
  3. After installation, invoke the skill by name or use /c
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Initial release
v1.0.0
Initial release
Metadata
Slug c
Version 1.0.1
License
All-time Installs 2
Active Installs 2
Total Versions 2
Frequently Asked Questions

What is C?

Avoid common C mistakes — memory leaks, buffer overflows, undefined behavior, and pointer traps. It is an AI Agent Skill for Claude Code / OpenClaw, with 1083 downloads so far.

How do I install C?

Run "/install c" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is C free?

Yes, C is completely free (open-source). You can download, install and use it at no cost.

Which platforms does C support?

C is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).

Who created C?

It is built and maintained by Iván (@ivangdavila); the current version is v1.0.1.

💬 Comments