// Generates a comprehensive learning graph from a course description, including 200 concepts with dependencies, taxonomy categorization, and quality validation reports. Use this when the user wants to create a structured knowledge graph for educational content.
| name | learning-graph-generator |
| description | Generates a comprehensive learning graph from a course description, including 200 concepts with dependencies, taxonomy categorization, and quality validation reports. Use this when the user wants to create a structured knowledge graph for educational content. |
Version: 0.03
You are tasked with generating a comprehensive high-quality learning graph from a course description. A learning graph is the foundational data structure for intelligent textbooks that can recommend learning paths. A learning graph is like a roadmap of Concepts to help students achieve their learning goals. A learning graph is an DAG Concept graph. Each arrow is a "Learning Dependency" relationship that suggest learning order. The markdown you generate must be compatible with the mkdocs version of markdown. Make sure you put a blank line before any lists.
Follow these steps carefully:
After you add a markdown file (any file with an extension .md) make sure to add that file
to the navigation structure in the mkdocs.yml file. Here is an example of the nav section
for the learning graph section:
- Learning Graph:
- Introduction: learning-graph/index.md
- Course Description Assessment: learning-graph/course-description-assessment.md
- Concept Enumeration: learning-graph/list-concepts.md
- Graph Quality Analysis: learning-graph/graph-quality-analysis.md
- Concept Taxonomy: learning-graph/concept-taxonomy.md
- Taxonomy Distribution Report: learning-graph/taxonomy-distribution-report.md
Tell the user that they are running the version graph generator and the version number above.
The default context is that the skill is run from claude code in the home directory of an intelligent textbook that has been checked out from GitHub.
There should be a docs directory with a standard mkdocs.yml file in the home git directory.
You will create a directory called /docs/learning-graph it it does not already exist.
The path is relative to the git home directory. The assumption is that /docs is relative to the directory that claude was started in.
mkdir -p docs/learning-graph; cd docs/learning-graph
You will copy python programs from this skill package into the /docs/learning-graph directory.
You will execute python from that directory.
If you do not see the docs directory and the mkdocs.yml file suggest that the user clone a sample textbook from the following location:
git clone https://github.com/dmccreary/intelligent-book-template
cd intelligent-book-template
Before you begin this step, verify that it has not already been done.
To do this, check the yml metadata in the docs/course-description.md file.
Here is a sample of the yml metadata:
---
title: Course Description
description: A detailed course description
quality_score: 95
---
# Course Description
If you see a quality_score above 85 you may tell the user you found a score above 85 and skip this entire step. Tell them this is a way to save tokens.
If the quality score is below 85, analyze the provided course description at course-description.md to ensure it has enough content to generate 200 high-quality concepts:
Use the following rubric for creating a quality score:
Evaluate the course description using this 100-point scoring system:
| Element | Points | Criteria |
|---|---|---|
| Title | 5 | Clear, descriptive course title present |
| Target Audience | 5 | Specific audience identified (e.g., "college undergraduate") |
| Prerequisites | 5 | Prerequisites listed or explicitly stated as "None" |
| Main Topics Covered | 10 | Comprehensive list of topics (ideally 5-10 topics) |
| Topics Excluded | 5 | Clear boundaries set for what's NOT covered |
| Learning Outcomes Header | 5 | Clear statement: "After this course, students will be able to..." |
| Remember Level | 10 | Multiple specific outcomes for remembering/recalling |
| Understand Level | 10 | Multiple specific outcomes for understanding/explaining |
| Apply Level | 10 | Multiple specific outcomes for applying/using |
| Analyze Level | 10 | Multiple specific outcomes for analyzing/breaking down |
| Evaluate Level | 10 | Multiple specific outcomes for evaluating/judging |
| Create Level | 10 | Multiple specific outcomes for creating/synthesizing; includes capstone ideas |
| Descriptive Context | 5 | Additional context about course importance, relevance, or value |
Scoring Guidelines:
Tell user what their score was and suggest they improve the course description until the score goes above 80.
Save this report to course-description-assessment.md
Once the course-description has been approved, generate 200 concept labels from the course content:
Requirements:
!!! note Because these concept labels are used within a network graph, they must not be too long. Otherwise the graph will be hard to read.
Output:
Now ask the user to take some time to manually review the entire list of concept labels. If there are concepts that are not appropriate they should be removed now. If there are additional concepts that need to be added, they should be added now. It will require a lot of extra tokens later to change the content later. This is an important review step to ensure the quality of the textbook. Pay special attention to the length of the concept labels and the quality of any abbreviations.
Create a CSV file mapping dependencies between concepts:
Format:
ConceptID,ConceptLabel,DependenciesDependency Rules:
Note: The JSON file will be created in later steps (Steps 7-8) after the taxonomy is added to the CSV file. The complete JSON will include metadata, groups, nodes, and edges sections conforming to the learning-graph-schema.json.
Perform comprehensive quality checks on the dependency graph by using the Python program analyze-graph.py in this skill. It will do the following checks:
Shell command python analyze-graph.py learning-graph.csv quality-metrics.md
Verify the report has been written to quality-metrics.md
Generate the learning graph quality metrics report:
Give the user a general quality score on a scale of 1 (poor) to 100 (perfect). If the learning graph does not get a score above 70, suggest that the user iterates on the process
Develop a categorical taxonomy for organizing concepts:
Requirements:
Output:
Update the dependencies CSV file:
TaxonomyID to the existing CSV file if it does not existYou can use the Python Program add-taxonomy.py as a template that will do the substitution.
Final CSV columns: ConceptID,ConceptLabel,Dependencies,TaxonomyID
metadata section of the learning-graph.json fileThe metadata section contains Dublin Core-inspired fields for the textbook extracted from the course-description.md file. The JSON schema for the learning graph is located in the file learning-graph-schema.json within this skill.
Required fields:
title: Extract from the course description titledescription: Extract or summarize from the course descriptionOptional but recommended fields:
creator: Author or organization namedate: Current date in YYYY-MM-DD formatversion: Version number (e.g., "1.0")format: "Learning Graph JSON v1.0"schema: URL to the JSON schemalicense: License information (e.g., "CC BY-NC-SA 4.0 DEED")Here is an example of the metadata section:
"metadata": {
"title": "Title Text From Course Description",
"description": "A description of the course in a few sentences.",
"creator": "Your Name",
"date": "2025-11-01",
"version": "1.0",
"format": "Learning Graph JSON v1.0",
"schema": "https://raw.githubusercontent.com/dmccreary/learning-graphs/refs/heads/main/src/schema/learning-graph-schema.json",
"license": "CC BY-NC-SA 4.0 DEED"
}
You can create a metadata.json file with these fields to pass to the csv-to-json.py program in Step 9.
Convert the taxonomy categories into JSON format for the groups section of the learning-graph.json file. The JSON schema for the learning graph is located in the file learning-graph-schema.json within this skill.
The groups section creates a legend of concept types with distinct colors for visualization.
Important:
classifierName field containing a descriptive human-readable name (e.g., "Foundation Concepts", NOT just "FOUND")color field using named CSS colors (NOT hex codes like "#E74C3C")font object with a color field for text readabilityKey structure:
Below is an example of the groups section:
"groups": {
"FOUND": {
"classifierName": "Foundation Concepts",
"color": "LightCoral",
"font": {
"color": "black"
}
},
"DEF": {
"classifierName": "Definitions",
"color": "PeachPuff",
"font": {
"color": "black"
}
},
"CORE": {
"classifierName": "Core Concepts",
"color": "LightYellow",
"font": {
"color": "black"
}
},
"INTER": {
"classifierName": "Intermediate Concepts",
"color": "PaleGreen",
"font": {
"color": "black"
}
},
"ADV": {
"classifierName": "Advanced Concepts",
"color": "PowderBlue",
"font": {
"color": "black"
}
},
"MISC": {
"classifierName": "Miscellaneous Concepts",
"color": "Gainsboro",
"font": {
"color": "black"
}
},
"PROJ": {
"classifierName": "Project Ideas",
"color": "Lavender",
"font": {
"color": "black"
}
},
"CAP": {
"classifierName": "Capstone Projects",
"color": "Plum",
"font": {
"color": "black"
}
}
}
Note: The csv-to-json.py program will automatically generate the groups section based on the taxonomies found in your CSV file. You can customize colors by creating an optional color-config.json file.
Now that you have created the metadata.json file (Step 7) and have the taxonomy-enriched CSV (Step 6), run the csv-to-json.py program to generate the complete learning-graph.json file:
python csv-to-json.py learning-graph.csv learning-graph.json metadata.json
This command will:
Verify that the file learning-graph.json is present and valid.
Optional: You can validate the JSON against the schema using:
./validate-learning-graph.sh learning-graph.json
Generate a distribution analysis:
Use the python report in this skill called taxonomy-distribution.py
Output:
Create a new index.md file in the learning-graph directory from the file index-template.md in this skill.
Customize the new index.md file to reflect the name of this intelligent book. Look for values in all uppercase (TEXTBOOK_NAME)
and replace them with the appropriate values.
Export the session log to logs/learning-graph-generator-VERSION-DATE.md
Where:
Note that the session log should also list what version of any Python program was used. For example, not what version of the csv-to-json.py Python program was used in the session log. This is important for debugging.
Inform the user that the learning graph generation is complete! Congratulate them and wish them success on their textbook or course material. Tell them that the next step is the book-chapter-generator skill, but that it is critical to review the concept lists, the concept taxonomies and the learning graph before they do this next step.
Files created: