C
C programming with memory management, pointers, structs, and system-level development. Use for .c files.From its SKILL.md
npx -y skills add G1Joshi/Agent-Skills --skill cAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.1 KB, 265 tokens by cl100k_base, as published. Nobody here has run it
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
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.