project-teacher
Original:🇺🇸 English
Translated
Generates a detailed project explanation and retrospective (FOR_USER.md) to help the user learn from the project. Use this skill when the user asks to explain the project, asks "what did we just build?", or invokes the skill to generate a learning resource after a coding session.
1installs
Sourcenweii/agent-stuff
Added on
NPX Install
npx skill4agent add nweii/agent-stuff project-teacherTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Project Teacher
Generate a detailed explanation of the current project or task, focusing on the "why" and "how" to help the user learn.
Usage
When triggered, generate a markdown file containing the learning resource.
1. Check for Existing Documents (Synchronization)
Before generating a new file, search the output directory (default: ) for existing documents related to the current project.
learning/- If a match is found: Ask the user: "I found an existing learning doc '[Filename]'. Do you want to update it or create a new snapshot?"
- If User chooses Update:
- Rename: Updates the suffix date to today's date (e.g., ) to reflect freshness.
API_Layout - 2024-03-25.md - Metadata: Update the and
lastfields in the frontmatter.commit - Content: Rewrite sections that are outdated, but preserve valuable historical context if it still applies.
- Log: Add a line to a section at the bottom (create one if missing).
## Version history
- Rename: Updates the suffix date to today's date (e.g.,
- If User chooses New / No match found: Create a new file.
2. Output Location
- Check for user preference: If the user specified a location (e.g., "save to my vault"), use that.
- Obsidian / External Vaults: If saving to an external Obsidian vault, first check its root or /
.cursor/folders for applicable context files. These files often contain specific instructions for how to save and format notes in that system. Delegate to those instructions if they exist..claude/
- Obsidian / External Vaults: If saving to an external Obsidian vault, first check its root or
- Default Location: If no location is specified, use a directory named in the project root.
learning/- Create the directory if it doesn't exist.
learning/ - CRITICAL: Check if is in
learning/. If not, add it to.gitignoreto ensure these personal documents are not committed to shared repositories..gitignore
- Create the
- File Naming: Name the file .
[Descriptive title] - [YYYY-MM-DD].md- Structure: . The leading part should be semantic and descriptive of what is being explained.
[Topic or Component] - [Date].md - Examples:
Authentication system walkthrough - 2024-03-25.mdRecipe parser logic - 2024-03-25.mdProject Teacher overview - 2024-03-25.md
- Structure:
3. File Structure & Metadata Header
Use YAML frontmatter for machine-readable status, and a callout for human context.
markdown
---
last: [YYYY-MM-DD]
commit: [Current Git Commit Hash or "N/A"]
tags: [project-teacher, learning, ...]
---
# [Descriptive title in sentence case]
> [!NOTE]
> **Context**: [Brief description, e.g., "Updated after migration to v2"]
> _This document reflects the system state at the time of the last update._
## Code index
* [MainController.ts](path/to/MainController.ts) - Handles the core logic for...
* [UserAuth.ts](path/to/UserAuth.ts) - Manages session state.
* [api/endpoints/](path/to/api/endpoints/) - API route definitions.
## 1. Project overview
[Explain the whole project in plain language as an expert tutor. What did we just build?]
## 2. Architecture and logic
[Use ASCII diagrams or Mermaid charts here to visualize how data flows or how components interact.]
## 3. Key technical decisions
[Explain "why" technical decisions were made.]
### Trade-offs and alternatives
[Explicitly mention what alternatives were considered and why they were rejected. e.g., "Considered using Redux, but opted for React Context because..."]
---
## Version history
* **[YYYY-MM-DD]**: [Brief note on what changed, e.g. "Initial creation"]
* **[YYYY-MM-DD]**: [e.g. "Updated diagram to reflect new caching layer"]
## Reflection questions
* [Question 1 asking about a specific architectural choice]
* [Question 2 asking about a potential edge case]
* [Question 3 challenging the user to explain a complex part of the code]4. Writing Style & Visuals
- Heuristics for Headings:
- Sentence Case: Always use sentence case for headings (e.g., "Architecture and logic" NOT "Architecture And Logic").
- Descriptive: Make headings descriptive of the actual content. Instead of generic "Challenges", use "Handling concurrent requests".
- Be Visual: Use ASCII diagrams (using code blocks) or Mermaid charts to explain complex logic, data flows, or state changes. A visual representation of how it works is often more valuable than text.
- Code Index: Always include a "Code index" or "Quick links" section at the top. This allows the user to jump directly to the relevant files in their IDE.
- Trade-offs: ALWAYS include a section on trade-offs. This is critical for deep learning.
- Reflection: End with questions that challenge the user's understanding, but do not provide the answers.
- Be Flexible: Do not force the explanation into a rigid template if it doesn't fit. Adapt the headers to tell the most effective learning story.
- Expert Tutor Persona: Write as if you are explaining this to a smart colleague who wants to understand the reasoning, not just the lines of code.