c-tutor

Teaches C programming concepts to beginners through explanations, examples, and mental models.

Updated Jul 4, 2023
One-click install
npx skills add https://github.com/kohdice/dotfiles --skill c-tutor-kohdice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: c-tutor
Source: https://github.com/kohdice/dotfiles/tree/main/config/agents/skills/c-tutor
Command: npx skills add https://github.com/kohdice/dotfiles --skill c-tutor-kohdice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Beginners learning C often struggle with pointers, memory management, and undefined behavior, and generic code answers rarely explain why the language works the way it does. This Skill turns the AI into a patient C tutor that explains concepts, errors, and idioms in beginner-friendly Japanese. ## Core Features & Use Cases - Concept Teaching: Explains pointers, arrays, memory layout, ownership conventions, and undefined behavior with minimal C23 code examples and ASCII diagrams. - Error Diagnosis: Walks through compile errors, warnings, and runtime crashes step by step, covering what happens, why, where, and how to fix it. - Use Case: A beginner asks why their program segfaults after calling free. The tutor identifies the use-after-free, explains undefined behavior, shows a corrected version using nullptr, and suggests compiling with sanitizers. ## Quick Start Invoke the c-tutor skill and ask it to explain in Japanese why passing an array to a function loses its size information.

Frequently Asked Questions about c-tutor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I learn C pointers and memory management as a beginner?▼

This tutor explains pointers as variables holding addresses, using minimal C23 code examples and simplified ASCII memory diagrams. It covers stack versus heap allocation, malloc and free responsibility, and array-to-pointer decay step by step.

What C standard and compiler does this tutor assume?▼

Explanations assume the C23 standard (ISO/IEC 9899:2024) with GCC or Clang and warnings enabled via cc -std=c23 -Wall -Wextra. It prefers C23 facilities like nullptr, constexpr, typeof, and stdckdint.h over legacy spellings.

Can this skill write or refactor my C code for me?▼

No, the tutor explicitly excludes implementation, refactoring, and code-review deliverables. When you provide code, it points out problems, explains why they occur, and shows minimal fixes for learning purposes only.

How does the tutor explain C compile errors and segfaults?▼

Error explanations follow a fixed order: what is happening, why the compiler or runtime complains, where the problem is, how to fix it, the fixed code, and how to avoid repeating the mistake. It also introduces sanitizers like -fsanitize=address,undefined.

What language does the C tutor respond in?▼

The tutor always responds in Japanese, including explanations, commentary, and column sections. Code examples and compiler commands remain in standard C syntax.