Agent skill
c
C programming with memory management, pointers, structs, and system-level development. Use for .c files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/c
SKILL.md
C
The foundational language for modern computing, operating systems, and embedded systems.
When to Use
- Operating Systems / Drivers
- Embedded Systems
- High-performance computing
- Legacy codebases
Quick Start
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
Core Concepts
Pointers
Variables that store memory addresses.
int x = 10;
int *p = &x; // p holds address of x
printf("%d", *p); // Dereference p to get 10
Memory Management
Manual allocation and deallocation.
int *arr = (int*)malloc(10 * sizeof(int));
// use arr...
free(arr);
Structs
User-defined data types.
Best Practices
Do:
- Always initialized variables
- Check return values of
malloc - Guard against buffer overflows (use
snprintfoversprintf) - Use tools like Valgrind to check for leaks
Don't:
- Return pointers to local variables (stack memory)
- Use
gets()(unsafe)
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?