/learner:study [@file.md] [ch<N>|ch<N>-<N>] [flashcard|quiz] [easy|medium|hard] [count]from learner
Generate a quiz or flashcard study session from markdown notes in the current directory.
Ships in learner. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/study [@file] [chapter] [type] [difficulty] [count]
@notes.md or @some-dir/ (default: all .md files in the current directory). Can be combined with a chapter filter — e.g. @some-dir/ ch2 extracts chapter 2 from every file under that directory. The generated study file is saved under the basedir of this path rather than the current directory (see Step 4).ch2, ch2-4 (default: all chapters). Applies to whichever file(s) are selected — a single file, a directory's files, or all files in the current directory.flashcard or quiz (default: flashcard)easy, medium, or hard (default: medium)10)Step 0: Ensure stu is installed
Run which stu to check if the stu command is available. If found, continue to Step 1.
If it is NOT found:
Run go install github.com/ivorscott/cc-marketplace/apps/stu/cmd/stu@latest to install the latest published version into $GOPATH/bin (typically ~/go/bin).
If go install fails (e.g., no network or no Go toolchain), surface the error to the user and abort.
Run which stu again. If it still fails, warn the user:
stuwas installed but is not on$PATH. Add$HOME/go/binto your PATH:echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.zshrc && source ~/.zshrc
Then abort.
Step 1: Parse arguments
Parse $ARGUMENTS (space-separated). Defaults: file=none, dir=none, chapter=all, type=flashcard, difficulty=medium, count=10. Track a basedir for Step 4 — defaults to the current working directory.
Check the first token against the pattern ^@(.+)$:
@ and decide which kind of path filter it is:
/, or it exists on disk as a directory: consume it as the directory filter. Set basedir = that directory (trailing slash stripped).. if the path has no directory component).After resolving the path filter (or confirming there is none), check the next unconsumed token against the pattern ^ch(\d+)(-(\d+))?$ (case-insensitive), regardless of whether a path filter was found:
ch2 → single chapter N=2ch2-4 → chapter range start=2, end=4Parse whatever tokens remain for type/difficulty/count as usual.
Step 2: Read markdown file(s)
If a directory filter was parsed in Step 1:
<path>".*.md files recursively under that directory. Read each file's content. Skip any files inside .stu/..md files are found, abort and tell the user: "No markdown files found in: <path>".Else if a file filter was parsed in Step 1:
.md file, abort and tell the user: "File not found: <path>".Otherwise (no path filter): use the Glob tool to find all *.md files recursively in the current working directory. Read each file's content. Skip any files inside .stu/.
In every case above, if a chapter filter was parsed in Step 1, extract only the matching chapter sections from each file that was read (single file, a directory's files, or the current directory's files) before using the content:
^#{1,3}\s+(Chapter\s+N\b.*) (case-insensitive) where N is within the requested range.# characters), or at end-of-file.If no chapter filter was parsed, use the whole content of each file read above — no chapter-section extraction.
Step 3: Generate study content
Based on the parsed type, generate the content using the rules below. Output ONLY valid JSON — no prose, no markdown fences.
quizGenerate exactly count multiple-choice questions at the specified difficulty level. Each question must test a distinct concept from the notes. Harder difficulty means more nuanced distinctions or deeper conceptual understanding required.
Output JSON matching this schema exactly:
{
"type": "quiz",
"title": "<topic> Quiz",
"difficulty": "<difficulty>",
"sources": ["<relative path to each .md file read>"],
"created_at": "<ISO 8601 timestamp>",
"questions": [
{
"id": 1,
"question": "<clear, specific question>",
"options": [
"<option A>",
"<option B>",
"<option C>",
"<option D>"
],
"correct": <0-based index of correct option>,
"hint": "<brief hint that doesn't give away the answer>",
"explanations": [
"<explanation for why option A is correct or incorrect>",
"<explanation for why option B is correct or incorrect>",
"<explanation for why option C is correct or incorrect>",
"<explanation for why option D is correct or incorrect>"
]
}
]
}
Rules:
flashcardGenerate exactly count flashcards at the specified difficulty level. Each card tests a distinct fact or concept. Harder difficulty means more nuanced or application-level questions.
Output JSON matching this schema exactly:
{
"type": "flashcards",
"title": "<topic> Flashcards",
"difficulty": "<difficulty>",
"sources": ["<relative path to each .md file read>"],
"created_at": "<ISO 8601 timestamp>",
"cards": [
{
"id": 1,
"front": "<question or prompt>",
"back": "<concise answer>",
"explanation": "<optional: 1-2 sentence deeper explanation>"
}
]
}
Rules:
Step 4: Save the file
kafka, ccna, grpc) based on the directory or file names<basedir>/.stu/ directory if it doesn't exist, where basedir is the one determined in Step 1 (the directory of the @file/@dir argument, or the current working directory if no path filter was given)<basedir>/.stu/<slug>-<type>-<YYYYMMDD>.json
-2, -3, etc.Use the Write tool to save the file.
Step 5: Print the run command
Print the following to the user (do NOT run it), using the <basedir>/.stu/<filename>.json path from Step 4:
Study session saved to <basedir>/.stu/<filename>.json
To start studying, run:
stu <basedir>/.stu/<filename>.json
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/analogyGenerate an analogy for highlighted/selected text and insert it below the selection in the markdown file. Use when the user selects text and asks for an analogy./asciiRenders an ASCII diagram below selected or described content in a markdown file. Triggered when the user says "ascii", "diagram", "render", or asks to render an ASCII diagram from highlighted text or a description./book<Book Topic>: <Chapter Title>Summarize each chapter of the book/install-obsidianSet up Obsidian plugins for Claude Code integration — installs BRAT, obsidian-terminal, and obsidian-claude-selection, then enables them and adds a CMD+J terminal hotkey./install-wikiSet up Karpathy's LLM Wiki pattern in a folder — creates the full directory structure, CLAUDE.md schema, index, log, and four page templates ready for use with Obsidian.npx claudepluginhub ivorscott/cc-marketplace --plugin learner