How Claude and Cursor Skill Integrations Work in AI Engineering from Scratch
AI Engineering from Scratch implements a universal skill system using SKILL.md artifacts and the Model-Context Protocol (MCP) that enables both Claude Code and Cursor to automatically discover, register, and execute reusable capabilities as slash commands.
The open-source curriculum rohitg00/ai-engineering-from-scratch provides a model-agnostic framework for extending AI assistant capabilities through reusable skills. Its Claude and Cursor skill integrations rely on three tightly-coupled architectural components that ensure any skill authored once works seamlessly across multiple agents without platform-specific modifications.
The Three Core Components
SKILL.md Files
SKILL.md files serve as plain-text capability definitions located at phases/<phase>/<lesson>/outputs/skill-<slug>.md. Each file contains YAML front-matter specifying name, description, phase, and lesson, followed by a Markdown body containing the implementation logic. Both Claude Code and Cursor scan the repository for these files, parse the front-matter, and register slash-commands (such as /check-understanding) that appear directly in the chat UI.
Model-Context Protocol (MCP)
The MCP (Model-Context Protocol) is a universal JSON-RPC-style wire format for exposing tools, resources, and prompts to LLM agents. Claude Desktop and Cursor embed MCP clients that discover the skill's tool schema, call the underlying implementation, and stream results back to the model. This architecture guarantees one implementation, many agents, allowing the same skill to work with Codex, OpenClaw, Hermes, or any future MCP-compatible client.
Installation Script
The scripts/install_skills.py utility orchestrates skill registration by walking the repository structure, identifying every skill-*.md file via glob patterns, and registering them with the local MCP client. The script copies skills into agent-specific directories (.claude/skills/… and cursor/skills/…) so each agent can read from its standard search path. Running python scripts/install_skills.py or the npm wrapper npx skills add makes capabilities instantly available across both Claude and Cursor without manual file copying.
Architectural Flow: From Author to Execution
The integration follows a five-step pipeline that maintains a single source of truth for skill definitions:
- Authoring: Lesson authors create
phases/<phase>/<lesson>/outputs/skill-<slug>.mdwith YAML metadata and implementation code. - Discovery: The installation script executes
glob "**/skill-*.md"to locate all skill definitions. - Registration: The script copies files to
.claude/skills/andcursor/skills/, then calls the MCP client'sregisterSkillendpoint to store metadata in the server's catalog. - UI Exposure: Claude Desktop and Cursor read the MCP catalog on startup and automatically surface slash-commands for each registered skill.
- Invocation: When users execute
/find-your-levelor similar commands, the agent sends an MCP request (POST /skill/<name>) with model-generated arguments. The MCP server executes the underlying Python script and returns results to the chat stream.
Implementation Details by Source File
According to AGENTS.md, the system explicitly supports Claude Code, Cursor, Codex, OpenClaw, and Hermes as first-class MCP consumers. The site/data.js file references "Cursor's Dynamic Context Loading" as evidence of Cursor's MCP client implementation.
The concrete orchestration logic resides in scripts/install_skills.py, which handles the directory traversal and MCP client registration. The protocol specification lives in phases/11-llm-engineering/14-model-context-protocol/docs/en.md, defining the JSON-RPC schema that agents use to communicate with the skill server. The README.md (lines 129-151) documents the user-facing installation command npx skills add for cross-platform skill deployment.
Practical Code Examples
Minimal SKILL.md Structure
---
name: add-two-numbers
description: Simple arithmetic skill – adds two integers.
phase: 14
lesson: 10
---
# Usage
Provide two numbers and the skill returns their sum.
```python
import sys
a, b = map(int, sys.argv[1:3])
print(a + b)
When installed, both Claude Code and Cursor expose `/add-two-numbers` as a slash-command. The MCP client runs the Python snippet with arguments supplied by the model and streams the computed result back to the conversation.
### Installing All Skills
```bash
# From the repository root
python scripts/install_skills.py
# Or using the npm wrapper
npx skills add
After execution, skills appear in both Claude Desktop and Cursor without restarting the applications or modifying configuration files.
Calling a Skill from Claude
User: /add-two-numbers 7 13
Claude: 20
The model emits the slash-command, the Claude Code client translates it to an MCP request, executes the Python script, and returns the answer.
Summary
- SKILL.md files in
phases/<phase>/<lesson>/outputs/define reusable capabilities using YAML front-matter and Markdown bodies. - The Model-Context Protocol provides a JSON-RPC wire format that enables Claude, Cursor, and other agents to consume skills through a unified interface.
scripts/install_skills.pyautomates discovery, copying skills to.claude/skills/andcursor/skills/directories while registering them with the MCP server.- Skills appear as slash-commands (e.g.,
/check-understanding) immediately after runningnpx skills add. - The architecture is model-agnostic, ensuring skills work across Claude Code, Cursor, Codex, and future MCP-compatible clients without modification.
Frequently Asked Questions
What file format do skills use in AI Engineering from Scratch?
Skills use a SKILL.md format consisting of YAML front-matter containing metadata fields (name, description, phase, lesson) followed by a Markdown implementation body. These files reside in phases/<phase>/<lesson>/outputs/skill-<slug>.md and contain either Python scripts or prompt templates that the MCP server executes.
How do Claude and Cursor discover new skills?
Both agents discover skills through the installation script (scripts/install_skills.py), which copies SKILL.md files into agent-specific directories (.claude/skills/ and cursor/skills/) and registers them with the MCP server catalog. The agents read this catalog on startup and automatically expose each skill as a slash-command in their respective UIs.
Can skills work with AI assistants other than Claude and Cursor?
Yes. The Model-Context Protocol is designed to be agent-agnostic. The AGENTS.md file lists support for Claude Code, Cursor, Codex, OpenClaw, and Hermes. Any AI assistant that implements an MCP client can consume the same skill files without requiring format changes or separate implementations.
Where is the MCP protocol specification defined in the repository?
The JSON-RPC schema and protocol specification are documented in phases/11-llm-engineering/14-model-context-protocol/docs/en.md. This file defines how agents communicate with the skill server, including request formats, tool discovery mechanisms, and result streaming protocols that both Claude and Cursor implement.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →