Install any skill in seconds. Free to start, no credit card required.
Get Started Free →lingxling/c
Language-specific super-code guidelines for c.
Passed 19 of 22 test cases with the skill, and 17 of 22 without it.
2 fixed17 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need to write a C header and source file for a dynamic integer container struct. I want to ensure it handles memory allocations securely, avoids stack overflow risks from variable array sizes, and uses proper header guards. Please generate the header file code and corresponding memory initialization and release routines.
| Checked | Without skill | With skill |
|---|---|---|
| The code does not explicitly cast the return value of malloc. | Missed | Passed |
| Memory allocation uses sizeof *ptr style sizing instead of explicit type sizing inside sizeof. | Missed | Passed |
The instructions your model reads when the skill loads.
// ❌ malloc without checking return value
char *buf = malloc(size);
strcpy(buf, src);
// ✅
char *buf = malloc(size);
if (!buf) return -ENOMEM;
memcpy(buf, src, size);
// ❌ Casting malloc result (unnecessary in C, hides missing #include)
int *p = (int *)malloc(n * sizeof(int));
// ✅
int *p = malloc(n * sizeof *p);
// ❌ free without nulling (dangling pointer risk in long-lived scope)
free(ptr);
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.