# How the Skill Installation Script Operates and Which Hosts It Configures

> Learn how the skill installation script operates, validating packs and configuring AI hosts like Claude Code and Codex. Discover the three-phase idempotent process.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: how-to-guide
- Published: 2026-08-29

---

**The skill installation script ([`bin/install.sh`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/bin/install.sh)) validates the Agent Workbench pack, copies skill artifacts including [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), and configures repositories to support Claude Code, Codex, and other AI hosts through an idempotent three-phase process.**

The `rohitg00/ai-engineering-from-scratch` repository ships with a portable **skill installation script** designed to drop the Agent Workbench curriculum into any target repository. This bash utility automates the deployment of curriculum packs while establishing host-specific invocation contracts for multiple AI coding environments.

## How the Skill Installation Script Operates

Located at [`bin/install.sh`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/bin/install.sh) in the Agent Workbench pack, the script executes three distinct phases to safely deploy skill assets.

### Phase 1: Validation

The script first declares a list of required pack items: [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), `VERSION`, `docs/`, `schemas/`, and `scripts/`. It verifies each item exists under the pack root (`$PACK_ROOT`) before proceeding.

Critically, the script checks whether [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) already exists in the target repository. If detected, the installation aborts unless the `--force` flag is supplied. This protects existing host contracts from accidental overwrites while guaranteeing a complete pack structure.

### Phase 2: Installation

During the core installation phase, the script performs the following atomic operations:

- Copies the canonical [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) into the target repository: `cp "$PACK_ROOT/AGENTS.md" "$TARGET/AGENTS.md"`
- Recursively copies the `docs/`, `schemas/`, and `scripts/` directories using `mkdir -p` and `cp -r`
- Writes the pack version into a hidden marker file (`.workbench-version`)

This phase installs the full suite of skill assets—documentation, schema definitions, and helper scripts—in a single, reproducible step.

### Phase 3: Feedback

Upon completion, the script emits a concise success message displaying the installed version. It suggests next manual steps including configuring [`task_board.json`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/task_board.json), running acceptance commands, and executing [`scripts/init_agent.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/init_agent.py) to bootstrap the agent environment.

## Hosts Configured by the Script

The critical file installed by the script is **[`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md)**, which defines the **host-invocation contract** for all portable skills. This markdown file specifies how each skill can be invoked across different execution hosts.

### Claude Code

For **Claude Code** environments, the script configures slash-command style invocations. The host contract enables syntax like:

```

Use /learn-agent-skills to start the Agent Skills path.

```

This routing allows Claude Code to recognize and execute skills using native slash command patterns.

### Codex

For **Codex** hosts, the installation configures natural-language style invocations:

```

Use learn-agent-skills to start or resume the Agent Skills path.

```

The script ensures the target repository recognizes this invocation pattern without requiring slash prefixes.

### Other Compatible Hosts

For generic AI coding assistants, the script configures standard natural language routing:

```

Use learn-agent-skills to start or resume the Agent Skills path.

```

These host definitions enable any downstream lesson to rely on a unified, host-agnostic skill name (`learn-agent-skills`) while concrete invocation syntax gets automatically resolved by the host-specific contract baked into [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md).

## Running the Skill Installation Script

Execute the installer from the root of the skill pack:

```bash

# Navigate to the pack directory

cd phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack

# Standard installation (aborts if AGENTS.md exists)

./bin/install.sh

# Force overwrite existing installation

./bin/install.sh --force

```

### Verifying Host Contracts

After installation, confirm the host configurations are properly deployed:

```bash

# Inspect the installed AGENTS.md for host definitions

cat AGENTS.md | grep -A2 "## Invocation belongs to the host"

```

This output displays entries for Claude Code, Codex, and generic natural-language hosts, confirming multi-environment compatibility.

## Key Files in the Installation Workflow

The skill installation script interacts with several critical components:

- **[`bin/install.sh`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/bin/install.sh)** – The idempotent installer script that validates packs, copies assets, and writes version markers
- **[`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md)** – The host-invocation contract defining how portable skills are called on Claude Code, Codex, and other hosts
- **`VERSION`** – The pack version file displayed during installation feedback
- **`.workbench-version`** – Hidden version marker written to the target repository
- **[`scripts/init_agent.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/init_agent.py)** – Helper script mentioned in post-installation hints for bootstrapping the agent environment

## Summary

- The **skill installation script** operates through three phases: validation of required files, atomic installation of assets, and user feedback with next steps.
- The script is **idempotent** by default, refusing to overwrite existing [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) files unless the `--force` flag is provided.
- It configures three host types: **Claude Code** (slash commands), **Codex** (natural language), and **other compatible hosts** (generic natural language).
- Core artifacts installed include [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), documentation directories, schema definitions, and the `.workbench-version` marker.

## Frequently Asked Questions

### What makes the skill installation script idempotent?

The script checks for the presence of [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) in the target directory before executing any copy operations. If the file exists, the installation aborts immediately unless you explicitly pass the `--force` flag. This prevents accidental overwrites and ensures repeated runs are safe—subsequent executions simply refuse to modify existing installations without explicit user consent.

### Which AI hosts does the installation script configure?

The script configures **Claude Code**, **Codex**, and **other compatible AI hosts** by deploying the [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) host-invocation contract. Claude Code receives slash-command routing (`/learn-agent-skills`), while Codex and generic hosts use natural-language invocation patterns (`learn-agent-skills`). This multi-host configuration allows the same skill pack to operate across different AI coding assistants without manual reconfiguration.

### How do I force an overwrite of an existing skill installation?

Append the `--force` flag when executing the script:

```bash
./bin/install.sh --force

```

This bypasses the existing file detection and replaces [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), the `docs/`, `schemas/`, and `scripts/` directories, and updates the `.workbench-version` marker. Use this flag when upgrading to a new version of the Agent Workbench pack or when recovering from a corrupted installation.

### What files are required for the installation script to proceed?

The script validates the presence of five required pack items before installation: [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), `VERSION`, `docs/`, `schemas/`, and `scripts/`. If any of these components are missing from the pack root (`$PACK_ROOT`), the script aborts during the validation phase. This ensures only complete, valid skill packs get deployed to target repositories.