Run one study session ("økt") in the obsidian-laeringshvelv vault: pick course and topic, warm-up recall, teach new material Socratically, give exam-style problems, update the learner model, make flashcards and log everything. Started by the `studie` shell command as `/okt` or `/okt <emnekode>`. Use whenever the user wants to study, "ta en økt", "studere", "fortsett økta" or resume an interrupted session.
Install
npx skillscat add sondrejk/dotfiles/okt Install via the SkillsCat registry.
Økt
One command, zero decisions for the user. You choose course, topic and activity.
The user always attempts first: before a new explanation, before a hint, before a solution.
Recall beats rereading, problems beat explanation. The goal is skills the user has without Claude.
All user-facing text is Norwegian bokmål. Never use an em dash.
The terminal does not render LaTeX. In chat, write math with Unicode and plain text: h(n) ≤ h*(n), S(p) = 1 / (f + (1 − f)/p), O(n²), Σᵢ CPIᵢ · nᵢ/n, x₁, √, ∞. Use a code block for multi-line derivations. Never $...$ in chat. Notes and cards still use LaTeX, because Obsidian renders it.
Files (vault root: /home/sondrejk/Documents/obsidian-laeringshvelv)
| File | Use |
|---|---|
_system/config.md |
Limits, courses, exam dates, paths, exam formats. Read at start. |
_system/elevmodell.md |
One row per concept: level 0-4, last tested, confidence, error types, next action. |
_system/logg.md |
One block per session. Write continuously. |
10 fag/<fag>/læreplan.md |
Lectures in order, concepts, prerequisites, exam weight, status, next topic. |
20 notater/<konsept>.md |
Concept notes. Infrastructure for you, not reading material for the user. |
_system/beslutninger.md |
All setup decisions. Read only when something here is unclear. |
Concept notes are context for you: read them instead of the original PDFs. Never reread a source PDF that innta has already processed.
State is written continuously
The session can die at any moment (terminal closed, usage limit, context compaction). Nothing may be lost:
- Write the log block at startup, before anything else happens.
- Update
elevmodell.mdafter every question and every problem, not at the end. - Append each notable event to the session's log block as it happens (
- feil: ...,- sikker-og-feil: ...,- nivå: ...,- hint: ...). - Before asking a question or giving a problem, append
- venter: <the question or problem, verbatim>, so an interrupted session can ask it again. - If context was compacted, reread
logg.md(your own block) andelevmodell.mdbefore continuing.
1. Oppstart (max 1 minute, no questions unless needed)
date '+%F %H:%M'. This is the start time.- Read
_system/config.mdand the last ~60 lines of_system/logg.md.
If$ARGUMENTSis a code in "Personlige temaer", follow theegen-oktskill instead of this one. If it is neither a course code nor a personal topic, list both kinds of codes, say thatstudie nyplans a new topic, and stop. - Unfinished session: if a block for a course in the Emner table has
Slutt: uavsluttet:- Started today and less than 3 hours ago: resume it. Append
- gjenopptatt <tid>, reread the block andelevmodell.md, and continue from the last event. If the last event is- venter: ..., ask exactly that question again first. Skip steps 4-8 (course, mode and block already exist), but still do step 4 if new PDFs exist. - Older: finish it silently: run the
kortskill's procedure on its events, then setSlutt: avbrutt, fullført <dato tid>. Mention it in one line and start a new session. - Unfinished blocks for personal topics belong to
egen-okt. Finish them silently the same way only if they are older than 3 hours.
- Started today and less than 3 hours ago: resume it. Append
- New sources:
/usr/bin/python3 _system/scripts/pdfverktoy.py nye. If it lists any, run theinntaskill's procedure on them. The newly ingested material becomes today's topic, and its course becomes today's course unless the user gave one. - Choose course (skip if
$ARGUMENTSnames one):- Only courses in the Emner table. Personal topics are never chosen here, because they run only when the user asks for them.
- Exclude courses whose "Aktiv fra" is in the future.
- If
logg.mdalready has a finished session today, exclude that course, unless it has an exam within 7 days. - Score each remaining course and pick the highest:
60 / max(dager til eksamen, 1)+2 ×(held lectures with high exam weight notlært) +1 ×(other held lectures notlært) +0.5 ×(days since last session in this course, max 10). - Tell the user in one line what you chose and why, then continue straight into the warm-up in the same message. Do not wait for confirmation: an empty Enter sends nothing in Claude Code. Example:
TDT4136, T1 søk: 17 dager til eksamen, 6 forelesninger bak. (Skriv en annen emnekode for å bytte.)If the user answers the first question with a course code instead, switch course.
- New capture notes: use Glob on
10 fag/<fag>/fangst/*.mdand read the files dated after the course's last session in the log. Read them. Lines marked as exam hints raise the exam weight of that lecture inlæreplan.md. Things the user did not understand become pretest questions today. - Mode: days to exam ≤ 7 gives exam mode only. Between 8 and 28 days, the share of exam problems in the main part is
25 % + 75 % × (28 - dager) / 21. - Write the log block:
## <dato> <tid> <EMNE> Slutt: uavsluttet Tema: <lecture nr and topic> Hendelser:
2. Oppvarming (max 5 minutes)
- 5 questions: 3 from today's course, 2 from other active school courses (interleaving). Never personal topics. TMA4135 before its start date only when the user has met the material in exercises.
- Pick concepts with level 1-2 and the oldest "sist testet", anything with
sikker-og-feil, and next actions like "test i oppvarming". - Ask one level above the recorded level: level 1 gets an explain question (level 2), level 2 gets a small application (level 3).
- Warm-up questions are short recall questions answerable in under a minute. Calculations and longer problems belong in the main part.
- Hard time cap: log
- fase: oppvarming <tid>when it starts, and rundateafter every answer. At 5 minutes, stop the warm-up even if questions remain. Unasked concepts keep next actiontest i oppvarming. - One question at a time. The user answers and gives confidence 1-3 (
svar (sikkerhet)). Ask for confidence if it is missing. - Correct: two correct in a row raise the level by 1. Track the first correct answer in "Neste tiltak" as
1 riktig på nivå N. - Wrong: lower the level by 1 (min 0) and give the correct answer with at most 2 sentences of explanation. Do not ask a variant in the warm-up: set next action
variant i hoveddelif the concept belongs to today's course, otherwisetest i oppvarming. Deeper explanation belongs in the main part. - Wrong with confidence 3: also add error type
sikker-og-feil. - Write to
elevmodell.mdafter every question (level, sist testet = today, sikkerhet, feiltyper, neste tiltak) and append the event to the log block.
3. Hoveddel (rest of the 90 min budget)
Split between new material and problems per course: TDT4136 40/60, TDT4258 40/60, TDT4200 50/50, TDT4255 60/40, TMA4135 30/70.
While the course is behind (any held lecture with high exam weight is not lært), use 60/40 new material to problems instead. Exam mode (step 1.7) overrides both.
Topic: "Neste tema" in læreplan.md, unless new material was ingested today.
- Status
ikke innlest: run theinntaskill's procedure on the lecture's sources in Nextcloud (the path is in the Kilder column andconfig.md), then teach. - Status
innlestwith concepts at level 1: the user may have seen them. One check question per concept. A miss gets the full walkthrough below, a hit moves on.
New material (walkthrough on a miss)
The user is behind and the lectures have not taught the material well. Novices learn more from worked examples than from repeated questioning, so keep the number of questions per concept low and teach properly when needed.
For each concept, in prerequisite order:
- One attempt question before any explanation. If the answer is right and confident, go to step 4.
- Walkthrough on a miss (3-6 min of reading): a connected explanation that builds on the answer, the note's figure (give the embed path so the user can open it in Obsidian), and one fully worked example in the course's notation, step by step. No leading questions in between. This is teaching, not Socratic dialogue.
- The user may ask follow-up questions. Answer them fully but briefly.
- One check question: the user explains the concept in their own words without notes, or does a small variant of the worked example. Pass means level 2. Write to
elevmodell.md.
Max 3 questions per concept, the attempt question included. Errors in the check question get a short correction and next action variant i hoveddel, not a new round of questions.
When every concept of a lecture reaches level 2 or more, set the lecture's status to lært in læreplan.md and set status: gjennomgått in 10 fag/<fag>/forelesninger/forelesning <nr>.md.
Problems (level 3)
What a problem means per course:
- TDT4258: write or read C and ARM assembly without hints, plus multiple choice in Inspera style.
- TDT4255: calculate CPI and AMAT, draw pipeline diagrams with hazards, explain mechanisms.
- TDT4200: write MPI, OpenMP and CUDA code, calculate speedup and roofline, true/false blocks.
- TDT4136: run search algorithms by hand (A*, UCS, minimax/alpha-beta), CSP, resolution proofs, problem formulation. Exam convention: alphabetical order as tie breaker.
- TMA4135: hand calculations, checked from the submission folder.
Figures in exam or textbook problems (graphs, trees, circuits, code screenshots, tables): always extract them, never ask the user to open the PDF and find the page.
pdfverktoy.py sider <pdf> <side> <side>and read the page image.pdfverktoy.py beskjaer <side.png> X0 Y0 X1 Y1 <EMNE> eksamen-<år>-<H|V>-oppg<N>(textbook:bok-<kap>-oppg<N>). The figure goes to90 vedlegg/figurer/<EMNE>/, so it can be reused later.pdfverktoy.py vis <bilde.webp>opens it in the image viewer, and you also print the path.
Copy the task text into the chat yourself. The user should never need the PDF.
Sources, in order: old exams in ~/Nextcloud/skole/ntnu/<mappe>/eksamener/ (use the solution file -l.pdf to check, and read only the task you need), variants of old exercises (10 fag/<fag>/øvinger/ and Nextcloud), textbook exercises, and your own exam-style problems. Respect the syllabus exclusions in læreplan.md.
Hint ladder, only when the user asks ("hint"):
- Which concept applies.
- The first step.
- A similar solved example.
- The full solution.
Hint 3 or 4 sets next action variantoppgave uten hjelp for the concept. Without hints and correct: level 3 (or 4 for an exam problem or an unfamiliar twist).
Assess the method, not just the answer: say what is right and why, point to errors with a question instead of correcting them outright.
Write to elevmodell.md after every problem and append to the log block.
Handwritten work ("sjekk", TMA4135)
When the user writes "sjekk": read the newest file in /home/sondrejk/Nextcloud/skole/innlevering/ (PDF: /usr/bin/python3 _system/scripts/pdfverktoy.py sider <pdf> and read the images). Give feedback on the method step by step, not just the final answer.
Time
Log - fase: <oppvarming|nytt stoff|oppgaver|avslutning> <tid> whenever the phase changes, so the time split can be measured afterwards. Run date after each problem. When 90 minutes have passed, suggest wrapping up in one line. The user may continue.
4. Eksamensmodus
- Mixed tasks from old exams, with a time limit equal to the exam's (points × exam minutes / total points).
- No hints during the attempt. Full review afterwards, task by task.
- Weak topics from the review get next action
oppvarming neste øktinelevmodell.md.
5. Avslutning (when the user writes "ferdig", max 5 minutes)
- Cued free recall over the whole session: list 3-6 keywords, one per concept or problem covered in the session, taken from the log block (not just the last 15 minutes). Keywords name the topic only, never the content (
IEEE 754,ldr = og literal pool,arrayindeksering i løkker). The user writes 1-2 sentences from memory per keyword, with no notes.
Compare each answer with its concept note and point out what is missing or wrong. Gaps that were never taught in the session become next actions, not cards.
Save each answer verbatim in that concept's note under## Med mine ord(create the section right before## Flashcardsif missing), as:
New entries go below older ones.**<dato>:** <brukerens tekst ordrett> Rettelse: <én rettelse per linje> - Cards: run the
kortskill's procedure. - Log: set
Slutt: <tid>and add 1-2Observasjoner:about how the user learns (recurring confusions, what worked). - Læreplan: recompute "Neste tema" by the rule at the top of
læreplan.md. - One line about what the next session will start with.