How to Install and Use Reusable Skill Artifacts in ai-engineering-from-scratch
Run the scripts/install_skills.py installer to discover, filter, and copy skill Markdown files into any target directory with a generated manifest.json, then consume each artifact as a plain-text prompt or component in your own AI pipeline.
The rohitg00/ai-engineering-from-scratch curriculum distributes reusable skill artifacts across lesson outputs/ folders. These self-contained Markdown files embed prompts, agents, and other AI-engineered components that you can pull into external projects without any external dependencies. The helper script in scripts/install_skills.py automates discovery, metadata extraction, and installation so you can start using the components immediately.
How the Skill Installer Works
The installer is a pure-Python pipeline defined in scripts/install_skills.py that runs on any Python 3.10+ environment. It processes artifacts in six discrete stages.
Discovery and Metadata Parsing
discover_artifacts() recursively walks phases/**/outputs and identifies every Markdown file matching skill-…, prompt-…, or agent-…. For each match, the script constructs an Artifact dataclass and uses the lightweight YAML-subset parser in scripts/_lib.py to read front-matter fields such as name, description, version, tags, and phase.
Filtering and Planning
filter_artifacts() narrows the list based on user-supplied --type, --phase, and --tag arguments. Then build_plan() maps each artifact to a final destination according to the chosen layout—flat, by-phase, or skills—and flags any name collisions before a single file is written.
Installation and Manifest Generation
apply_plan() copies the source files to their target paths, while write_manifest() emits a comprehensive manifest.json that records the source path, target path, and metadata for every installed artifact.
Installing Reusable Skill Artifacts
You can install the entire collection or a scoped subset in one command.
Basic Installation
Clone the repository and run the installer with a target directory and layout. The skills layout is the most common choice for direct consumption because it creates one folder per skill containing a SKILL.md file.
git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch
python3 scripts/install_skills.py ~/my-skills \
--type skill \
--layout skills
This discovers all skill-*.md files, copies each to <target>/<skill-name>/SKILL.md, and writes manifest.json in ~/my-skills.
Filtering by Phase or Tag
Limit the installation to a specific curriculum phase or metadata tag without manually searching the folders.
# Only skills from phase 04 (Computer Vision)
python3 scripts/install_skills.py ~/my-skills --phase 4
# Only skills tagged "safety"
python3 scripts/install_skills.py ~/my-skills --tag safety
Previewing and Overwriting
Use --dry-run to preview every planned copy and manifest entry before any disk changes occur.
python3 scripts/install_skills.py ~/my-skills --dry-run
By default, the script aborts if a target file already exists. Pass --force to overwrite existing files safely.
python3 scripts/install_skills.py ~/my-skills --force
Using an Installed Skill Artifact
Once installed, each artifact is a plain Markdown file that follows the curriculum's skill contract. You can version-control, diff, or edit these files like any other source component before loading them into your own AI pipelines.
The Skill Contract and Front-Matter
A typical skill begins with YAML-style front-matter followed by a concrete artifact body. For example, the End-to-End Safety Gate skill opens with:
---
name: End-to-End Safety Gate
description: A reusable safety-gate component that intercepts LLM outputs before they reach the user.
version: 1.0
tags: [safety, gate, policy]
phase: 19
lesson: 87
---
The body contains the usable payload—such as a prompt template, JSON schema, or Python snippet—that you can lift directly into your application.
Loading Skills in Python
Because the files are plain text, you can read and parse them with standard library tools.
from pathlib import Path
skill_path = Path("~/my-skills/End-to-End Safety Gate/SKILL.md").expanduser()
skill_md = skill_path.read_text()
# Isolate the body after the front-matter delimiters
_, _, body = skill_md.partition("---\n---\n")
prompt = body.strip()
# Supply `prompt` to your LLM API or orchestration layer
Shell-Based Workflows
For command-line pipelines, stream a skill file directly into a tool that accepts prompts on standard input.
cat ~/my-skills/End-to-End\ Safety\ Gate/SKILL.md | my-llm-cli --prompt -
Because the artifacts are version-controllable Markdown, you can diff, edit, and track them like any other source file.
Key Project Files
The following files implement and define the artifact pipeline in rohitg00/ai-engineering-from-scratch:
scripts/install_skills.py— The main installer script that orchestratesdiscover_artifacts(),filter_artifacts(),build_plan(),apply_plan(), andwrite_manifest().scripts/_lib.py— Minimal YAML-subset front-matter parser used by the installer to extract metadata from each skill file.phases/19-capstone-projects/87-end-to-end-safety-gate/outputs/skill-end-to-end-safety-gate.md— Example skill artifact demonstrating the standard front-matter and body format.README.md— Top-level curriculum overview that also references theinstall_skills.pyutility.
Summary
- The
scripts/install_skills.pyinstaller requires only Python 3.10+ and has no external dependencies. - It discovers
skill-*.md,prompt-*.md, andagent-*.mdfiles underphases/**/outputs, parses their front-matter viascripts/_lib.py, and copies them to a target directory. - Choose from three layouts—
flat,by-phase, orskills—and optionally filter by--type,--phase, or--tag. - A
manifest.jsonis automatically generated to inventory every installed artifact. - After installation, consume each skill as a plain Markdown file in Python scripts, shell pipelines, or version-controlled project repositories.
Frequently Asked Questions
How do I install only a specific type of artifact, such as prompts or agents?
Pass the --type flag to scripts/install_skills.py with the value prompt, agent, or skill. The filter_artifacts() step will then keep only the matching artifacts before build_plan() and apply_plan() copy them into the target directory.
Can I use the installer without overwriting existing files in my target folder?
Yes. By default, apply_plan() aborts the installation when it detects a name collision, so omitting --force keeps existing files safe. To preview exactly what would be copied without writing anything to disk, run the script with --dry-run.
What Python version is required to run the skill installer?
The script is implemented in pure Python and requires Python 3.10 or newer. It relies exclusively on the Python standard library for directory walking, front-matter parsing in scripts/_lib.py, and JSON manifest generation, so no pip install or virtual environment setup is necessary.
How are the installed skill artifacts structured after installation?
That depends on the --layout option you select. The skills layout creates a dedicated subdirectory per artifact and renames the file to SKILL.md, while flat drops everything into one folder and by-phase mirrors the curriculum structure. Every run also produces a manifest.json that records the original source path and metadata for each installed file.
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 →