---
name: kitty-install-codex
description: |
  Install generated Cartographing Kittens agents, skills, and prompt commands into a selected Codex configuration path.
argument-hint: <codex-path> [--delete-old] [--layout auto|home|jetbrains]
disable-model-invocation: true
allowed-tools:
- Bash
- Read
metadata:
  short-description: Copy generated Kitty assets into a Codex home or JetBrains Codex cache.
---

Install the generated Codex-compatible Kitty assets into a user-selected Codex path.

## Workflow

1. Parse `$ARGUMENTS` as the target path plus optional installer flags.
2. If no target path is provided, ask the user for the Codex path before running commands.
3. Regenerate local artifacts first:

```bash
uv run python scripts/generate_agents.py
uv run python scripts/generate_skills.py
uv run python scripts/generate_commands.py
```

4. Run the installer:

```bash
uv run python scripts/install_codex_assets.py <codex-path> [--delete-old] [--layout auto|home|jetbrains]
```

## Layouts

- `home`: installs to `<codex-path>/agents`, `<codex-path>/skills`, and `<codex-path>/prompts`.
- `jetbrains`: installs agents to `<codex-path>/.codex/agents`, with skills and prompts under
  `<codex-path>/skills` and `<codex-path>/prompts`.
- `auto`: uses `jetbrains` when `<codex-path>/.codex` exists; otherwise uses `home`.

## Delete Old

Passing `--delete-old` deletes previously installed Kitty-owned agents, skills, and prompt
commands before copying. It must not delete unrelated Codex assets.

Report the destination directories and copied counts from the installer output.
