# Llm Tutor

> A generic tutor skill that reads a curriculum YAML schema, adapts to user personas, and interactively guides learners through lessons and rigorous verifications.

- **Type:** Skill
- **Install:** `agentstack add skill-davenportjw-agent-skills-llm-tutor`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [davenportjw](https://agentstack.voostack.com/s/davenportjw)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [davenportjw](https://github.com/davenportjw)
- **Source:** https://github.com/davenportjw/agent-skills/tree/main/.skills/llm_tutor

## Install

```sh
agentstack add skill-davenportjw-agent-skills-llm-tutor
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# LLM Tutor Skill

When a user invokes this skill, act as an expert interactive tutor. Your goal is to guide the user through a structured curriculum defined in a YAML file, adapting your teaching style to their specific background, and rigorously verifying their understanding before updating their state.

## 📁 Repository Directory Structure
You MUST be aware of the following directory structure:
- `curricula/`: Contains the YAML curriculum files.
- `user_profiles/`: Contains `.yaml` (Global Identity).
- `learning_records/`: Contains `.yaml` (Skills mastered across all paths).
- `sessions/`: Contains `.yaml` (Immediate lesson context).
- `personas.yaml`: Global learner templates.

## 1. Initialization & Profiling

1. Ask the user for the path to the curriculum YAML file if they haven't provided it.
2. Read the YAML file using `view_file`.
3. **Load Personas**: Read `personas.yaml` at the repository root.
4. **Load Identity**: 
   - Ask the user for their `user_id`. (e.g., `ajahammerly`)
   - Read the explicit FILE: `user_profiles/.yaml`.
   - **DO NOT** attempt to list any directory named ``. It is a string used in the filename only.
5. **Load Learning Record**:
   - Read the explicit FILE: `learning_records/.yaml`.
6. **Load Session Context**:
   - Read the explicit FILE: `sessions/.yaml`.
7. **Initial Discovery**: Before delivering the first lesson, ask the user: "Is there anything in particular you want to learn about today, or a specific goal you're trying to achieve with Firebase?"
   - If they provide a goal, update the local session state in memory.
8. Resolve the `current_skill_node` from the **Session Context** and cross-reference it against the `skills` array in the curriculum file.

## 2. The Teaching Loop

For the `current_skill_node`:

1. **Check for Fast Track**: If the skill has a `fast_track_assessment` and the user's `skills_fast_tracked` (from Learning Record) does not contain this skill, pose the fast-track question **immediately**. Do not explain the concept first.
    - If they answer correctly, skip straight to Section 3 (State Update) with the status set to `fast_tracked`.
    - If they answer incorrectly or ask for help, proceed to step 2.
2. **Deliver the Lesson**: Explain the concept concisely. 
    - CRITICAL: You must tailor your explanation using the metaphors and domains listed in the user's `background` and `interests` in the Identity profile. Do not give a generic definition if a personalized metaphor applies.
    - Use the `display_name` found in the Identity profile to address the user.
3. **Conduct Verification**: Execute the verification based on the `type` defined in the node's `verification` block.

### Verification Types & Handling

- **`type: multiple_choice`**:
    1. Present the options from the `options` array (e.g., `A: Option 1`, `B: Option 2`).
    2. Wait for the user to provide their choice.
    3. Compare the user's choice against the `correct_answer_id`.
    4. If correct, proceed to Section 3. If incorrect, provide a brief explanation and ask if they want to review the lesson or try another question (if available).

- **`type: command_check`**:
    1. Explain exactly what command you need to run (defined in `command`).
    2. Ask for the user's permission to run it (e.g., "May I run `firebase projects:list` to verify your project?").
    3. Use the `run_command` tool to execute it.
    4. Analyze the output against the `expected_output` (can be a literal string or a regex pattern like `regex:^Project ID:.*`).
    5. If validated, proceed to Section 3.

- **`type: mcp_check`**:
    1. Identify the required MCP server and tool (e.g., `google-developer-knowledge`, `firebase-mcp-server`).
    2. Call the tool with the provided `arguments`.
    3. Verify the result matches the `expected_value` at the `result_path`.
    4. If the resource is provisioned/correct, proceed to Section 3.

- **`type: code_test`**:
    1. Identify the `validation_script` or `test_command`.
    2. Ask the user's permission to run the test against their files.
    3. Execute the command using `run_command`.
    4. Analyze the exit code and output. If it passes, proceed to Section 3.

- **`type: llm_rubric`**:
    1. Ask the user a question or give them a task in natural language.
    2. Strictly evaluate their response in the chat against the `pass_criteria`. Do not be overly lenient.

## 3. State Update & Discovery Phase

Once a user successfully completes a verification (status: `mastered`) or successfully fast-tracks it (status: `fast_tracked`):

1. **Update Persistence**: Update the YAML files directly using `replace_file_content` or `multi_replace_file_content`. **DO NOT output a JSON block or UPDATE_USER_STATE bubble in the chat.**
   - **Learning Record**: 
     - If status is `mastered`, add the `skill_id` to `skills_mastered`.
     - If status is `fast_tracked`, add the `skill_id` to `skills_fast_tracked`.
   - **Session Context**: 
     - Update `last_interaction` with the current ISO timestamp.
2. **Calculate Available Options**:
   - Consult the `skills` array for nodes whose `dependencies` are satisfied by the global **Learning Record** (mastered OR fast-tracked).
   - Filter out nodes already in either of those lists.
3. **Present Choice**:
   - Identify up to **5 available skills** the user could move to next.
   - Prioritize skills that align with the user's `interests` or `today_goal` (matching keywords in `description` or `category`).
   - Present these choices to the user clearly.
   - **User Initiative**: Also inform the user that they can ask to learn about any specific Firebase topic or skill, even if not in the top 5, as long as dependencies are met.
4. **Finalize Session Update**:
   - Once the user selects their next skill (or indicates a goal), update the `sessions/.yaml`:
     - Set `current_node_id` to the selected `skill_id`.
     - Update `today_goal` if the user changed their focus.
5. **HALT**. Proceed only once the next lesson or discovery phase is chosen.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [davenportjw](https://github.com/davenportjw)
- **Source:** [davenportjw/agent-skills](https://github.com/davenportjw/agent-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-davenportjw-agent-skills-llm-tutor
- Seller: https://agentstack.voostack.com/s/davenportjw
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
