# How Reusable Artifact Outputs (Prompts, Skills, Agents) Work in AI Engineering from Scratch

> Learn how reusable artifact outputs like prompts skills and agents in AI Engineering from Scratch enable immediate deployment of battle-tested tools directly from lesson outputs.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: internals
- Published: 2026-06-07

---

**AI Engineering from Scratch generates reusable artifact outputs—prompts, skills, agents, and MCP servers—in every lesson's `outputs/` directory so learners can paste, install, or deploy battle-tested tools immediately.**

The rohitg00/ai-engineering-from-scratch curriculum teaches AI engineering through a build-it, use-it, ship-it pipeline where every module produces tangible building blocks. By the end of the course, learners accumulate a personal catalog of more than 500 prompts, skills, agents, and MCP servers that bridge the gap between classroom theory and production deployment.

## Where Artifact Outputs Are Stored

Every lesson follows a rigid directory contract. The path `phases/<phase-slug>/<lesson-slug>/` contains an `outputs/` sub-directory that holds the artifacts produced by that lesson. This convention is defined in the repository source code so that any tool, script, or documentation generator can scan the curriculum and surface usable components instantly.

The curriculum produces four distinct reusable artifact output types:

- **Prompt** — A ready-to-paste markdown file stored at `outputs/<prompt-name>.md`. Copy its contents into any LLM chat assistant to receive expert-level help on a narrow task.
- **Skill** — A markdown-formatted [`SKILL.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/SKILL.md) stored at `outputs/<skill-name>.md`. Drop it into an agent's skill library for Claude, Cursor, Codex, or similar tools, and the agent loads the definition to execute the described tool.
- **Agent** — A self-contained autonomous agent loop implementation stored at `outputs/<agent-name>.md`. Deploy it as an autonomous worker; the underlying loop is built from scratch in Phase 14 and can be run directly.
- **MCP Server** — A Model-Context-Protocol server specification stored at `outputs/<mcp-name>.md`. Plug it into any MCP-compatible client; the server code is produced in Phase 13.

## The Build-It / Use-It / Ship-It Pipeline

Each lesson generates artifacts through a three-stage lifecycle that is implemented throughout the source tree:

1. **Build-it stage** — The lesson's `code/` folder contains a minimal, from-scratch implementation of the concept. For example, a raw ReAct-style loop lives here as plain Python before any framework is introduced.
2. **Use-it stage** — The same logic is re-implemented with a production library such as PyTorch or LangChain to demonstrate the library's inner workings.
3. **Ship-it stage** — The finished artifact is copied into `outputs/` with concise front-matter header metadata that records its name, description, phase, and lesson.

The Phase 14, Lesson 01 *Agent Loop* module illustrates this pipeline end-to-end. The repository contains [`code/agent_loop.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/code/agent_loop.py) for the raw Python implementation and [`outputs/skill-agent-loop.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/skill-agent-loop.md) for the shipped skill definition. That output file opens with standard front matter:

```yaml
---
name: agent-loop
description: ReAct-style loop for any tool list
phase: 14
lesson: 01
---

```

This metadata allows automated indexers and the site's build generator to catalog the artifact without parsing prose.

## Installing Artifacts with the Provided Scripts

A helper utility, [`scripts/install_skills.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/install_skills.py), automates distribution of the markdown skills. The script traverses the `outputs/` directory tree, copies every `*.md` skill file into a local skill library, and registers prompts in a convenient location. After running the script, you can invoke any skill from the command line or from within an agent without manual setup.

The repository also maintains an [`outputs/index.json`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/index.json) file that serves as a machine-readable catalog of all artifacts. This index is consumed by [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js) when generating the public documentation website, ensuring that the deployed docs stay synchronized with the actual lesson outputs.

## Curriculum Architecture and Key Files

As shown in the README's Mermaid diagram, the curriculum stacks **Math → Core → Tools → Agents** vertically, with an `outputs` layer forming the roof. Each reusable artifact output therefore sits at the top of its lesson, ready to be reused across later phases.

Key supporting files include:

- [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) — Overview of the curriculum and artifact philosophy.
- [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) — Contribution rules for new lessons, including artifact naming conventions.
- `phases/*/*/outputs/` — The canonical storage path for every generated artifact.
- [`outputs/index.json`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/index.json) — The aggregation index used by the website generator.
- [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js) — The build script that publishes artifact metadata to the public docs.

## Summary

- AI Engineering from Scratch stores every lesson's reusable artifact outputs in `phases/<phase-slug>/<lesson-slug>/outputs/`.
- Four artifact types are produced: **Prompts**, **Skills**, **Agents**, and **MCP Servers**.
- The **build-it / use-it / ship-it** pipeline moves code from `code/` experiments to finalized `outputs/` files with YAML front matter.
- The [`scripts/install_skills.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/install_skills.py) utility automates copying markdown skills into your local agent library.
- [`outputs/index.json`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/index.json) and [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js) power the automated documentation site that keeps the artifact catalog publicly accessible.

## Frequently Asked Questions

### What are the four reusable artifacts in AI Engineering from Scratch?

The four reusable artifact outputs are **Prompts** (ready-to-paste markdown for LLM chats), **Skills** (markdown definitions that agents like Claude or Cursor can load and execute), **Agents** (self-contained autonomous worker loops), and **MCP Servers** (Model-Context-Protocol servers built in Phase 13 that let any compatible client send contextual prompts and retrieve responses).

### How do I install the skills from the repository into my local setup?

Run the [`scripts/install_skills.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/install_skills.py) helper script from the repository root. It walks all `outputs/` directories, copies every `*.md` skill file into your local skill library, and registers prompts so you can invoke them from the command line or within compatible agents immediately.

### Where is the raw code kept before it becomes a reusable artifact?

The raw implementation lives in each lesson's `code/` folder. For example, Phase 14, Lesson 01 stores the raw ReAct loop in [`code/agent_loop.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/code/agent_loop.py). The lesson then re-implements the logic with production libraries before finally copying the finished artifact into [`outputs/skill-agent-loop.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/skill-agent-loop.md).

### What metadata format do the shipped artifacts use?

Each artifact in `outputs/` includes YAML front matter that declares `name`, `description`, `phase`, and `lesson`. This header allows [`outputs/index.json`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/outputs/index.json) and [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js) to aggregate and publish the artifact catalog without parsing the full markdown body.