Learn socratic
Skill alavten/learn-socratic
Socratic learning from documents with graph ingest plus a learn/quiz/review loop, mastery tracking, spaced scheduling, and variant quizzing. Use when users ask to study, teach me, test me, review, memorize, make flashcards, or prep for exams.From its SKILL.md
npx -y skills add alavten/learn-socraticAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.0 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Doc Socratic Learning Optimized
Purpose
This skill supports graph ingestion and concept learning with four interaction modes:
ingest: convert structured payload into a validated knowledge graph revision.learn: explain and coach new material.quiz: assess current mastery.review: reinforce retention and weak points.
Session Guardrails
Applies to every session regardless of mode.
- Session start: return
modeand one actionablenext_step. - Session end: return concise
summaryand one actionablenext_step. - One primary mode per user turn; use
sharedonly for clarification/recovery. - Follow exactly one active mode contract (
shared/ingest/learn/quiz/review) per turn; never mix per-mode rules. - Keep this file thin: mode-specific fields/steps live only in reference contract files (
references/*.md). - Do not use memory-only fallback as primary evidence; run required API discovery first.
- Books and large documents: use one stable
graph_idfor the whole book; ingest one chapter per turn into that same graph (chapters astopicswithtopic_type: chapter, sections underparent_topic_id). Do not split a single book into parallel root graphs or try to build the full book payload in one shot. Chapter reorder usesreorder-graph-topicsinsidereferences/ingest.md. - Learn chapter progression: teach one chapter at a time from the most recently active chapter forward; concepts touched in any mode (learn/quiz/review) are skipped in learn; do not backfill earlier chapters (use quiz/review for gaps).
- Learning telemetry is mandatory for
learn/quiz/review. - Quiz storage granularity is always one
add_interaction_recordper judged question, regardless ofquiz_pacing(per_conceptvsper_chapter); pacing only changes how many questions appear in one user turn. - After each taught concept or judged learner answer, immediately call
add_interaction_recordwithconcept_idand outcome payload. - Do not introduce the next concept, emit the next question, advance a review queue, or hand off modes until the previous record write succeeds or recovery is surfaced.
- Keep responses concise and evidence-grounded.
- Adapt difficulty based on latest learner performance.
Intent Matrix
Map natural language intent to target mode and reference contract file:
| User intent hint | Target mode | Contract file |
|---|---|---|
| import materials, build graph, update graph | ingest | references/ingest.md |
| fix chapter order, reorder topics, 章节顺序 | ingest | references/ingest.md |
| explain, teach me, learn | learn | references/learn.md |
| test me, quiz, ask questions, 一题一题, 批量测验, 一章测验 | quiz | references/quiz.md |
| review, recap, due items | review | references/review.md |
| weak points, mastery report, chapter performance, 薄弱点, 掌握程度 | shared (discovery) then diagnostics CLI | references/shared.md |
| ambiguous or conflicting intent | shared | references/shared.md |
Routing flow rules:
- If intent is missing, conflicting, or ambiguous, route to
sharedfor one clarification turn and then re-route. - In-session mode switching must return to this router first, then dispatch to the new target mode.
- If target mode file is unavailable or dispatch fails, return
summarywith failure reason andnext_stepto continue inshared. sharedalso handles recoverable execution failures and long-tail capability discovery, then must hand off back to one main mode (ingest/learn/quiz/review) when context is ready.
Mastery / weak-point diagnostics
When the user asks for weak points, mastery by chapter, or learning performance analysis (not an interactive review/quiz turn):
- If
plan_idis unknown, run discovery (list-learning-plansorsharedflow) and let the user pick a plan. - Call
get-mastery-diagnosticsonce and read the JSON (by_topic,by_concept,ranked_weak_concepts,summary). Do not query SQLite or invent table names. - Optional scope:
--topic-idfor a chapter subtree, or--concept-idfor a concept plus allpart_ofsub-concepts. - After the report, route to
review/learn/quizwith a concretenext_step.
Shell (required prefix on every command): cd <skill-repo-root> && python -m scripts.cli.main …
Examples:
cd …/learn-socratic && python -m scripts.cli.main get-mastery-diagnostics --plan-id PLAN_ID
cd …/learn-socratic && python -m scripts.cli.main get-mastery-diagnostics --plan-id PLAN_ID --topic-id t1
cd …/learn-socratic && python -m scripts.cli.main get-mastery-diagnostics --plan-id PLAN_ID --concept-id c1
Forbidden for diagnostics: ad-hoc SQL or from scripts.knowledge_graph.api import create_app. Python entry point when needed: from scripts.app import create_app.
list-learning-plans semantics: progress.pending_tasks counts LearningTask queue rows, not “number of review questions due”.
get-mode-context vs diagnostics: CLI stdout includes context_summary for session continuation in learn/quiz/review; for mastery reports use get-mastery-diagnostics instead.
CLI Hints
Run commands from the skill repo root (the directory that contains scripts/), e.g. cd …/learn-socratic && python -m scripts.cli.main ….
Naming
| Surface | Style | Example |
|---|---|---|
CLI subcommands, flags, API discovery name (list-apis, get-api-spec --api-name) | kebab-case | create-learning-plan, --plan-id |
| JSON request/response fields in API payloads | snake_case | graph_id, plan_id, concept_id |
Discovery (authoritative)
list-apis— JSON list of orchestration APInamevalues (kebab-case), aligned with CLI subcommands where a dedicated command exists.get-api-spec --api-name <kebab-case>— input JSON Schema; value must be anamefromlist-apis(e.g.create-learning-plan). Snake_case names (e.g.create_learning_plan) are rejected.list-knowledge-graphs— lists stored graph metadata; use this to obtain validgraph_idvalues. It does not enumerate shell subcommands (do not confuse withlist-apis).
Allowed CLI subcommands only (must match scripts/cli/main.py; do not invent names such as get-concepts):
list-apis, get-api-spec, list-knowledge-graphs, get-knowledge-graph, ingest-knowledge-graph, reorder-graph-topics, remove-knowledge-graph-entities, list-learning-plans, create-learning-plan, extend-learning-plan-topics, get-mode-context, get-mastery-diagnostics, add-interaction-record
Notes
- There is no
get-conceptsCLI. To fetch concept briefs from the terminal by graph (and optionally topic), useget-knowledge-graphwith--graph-idand optional--topic-id,--concept-limit,--offset. scripts.knowledge_graph.api.get_conceptsis a Python module helper, not a method onOrchestrationAppServiceand not exposed as a subcommand.- Some orchestration APIs (e.g.
get_discovery_context) have no dedicated CLI; call them viafrom scripts.app import create_appin Python (orcall_apiif you use it).
Examples:
python -m scripts.cli.main get-mode-context --mode learn --plan-id PLAN_ID --topic-id t1
python -m scripts.cli.main get-mode-context --mode learn --plan-id PLAN_ID --session-context-json '{"served_concept_ids":["c1"],"last_completed_concept_id":"c1","last_result":"ok"}'
On learn re-entry, always call get-mode-context --mode learn with the prior turn's next_session_context (or rely on server DB fallback). Teach only session_queue.current_item.concept_id.
What ships with it: 116 files
452.9 KB alongside SKILL.md, 66 of them executable
docs/
- architecture-design.md21.8 KB
scripts/
- app.pyruns778 B
- cli/__init__.pyruns60 B
- cli/main.pyruns11.6 KB
- foundation/__init__.pyruns49 B
- foundation/logger.pyruns777 B
- foundation/migrations/__init__.pyruns115 B
- foundation/storage.pyruns9.7 KB
- __init__.pyruns45 B
- knowledge_graph/api.pyruns11.8 KB
- knowledge_graph/ingest.pyruns17.2 KB
- knowledge_graph/__init__.pyruns35 B
- knowledge_graph/reorder.pyruns8.7 KB
- knowledge_graph/store.pyruns20.2 KB
- knowledge_graph/validate.pyruns12.7 KB
- learning/api.pyruns41.9 KB
- learning/__init__.pyruns28 B
- learning/learn_chapter.pyruns3.8 KB
- learning/session.pyruns5.1 KB
- learning/state.pyruns9.7 KB
- learning/tasking.pyruns11.4 KB
- learning/validation.pyruns4.7 KB
- orchestration/__init__.pyruns35 B
- orchestration/orchestration_app_service.pyruns46.3 KB
- orchestration/prompt_templates.pyruns6.1 KB
- orchestration/session_state.pyruns9.7 KB
tests/
- fetch_all.pyruns4.3 KB
- .gitignore745 B
- pyproject.toml499 B
- README.md6.3 KB
- requirements-dev.txt32 B
- requirements.txt16 B
- .skr.yaml.example365 B
76 more files not listed here. See all 116 in the repository.