Files

72 lines
3.1 KiB
Plaintext

# htsy-skill instructions for AI agents
Purpose: install the portable agent skill located in this repository's `htsy/` directory.
Important rules:
- Install only the `htsy/` directory as the skill.
- Do not install the repository root as a skill.
- Do not move or rewrite `htsy/SKILL.md` or `htsy/references/*`.
- This installs the agent skill only. It does not log in to htsy-cli and does not call business APIs.
- Do not assume the current agent is Codex. Choose the destination for the active agent.
- If the target already has an `htsy` skill, updating it by replacing that target directory is expected.
Known targets:
- Claude Code user skill: `~/.claude/skills/htsy`
- Claude Code project skill: `./.claude/skills/htsy`
- Codex user skill: `${CODEX_HOME:-$HOME/.codex}/skills/htsy`
- Other agents that support `SKILL.md` directory skills: use that agent's documented skills directory and install as `<skills-dir>/htsy`.
Choose the install target:
- If the user is using Claude Code and did not request project-local install, use `--agent claude`.
- If the user wants the skill checked into the current project for Claude Code, use `--agent claude-project`.
- If the user is using Codex, use `--agent codex`.
- If the agent type is different or unclear but its skills directory is known, use `--dest /absolute/path/to/skills/htsy`.
- If the agent type and skills directory are both unknown, ask the user for the target skills directory.
If this repository is already present locally and `htsy/SKILL.md` exists, run the installer from the repository root.
macOS/Linux examples:
```bash
bash ./scripts/install-htsy-skill.sh --agent claude
bash ./scripts/install-htsy-skill.sh --agent claude-project
bash ./scripts/install-htsy-skill.sh --agent codex
bash ./scripts/install-htsy-skill.sh --dest /path/to/agent/skills/htsy
```
Windows PowerShell examples:
```powershell
PowerShell -ExecutionPolicy Bypass -File .\scripts\install-htsy-skill.ps1 -Agent claude
PowerShell -ExecutionPolicy Bypass -File .\scripts\install-htsy-skill.ps1 -Agent claude-project
PowerShell -ExecutionPolicy Bypass -File .\scripts\install-htsy-skill.ps1 -Agent codex
PowerShell -ExecutionPolicy Bypass -File .\scripts\install-htsy-skill.ps1 -Dest C:\path\to\agent\skills\htsy
```
If this repository is not present locally, clone it first:
macOS/Linux:
```bash
git clone --depth 1 https://git.ikuban.com/server/htsy-skill.git
cd htsy-skill
bash ./scripts/install-htsy-skill.sh --agent claude
```
Windows PowerShell:
```powershell
git clone --depth 1 https://git.ikuban.com/server/htsy-skill.git
Set-Location htsy-skill
PowerShell -ExecutionPolicy Bypass -File .\scripts\install-htsy-skill.ps1 -Agent claude
```
Verification after install:
- Confirm the installed file exists at the target path: `skills/htsy/SKILL.md`.
- Tell the user to reload or start a new agent session if the current session does not list the skill yet.
When installation fails:
- If `git clone` fails, ask the user for an accessible checkout or archive.
- If `CODEX_HOME` is set and installing for Codex, respect it.
- If the operating system is unknown, ask before choosing commands.