How to Install ai-berkshire Skills on Windows Using .bat Scripts

You can install ai-berkshire skills on Windows by running one of three batch scripts—install-codex-skills.bat, install-codex-prompts.bat, or install-claude-commands.bat—which generate skill artifacts from source Markdown and deploy them to the appropriate AI assistant directories.

The ai-berkshire repository maintains a curated collection of AI assistant skills defined in canonical Markdown files under skills/. To install ai-berkshire skills on Windows efficiently, the project ships native batch scripts in the scripts/ directory that handle dependency resolution, artifact generation, and deployment automatically without requiring manual file copying.

The Three Installation Scripts

The repository provides three specialized batch files located in scripts/, each targeting a specific AI assistant integration. All scripts share a common pattern for repository root detection, environment variable resolution, and Python interpreter selection.

Install Codex Skills

The install-codex-skills.bat script (lines 1-35) deploys generated Codex skill packages to the local Codex installation. It performs the following operations:

  1. Root Detection: Uses for %%I in ("%~dp0..") do set "ROOT=%%~fI" to determine the repository root regardless of where the script is executed from.
  2. Destination Resolution: Checks for the CODEX_HOME environment variable, falling back to %USERPROFILE%\.codex\skills if undefined.
  3. Python Launcher Detection: Tests for py -3 via where py; if unavailable, defaults to python.
  4. Artifact Generation: Executes scripts/sync-codex-skills.py to regenerate the codex-skills/ directory from the canonical skills/*.md sources.
  5. Recursive Copy: Uses xcopy "%%~fD" "%DEST%\%%~nxD\" /E /I /Y to copy each skill folder recursively, preserving subdirectories and overwriting existing files.
cd path\to\ai-berkshire
.\scripts\install-codex-skills.bat

After completion, restart Codex to load the new skills from %USERPROFILE%\.codex\skills.

Install Codex Prompts

The install-codex-prompts.bat script (lines 1-30) handles slash-command prompt installation using logic similar to the skills installer, but targets the prompts directory instead. It runs scripts/sync-codex-prompts.py to generate the codex-prompts/ artifacts before copying them.

.\scripts\install-codex-prompts.bat

This copies all Markdown prompt files to %USERPROFILE%\.codex\prompts (or %CODEX_HOME%\prompts), replacing existing files with /Y confirmation.

Install Claude Code Commands

The install-claude-commands.bat script (lines 1-19) provides a simpler deployment mechanism for Claude Code. It copies the canonical skills/*.md files directly to the Claude commands directory without requiring a Python synchronization step.

.\scripts\install-claude-commands.bat

The script respects the CLAUDE_COMMANDS_DIR environment variable, defaulting to %USERPROFILE%\.claude\commands if undefined.

Understanding the Installation Process

Each batch file implements a consistent four-stage pipeline to ensure reliable deployment across different Windows environments.

Root Detection

All scripts calculate the repository root using batch parameter expansion:

for %%I in ("%~dp0..") do set "ROOT=%%~fI"

This ensures the scripts function correctly regardless of the current working directory, as %~dp0 resolves to the script's directory, and .. moves up one level to the repository root.

Destination Resolution

The scripts respect user-defined environment variables while providing sensible defaults:

  • Codex components: Check CODEX_HOME before defaulting to %USERPROFILE%\.codex\
  • Claude components: Check CLAUDE_COMMANDS_DIR before defaulting to %USERPROFILE%\.claude\commands

This allows system administrators to deploy skills to non-standard locations or shared network drives.

Python Interpreter Selection

To accommodate Windows systems with multiple Python versions, the scripts implement a priority-based selector:

where py >nul 2>&1
if %ERRORLEVEL% EQU 0 (
    set PY=py -3
) else (
    set PY=python
)

This prefers the py launcher when available (ensuring Python 3 is used) and falls back to the generic python command otherwise.

Synchronization and Copy Operations

The Codex installers rely on Python synchronization scripts to generate deployable artifacts from the source Markdown:

These scripts run before file operations to ensure the copied artifacts reflect the latest source definitions.

Summary

  • Run install-codex-skills.bat to deploy Codex skill packages to %USERPROFILE%\.codex\skills (or %CODEX_HOME%\skills).
  • Run install-codex-prompts.bat to deploy slash-command prompts to the Codex prompts directory.
  • Run install-claude-commands.bat to deploy Claude Code commands to %USERPROFILE%\.claude\commands (or %CLAUDE_COMMANDS_DIR%).
  • All scripts automatically detect the repository root, select the appropriate Python interpreter, and regenerate artifacts from source before copying.
  • Restart your AI assistant after installation to load the newly deployed skills.

Frequently Asked Questions

Do I need Python installed to run these batch scripts?

Yes, the install-codex-skills.bat and install-codex-prompts.bat scripts require Python because they invoke sync-codex-skills.py and sync-codex-prompts.py to generate the deployment artifacts from the canonical Markdown sources. However, install-claude-commands.bat does not require Python as it copies the Markdown files directly without preprocessing.

Can I install the skills to a custom directory?

Yes. Set the CODEX_HOME environment variable before running the Codex installation scripts, or set CLAUDE_COMMANDS_DIR before running the Claude installation script. The batch files check for these variables before defaulting to the standard locations in %USERPROFILE%.

What is the difference between Codex skills and Codex prompts?

Codex skills are complete skill packages (folders containing structured definitions) that provide complex, multi-step capabilities to the Codex agent. Codex prompts are single Markdown files containing slash-command definitions that trigger specific behaviors. The skills installer uses xcopy for recursive directory copying, while the prompts installer uses copy for individual files.

Why must I restart the AI assistant after running the scripts?

The batch files copy files to the assistant's configuration directories, but the assistants (Codex or Claude) typically cache their skill and command registries in memory during the session. A restart forces the assistant to re-scan the directories and load the new capabilities. The scripts print a reminder to restart upon successful completion.

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 →