How Claude and Cursor Agent Skills Like `/find-your-level` and `/check-understanding` Work

The Claude and Cursor agents in the AI Engineering from Scratch curriculum parse slash-commands by loading markdown-based skill definitions from local directories, executing interactive quiz logic via the AskUserQuestion tool, and mapping scores to personalized curriculum paths.

The open-source repository rohitg00/ai-engineering-from-scratch implements a lightweight, portable skill system that allows AI agents to conduct placement assessments and knowledge checks without external APIs. These skills are self-contained markdown files with structured front-matter that define trigger phrases, procedural steps, and scoring logic.

The Markdown Skill Architecture

Each skill is a markdown file with YAML front-matter stored in the .claude/skills/ and .cursor/skills/ directories. The front-matter block (delimited by ---) declares the skill's metadata, including its name, version, description, and trigger phrases, while the body contains the procedural logic and content.

When the agent runtime starts, it scans the skill directories and builds a manifest that maps slash-commands like /find-your-level to their corresponding file paths. This registration happens through the scripts/install_skills.py script, which copies the skill folders to the user's home directory locations (~/.claude/skills/ and ~/.cursor/skills/) and updates the agent's internal command registry.

How /find-your-level Works

The Find-Your-Level skill, defined in .claude/skills/find-your-level/SKILL.md, acts as a placement quiz that determines which phase of the curriculum a learner should start with.

Quiz Structure and Scoring

The skill presents 10 multiple-choice questions covering five knowledge areas—Math & Statistics, Programming, Machine Learning, Deep Learning, and MLOps—with two questions per domain. Each correct answer awards 1 point, producing a raw score between 0 and 10.

The skill file contains a hardcoded Score-to-Entry-Point table (lines 73-80) that converts the total score into a recommended starting phase:

  • Score 0-3: Start at Phase 0 (Setup & Tooling)
  • Score 4-6: Start at Phase 1 (Math Foundations)
  • Score 7-8: Start at Phase 2 (ML Fundamentals)
  • Score 9-10: Start at Phase 3 (Deep Learning)

Personalized Path Generation

After calculating the score, the agent generates a markdown table (lines 102-138 in SKILL.md) that marks every curriculum phase as Skip, Review, or Do. The table pulls estimated hour values from ROADMAP.md and sums them to provide a total time commitment. The agent outputs this table along with a brief narrative recommendation.


# Conceptual flow when /find-your-level is triggered

def execute_find_your_level():
    skill = load_skill("~/.claude/skills/find-your-level/SKILL.md")
    score = 0
    for question in skill.questions:
        answer = AskUserQuestion(question.text, options=question.options)
        if answer == question.correct:
            score += 1
    entry_phase = map_score_to_phase(score)  # Lookup table logic

    return generate_learning_path(entry_phase)

How /check-understanding Works

The Check-Understanding skill, located at .claude/skills/check-understanding/SKILL.md, validates mastery of a specific curriculum phase rather than assessing broad placement.

Phase-Specific Question Generation

Unlike the static question bank in /find-your-level, this skill dynamically generates 8 multiple-choice questions (4 conceptual, 4 practical) drawn directly from the lesson documents of the requested phase. The skill accepts either a numeric phase identifier (e.g., "2") or a textual name (e.g., "ML Fundamentals") and loads the corresponding content from the repository's phase directories.

Interactive Assessment Loop

The agent uses the AskUserQuestion tool to present each question sequentially, tracks the user's selections in memory, and computes the final accuracy percentage. Based on the score, the skill recommends specific next steps: proceeding to the next phase, reviewing particular subtopics, or repeating hands-on exercises.


# Example invocation after installation

$ claude-code /check-understanding "Phase 1"
>>> Loading Phase 1: Math Foundations...
>>> Question 1/8 (Conceptual): What is the determinant of a 2x2 matrix [[a, b], [c, d]]?
>>> A) ad - bc  B) ad + bc  C) ac - bd  D) ab + cd
>>> ...
>>> Score: 6/8 (75%). Recommendation: Review gradient descent before proceeding.

Skill Registration and Installation

The scripts/install_skills.py file handles the deployment of these capabilities to the agent runtime. The script performs three critical operations:

  1. Copies skill directories from the repository's .claude/skills/ and .cursor/skills/ paths to the user's home configuration folders (~/.claude/skills/ and ~/.cursor/skills/).
  2. Updates the manifest that maps trigger strings (e.g., "/find-your-level", "where should I start?") to the absolute paths of the skill markdown files.
  3. Validates the schema to ensure the front-matter contains required fields like name, version, and triggers.

This installation step is required because the agent runtime only reads skills from the user's home directory, not from arbitrary repository locations.

Cross-Platform Compatibility

Both Claude Code and Cursor share the identical markdown-based skill schema, making the behaviors interchangeable. The only difference is the filesystem location:

  • Claude Code: Reads from ~/.claude/skills/
  • Cursor: Reads from ~/.cursor/skills/

When the user types /find-your-level in either environment, the agent executes the same quiz logic, references the same scoring tables, and produces the same output format because both agents parse the same SKILL.md structure.

Summary

  • Skill definitions are markdown files with YAML front-matter stored in .claude/skills/ and .cursor/skills/.
  • /find-your-level runs a static 10-question placement quiz and maps scores to curriculum phases using a lookup table in SKILL.md.
  • /check-understanding generates 8 dynamic questions from phase-specific lesson content to validate mastery.
  • scripts/install_skills.py deploys skills to ~/.claude/skills/ and ~/.cursor/skills/ and registers slash-command triggers.
  • Both agents use the AskUserQuestion tool to handle interactive input and maintain state during quiz execution.
  • The system is fully local and requires no external services beyond the agent runtime.

Frequently Asked Questions

What file format defines the agent skills?

The skills are defined in markdown files with YAML front-matter named SKILL.md. The front-matter contains metadata like name, version, and triggers, while the body contains the procedural steps and quiz content.

How does the agent know to run a skill when I type /find-your-level?

After running scripts/install_skills.py, the agent creates a manifest that maps the trigger phrase /find-your-level to the file path ~/.claude/skills/find-your-level/SKILL.md. When the agent parses your input and matches the slash-command, it loads and executes that specific skill file.

Can I use these skills in Cursor if they are defined in the .claude directory?

Yes. The install_skills.py script copies the skill files to both ~/.claude/skills/ and ~/.cursor/skills/ directories. Because both agents use the same markdown schema, the skills work identically across Claude Code and Cursor.

Where does /check-understanding get its questions from?

The skill generates questions dynamically by parsing the lesson documents located in the specific phase directory you specify. It extracts key concepts and code examples to create four conceptual and four practical multiple-choice questions relevant to that phase's content.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →