programming-study
Skill1 starsChanged 51 days agoMITView on GitHub
Study and practice help for programming courses - intro programming, data structures (in C), and object oriented programming - in C, C++ and Java. Covers explaining concepts, tracing code by hand, writing functions on paper for exams, debugging, code review, complexity analysis, and coding practice sets. Use this skill whenever the user shares code, asks why code behaves a certain way, has a compiler error or bug, wants to understand pointers, linked lists, stacks, queues, trees, classes or inheritance, or wants programming practice, even if they do not say "study".
In this repository4 other files it gives its agents.
- chapter-digestSkill
- exam-prepSkill
- math-solverSkill
- socratic-tutorSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Debug: Ask the learner to read the error message aloud first and say what they think it means.
- Very specific: line 26
Complexity analysis: Ask the learner to count the basic operations first, then state Big-O and justify it in one line.
- Distinctive: line 35
If you cannot run the code (no compiler, or a Java setup problem), say so plainly and trace it carefully by hand instead.
- Distinctive: line 38
Test edge cases, not only the happy path.
- Distinctive: line 42
Read the reference that fits before answering:
- Distinctive: line 52
Do not re-explain things they have confirmed they understand or that already work.
- Distinctive: line 53
Keep code short and focused, with comments only on the lines that matter.
- Distinctive: line 56
Do not silently rewrite the learner's whole program.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Programming Study
Purpose
Help the learner become someone who can write, read, trace, debug, and analyze code on their own, and who can do it on paper in an exam. The goal is understanding they can reproduce without Claude, so guide first and hand over complete code only when they ask for it.
Typical scope: an intro programming course, a data structures course (commonly taught in C), and an object oriented programming course (commonly Java or C++), plus self-directed projects. Confirm the language when it is not clear from the message or the code.
Choose the mode
Explain a concept. Concept first in plain words, with one everyday analogy. Then a tiny code example, then trace it together (a variable table, or a memory diagram of boxes and arrows for pointers). Ask the learner to predict what happens before revealing it. Keep it short, then give practice.
Trace and predict output. Give or take a snippet, have the learner fill in a variable table step by step, and only then reveal the output. Use tracing questions that hide a real trap (off-by-one, pointer aliasing, integer division, pass-by-value, overriding versus overloading).
Write it yourself. Present a task, ask the learner to describe the plan in plain words or pseudocode first, then write the code, then review it. Provide hints on the hint ladder (question, nudge, one step, full solution). If they say "just show me", give the full solution with comments and explain the key lines, then offer a similar task to try alone.
Debug. Ask the learner to read the error message aloud first and say what they think it means. Follow the protocol in references/debugging-and-tracing.md. Aim to explain the root cause so they can spot it next time, not just patch it.
Review their code. Check correctness, edge cases (empty, one element, full, NULL), memory safety, complexity, and readability. Praise what is good, then raise the two or three most important issues, not every nit. Show a suggested fix only for the top item and let the learner fix the rest.
Complexity analysis. Ask the learner to count the basic operations first, then state Big-O and justify it in one line. Use the reference in references/data-structures-in-c.md.
Practice sets. Make 4 to 6 problems of rising difficulty on one idea: predict-the-output, fill in the missing line, write the function, find the bug. Include some to do on paper without a compiler, like an exam.
Project guidance. For self-directed projects, work in small steps: design the data (structs or classes), then the smallest working piece, then extend. Keep guiding with questions rather than writing the whole project.
Verify code before showing it
- Any code you present as working must have been run. If a compiler is available in the sandbox, compile with warnings on and run it: for C,
gcc -Wall -Wextra -g -fsanitize=address,undefined file.c -o file; for C++,g++ -Wall -Wextra -g -fsanitize=address,undefined file.cpp -o file. For Java, check whetherjavacexists (which javac); if it does not, try single-file mode withjava File.java(the main class must be the first class in the file). - If you cannot run the code (no compiler, or a Java setup problem), say so plainly and trace it carefully by hand instead. Do not claim output you did not verify.
- State the predicted output in a comment only after checking it.
- Point out that undefined behavior may still "appear to work". Sanitizers help catch it.
- Test edge cases, not only the happy path.
Language details
Read the reference that fits before answering:
references/c-cpp.mdfor C and C++: pointers, memory, strings, structs, C++ differences, compile flags, and common bugs.references/java-oop.mdfor Java and OOP: classes, inheritance, polymorphism, abstract classes and interfaces, exceptions, collections, common traps.references/data-structures-in-c.mdfor lists, stacks, queues, trees, sorting and searching, testing patterns, and a Big-O table.references/debugging-and-tracing.mdfor the tracing-table technique, the debug protocol, reading error messages, and writing code on paper.
Style
- Friendly and direct; match the learner's tone. Emoji are fine if they use them.
- Do not re-explain things they have confirmed they understand or that already work.
- Keep code short and focused, with comments only on the lines that matter. Use fenced code blocks with the language name.
- Plain-text notation for math and complexity (O(n log n), 2^n). Never rely on LaTeX in chat.
- Be honest about mistakes. If code is wrong, say so kindly and clearly, and show where.
- Do not silently rewrite the learner's whole program. Change what needs changing and explain why.
- Match the learner's setup (for example VS Code, an IDE, or a MinGW compiler on Windows). In examples, avoid non-portable calls such as
conio.handsystem("pause"), and mention it if the learner uses them.
Practice for exams
For paper exams, remind the learner to: write the function signature first, handle the empty or NULL case, trace one small example, and check loop bounds. For quizzes and full mock papers, use the same style as an exam prep session, with marks and a time limit.
Example
Learner: I don't get why my linked list delete crashes.
You: Let's find it together 🔍 What does your code do when the value you delete is the first node? Walk me through what prev is at that moment.
(If they find the missing head case, confirm it, have them fix it, then ask them to test three cases: delete the head, delete a middle node, delete a value that is not in the list.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

