Skill metadata
Reference: full SKILL.md
The following is the complete skill definition that Mibyan loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
Memento Flashcards — Spaced-Repetition Flashcard Skill
Overview
Memento gives you a local, file-based flashcard system with spaced-repetition scheduling. Users can chat with their flashcards by answering in free text and having the agent grade the response before scheduling the next review. Use it whenever the user wants to:- Remember a fact — turn any statement into a Q/A flashcard
- Study with spaced repetition — review due cards with adaptive intervals and agent-graded free-text answers
- Quiz from a YouTube video — fetch a transcript and generate a 5-question quiz
- Manage decks — organise cards into collections, export/import CSV
- Use plain text only. Do not use Markdown formatting in replies to the user.
- Keep review and quiz feedback brief and neutral. Avoid extra praise, pep, or long explanations.
When to Use
Use this skill when the user wants to:- Save facts as flashcards for later review
- Review due cards with spaced repetition
- Generate a quiz from a YouTube video transcript
- Import, export, inspect, or delete flashcard data
Quick Reference
Card Storage
Cards are stored in a JSON file at:memento_cards.py subcommands. The script handles atomic writes (write to temp file, then rename) to prevent corruption.
The file is created automatically on first use.
Procedure
Creating Cards from Facts
Activation Rules
Not every factual statement should become a flashcard. Use this three-tier check:- Explicit intent — the user mentions “memento”, “flashcard”, “remember this”, “save this card”, “add a card”, or similar phrasing that clearly requests a flashcard → create the card directly, no confirmation needed.
- Implicit intent — the user sends a factual statement without mentioning flashcards (e.g. “The speed of light is 299,792 km/s”) → ask first: “Want me to save this as a Memento flashcard?” Only create the card if the user confirms.
- No intent — the message is a coding task, a question, instructions, normal conversation, or anything that is clearly not a fact to memorize → do NOT activate this skill at all. Let other skills or default behavior handle it.
- The question should test recall of the key fact
- The answer should be concise and direct
"General" as the default.
The script outputs JSON confirming the created card.
Manual Card Creation
When the user explicitly asks to create a flashcard, ask them for:- The question (front of card)
- The answer (back of card)
- The collection name (optional — default to
"General")
memento_cards.py add as above.
Reviewing Due Cards
When the user wants to review, fetch all due cards:next_review_at <= now. If a collection filter is needed:
Agent: What year did the Berlin Wall fall? User: 1991 Agent: Not quite. The Berlin Wall fell in 1989. Next review is tomorrow. (agent calls: memento_cards.py rate —id ABC —rating hard —user-answer “1991”) Next question: Who was the first person to walk on the moon?The rules:
- Show only the question. Wait for the user to answer.
- After receiving their answer, compare it to the expected answer and grade it:
- correct → user got the key fact right (even if worded differently)
- partial → right track but missing the core detail
- incorrect → wrong or off-topic
- You MUST tell the user the correct answer and how they did. Keep it short and plain-text. Use this format:
- correct: “Correct. Answer: {answer}. Next review in 7 days.”
- partial: “Close. Answer: {answer}. {what they missed}. Next review in 3 days.”
- incorrect: “Not quite. Answer: {answer}. Next review tomorrow.”
- Then call the rate command: correct→easy, partial→good, incorrect→hard.
- Then show the next question.
--rating retire for this.
Spaced Repetition Algorithm
The rating determines the next review interval:- learning: card is actively in rotation
- retired: card won’t appear in reviews (user has mastered it or manually retired it)
- Three consecutive “easy” ratings automatically retire a card
YouTube Quiz Generation
When the user sends a YouTube URL and wants a quiz: Step 1: Extract the video ID from the URL (e.g.dQw4w9WgXcQ from https://www.youtube.com/watch?v=dQw4w9WgXcQ).
Step 2: Fetch the transcript:
{"title": "...", "transcript": "..."} or an error.
If the script reports missing_dependency, use terminal with a PM-prepared
Mibyan checkout to prepare the declared youtube extra, then reactivate:
youtube_quiz.py with that Python and the actual
skill directory returned by skill_view. For a remote or sandbox terminal,
prepare an independent helper environment on that host. Never pip-install into
Mibyan’s selected environment.
Step 3: Generate 5 quiz questions from the transcript. Use these rules:
question and answer strings. If validation fails, retry once.
Step 5: Store quiz cards:
video_id — if cards for that video already exist, it skips creation and reports the existing cards.
Step 6: Present questions one-by-one using the same free-text grading flow:
- Show “Question 1/5: …” and wait for the user’s answer. Never include the answer or any hint about revealing it.
- Wait for the user to answer in their own words
- Grade their answer using the grading prompt (see “Reviewing Due Cards” section)
- IMPORTANT: You MUST reply to the user with feedback before doing anything else. Show the grade, the correct answer, and when the card is next due. Do NOT silently skip to the next question. Keep it short and plain-text. Example: “Not quite. Answer: {answer}. Next review tomorrow.”
- After showing feedback, call the rate command and then show the next question in the same message:
- Repeat. Every answer MUST receive visible feedback before the next question.
Export/Import CSV
Export:question,answer,collection (no header row).
Import:
--collection argument.
Statistics
total: total card countlearning: cards in active rotationretired: mastered cardsdue_now: cards due for review right nowcollections: breakdown by collection name
Pitfalls
- Never edit
cards.jsondirectly — always use the script subcommands to avoid corruption - Transcript failures — some YouTube videos have no English transcript or have transcripts disabled; inform the user and suggest another video
- Optional dependency —
youtube_quiz.pyneedsyoutube-transcript-api; use the PM preparation and interpreter check above if missing. - Large imports — CSV imports with thousands of rows work fine but the JSON output may be verbose; summarize the result for the user
- Video ID extraction — support both
youtube.com/watch?v=IDandyoutu.be/IDURL formats
Verification
Verify the helper scripts directly:- Start a review and confirm feedback is plain text, brief, and always includes the correct answer before the next card
- Run a YouTube quiz flow and confirm each answer receives visible feedback before the next question

