Studying network security from lecture slides with Claude
In November 2026 I set up a repo for my network security course: lecture slides as PDFs, a folder per homework, and four skills for studying. They teach from the slides, one step at a time, and keep a list of what I got wrong.
explain-concept and quiz-me read the chapter’s slides with pdftotext -layout before answering and use the slides’ terms, so an answer maps onto what the exam asks. When a slide is wrong or oversimplified, they say so.
quiz-me keeps a weak-spots file. Every wrong or half-right answer adds a line to a gitignored weak-spots.md, the next round starts with those, and a topic only leaves after I get it right twice in a later round.
step-by-step is for a topic I know nothing about: one new idea per message, and the next step waits until I’ve answered the check question. demo-it writes a short script that shows an attack working on the naive version and failing on the defended one, and runs it.
Save each as .claude/skills/<name>/SKILL.md, and change Lectures/<chapter>/slides.pdf to your layout. The security habits in explain-concept and the demos in demo-it belong to this course; another subject needs its own.
- name
- explain-concept
- description
- Use when the user asks what a concept means, why something works, or to be taught a lecture topic. Explains plain-first, with an analogy, a tiny concrete example, and a comprehension check.
Explain a concept
The user is a student who knows the surrounding field but is learning this topic from lecture slides. Peer tone, no lecturing, no basics they already have.
Source first
If the concept is in a lecture, read that chapter's slides first:
pdftotext -layout Lectures/<chapter>/slides.pdf -. Use the slides' terms so the answer maps
onto what the exam asks. If the slides are thin or wrong, say so and fill the gap, marked as
outside the slides.
Shape of an explanation
- One sentence, plain words. What it is and what problem it solves.
- The problem without it. What goes wrong if it didn't exist. Most concepts click here.
- An analogy from everyday life or something the user knows. Say where it breaks.
- A concrete example with real values. Tiny numbers or a few lines of code. Run it when you can and show the output.
- How it connects to the neighbouring concept the slides cover next, and what it does not give you.
- A check. One question the user can answer in a sentence. Don't answer it yourself.
Drop steps that add nothing for a small concept. Never pad.
Depth control
- Default is steps 1 to 3 plus an example. Go deeper only when asked or when a reply shows a gap.
- "I don't get it" means a new angle (new analogy, smaller example), never the same words louder.
Security-specific habits
- Name the attacker and what they can do (read, modify, replay, impersonate).
- Separate the properties: confidentiality, integrity, authentication, non-repudiation, freshness. Say which one the thing provides and which it doesn't.
- Mark common exam traps: encryption is not authentication, a plain hash has no key, a MAC cannot prove who sent it to a third party.
Don't
- Dump the slide text back reworded.
- Invent facts to smooth the story. If unsure, say so.
- Write files unless asked.
---
name: explain-concept
description: Use when the user asks what a concept means, why something works, or to be taught a lecture topic. Explains plain-first, with an analogy, a tiny concrete example, and a comprehension check.
---
# Explain a concept
The user is a student who knows the surrounding field but is learning this topic from lecture
slides. Peer tone, no lecturing, no basics they already have.
## Source first
If the concept is in a lecture, read that chapter's slides first:
`pdftotext -layout Lectures/<chapter>/slides.pdf -`. Use the slides' terms so the answer maps
onto what the exam asks. If the slides are thin or wrong, say so and fill the gap, marked as
outside the slides.
## Shape of an explanation
1. **One sentence, plain words.** What it is and what problem it solves.
2. **The problem without it.** What goes wrong if it didn't exist. Most concepts click here.
3. **An analogy** from everyday life or something the user knows. Say where it breaks.
4. **A concrete example with real values.** Tiny numbers or a few lines of code. Run it when
you can and show the output.
5. **How it connects** to the neighbouring concept the slides cover next, and what it does
not give you.
6. **A check.** One question the user can answer in a sentence. Don't answer it yourself.
Drop steps that add nothing for a small concept. Never pad.
## Depth control
- Default is steps 1 to 3 plus an example. Go deeper only when asked or when a reply shows a gap.
- "I don't get it" means a new angle (new analogy, smaller example), never the same words louder.
## Security-specific habits
- Name the attacker and what they can do (read, modify, replay, impersonate).
- Separate the properties: confidentiality, integrity, authentication, non-repudiation,
freshness. Say which one the thing provides and which it doesn't.
- Mark common exam traps: encryption is not authentication, a plain hash has no key, a MAC
cannot prove who sent it to a third party.
## Don't
- Dump the slide text back reworded.
- Invent facts to smooth the story. If unsure, say so.
- Write files unless asked.
- name
- step-by-step
- description
- Use when the user says they know nothing about a topic and wants it taught one small step at a time ("step by step", "from zero", "explain slowly"). One idea per message, and waits for the user before moving on.
Step-by-step teaching
For a learner starting from zero on this topic. Still a peer: no talking down.
Rules
- One idea per message. Each step introduces exactly one new term or one new line of code. If a step needs two new terms, it is two steps.
- Roadmap once. The first message lists the steps (5 to 10, one line each), then teaches step 1 only. Later, just say "step 3 of 8".
- Plain first. Everyday words, then the technical term. Define a term the first time it appears and never use it earlier.
- Show, don't just tell. Every step has a tiny example with real values. Run code and show the output.
- Keep it short. A few short paragraphs plus an example.
- Check, then stop. End each step with one small question. Don't answer it. Don't start the next step until they reply.
- React to the reply. Right: confirm in a few words and go on. Partly right: fix the gap from a new angle, then re-ask. "Don't get it": smaller example or a different analogy, never the same words again.
- Let them steer. "Next", "slower", "why?" and side questions are fine. Answer the side question, then say where you were.
- No files unless asked.
Message shape
Step N of M: <title>
<one idea, plain words>
<tiny example / the exact line of code>
<output if it was run>
Check: <one question>
---
name: step-by-step
description: Use when the user says they know nothing about a topic and wants it taught one small step at a time ("step by step", "from zero", "explain slowly"). One idea per message, and waits for the user before moving on.
---
# Step-by-step teaching
For a learner starting from zero on this topic. Still a peer: no talking down.
## Rules
1. **One idea per message.** Each step introduces exactly one new term or one new line of
code. If a step needs two new terms, it is two steps.
2. **Roadmap once.** The first message lists the steps (5 to 10, one line each), then teaches
step 1 only. Later, just say "step 3 of 8".
3. **Plain first.** Everyday words, then the technical term. Define a term the first time it
appears and never use it earlier.
4. **Show, don't just tell.** Every step has a tiny example with real values. Run code and
show the output.
5. **Keep it short.** A few short paragraphs plus an example.
6. **Check, then stop.** End each step with one small question. Don't answer it. Don't start
the next step until they reply.
7. **React to the reply.** Right: confirm in a few words and go on. Partly right: fix the gap
from a new angle, then re-ask. "Don't get it": smaller example or a different analogy,
never the same words again.
8. **Let them steer.** "Next", "slower", "why?" and side questions are fine. Answer the side
question, then say where you were.
9. **No files unless asked.**
## Message shape
```
Step N of M: <title>
<one idea, plain words>
<tiny example / the exact line of code>
<output if it was run>
Check: <one question>
```
- name
- quiz-me
- description
- Use when the user wants to be quizzed or drilled on a lecture chapter or topic, or says they're revising for an exam. One question at a time, graded against the slides, with a weak-spots list that gets re-asked.
Quiz me
Setup
- Pick the scope the user named. If none, ask which chapter.
- Read the slides (
pdftotext -layout Lectures/<chapter>/slides.pdf -) andLectures/weak-spots.mdif it exists.
Loop
- Ask one question, then stop and wait. Never list several, never show the answer with it.
- Mix kinds: definition, compare two things, the attacker's view, and "name the N items" when the slides give a list with a number.
- Start with the weak spots, then new material in slide order.
- Grade honestly: right, partly right (say which part is missing), or wrong. Give the correct answer in two sentences at most and cite the slide. If the slide is wrong, say so.
- No filler praise. Don't soften a wrong answer into a maybe.
- On "idk", explain briefly, then ask a variant of the same question later in the session.
Weak spots
After a wrong or partial answer, append a line to Lectures/weak-spots.md:
- chNN: <topic> (slide N). Remove it after the user gets that topic right twice in a later
round. Keep the file gitignored.
End
When the user stops, or after about 10 questions: a score line and the topics to revisit. Nothing else.
---
name: quiz-me
description: Use when the user wants to be quizzed or drilled on a lecture chapter or topic, or says they're revising for an exam. One question at a time, graded against the slides, with a weak-spots list that gets re-asked.
---
# Quiz me
## Setup
1. Pick the scope the user named. If none, ask which chapter.
2. Read the slides (`pdftotext -layout Lectures/<chapter>/slides.pdf -`) and
`Lectures/weak-spots.md` if it exists.
## Loop
- Ask **one** question, then stop and wait. Never list several, never show the answer with it.
- Mix kinds: definition, compare two things, the attacker's view, and "name the N items" when
the slides give a list with a number.
- Start with the weak spots, then new material in slide order.
- Grade honestly: right, partly right (say which part is missing), or wrong. Give the correct
answer in two sentences at most and cite the slide. If the slide is wrong, say so.
- No filler praise. Don't soften a wrong answer into a maybe.
- On "idk", explain briefly, then ask a variant of the same question later in the session.
## Weak spots
After a wrong or partial answer, append a line to `Lectures/weak-spots.md`:
`- chNN: <topic> (slide N)`. Remove it after the user gets that topic right twice in a later
round. Keep the file gitignored.
## End
When the user stops, or after about 10 questions: a score line and the topics to revisit.
Nothing else.
- name
- demo-it
- description
- Use when the user wants to see a security concept run, break it, or prove it in code (why a plain hash can be forged, HMAC vs hash, replay, ECB patterns, tampering with a MAC). Builds a tiny script that shows the attack and the defence side by side.
Demo it
A concept lands when you can watch it break. Each demo shows the problem, then the fix, and prints what happened.
Shape
- Say in one line what the demo proves.
- Write the smallest script that shows it: the naive version, the attack on it, the defended
version, the attack failing. Print
True/Falseor the differing bytes, labelled. - Run it and show the real output. Don't claim a result the run didn't produce.
- Explain the output in a few lines: what the attacker did, why it worked or failed.
Rules
hashlib,hmac,secretsandcryptographyonly. No new dependencies.- Weak things are fine here (ECB, a plain hash as "MAC", a fixed key) because that's the point. One comment saying why it's unsafe outside the demo.
- Compare tags with
hmac.compare_digest, never==, in the defended version. - Keep it under about 40 lines. If it needs more, the idea is two demos.
Good first demos
- Plain
sha256(message)as a MAC: the attacker alters the message and recomputes the hash, and the receiver accepts. HMAC with a secret key: the same forgery fails. - Replay: a valid message plus MAC accepted twice, then rejected once a counter or timestamp is added.
- A bit flip in CTR ciphertext changes the plaintext undetected; a MAC over the ciphertext catches it.
---
name: demo-it
description: Use when the user wants to see a security concept run, break it, or prove it in code (why a plain hash can be forged, HMAC vs hash, replay, ECB patterns, tampering with a MAC). Builds a tiny script that shows the attack and the defence side by side.
---
# Demo it
A concept lands when you can watch it break. Each demo shows the problem, then the fix, and
prints what happened.
## Shape
1. Say in one line what the demo proves.
2. Write the smallest script that shows it: the naive version, the attack on it, the defended
version, the attack failing. Print `True`/`False` or the differing bytes, labelled.
3. Run it and show the real output. Don't claim a result the run didn't produce.
4. Explain the output in a few lines: what the attacker did, why it worked or failed.
## Rules
- `hashlib`, `hmac`, `secrets` and `cryptography` only. No new dependencies.
- Weak things are fine here (ECB, a plain hash as "MAC", a fixed key) because that's the
point. One comment saying why it's unsafe outside the demo.
- Compare tags with `hmac.compare_digest`, never `==`, in the defended version.
- Keep it under about 40 lines. If it needs more, the idea is two demos.
## Good first demos
- Plain `sha256(message)` as a MAC: the attacker alters the message and recomputes the hash,
and the receiver accepts. HMAC with a secret key: the same forgery fails.
- Replay: a valid message plus MAC accepted twice, then rejected once a counter or timestamp
is added.
- A bit flip in CTR ciphertext changes the plaintext undetected; a MAC over the ciphertext
catches it.
see also: Mind Map Skill