# Azhou Setup

> Plan and explicitly apply Azhou AI Hub skill installation or receipt-owned repair, migration, and uninstall. Use for checkout-assisted setup and managed lifecycle operations with an exact target root.

- Skill: `tefuirnever/azhou-setup` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tefuirnever/azhou-setup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tefuirnever/azhou-setup/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: TeFuirnever (https://skillmd.com/u/tefuirnever)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tefuirnever/azhou-setup

---


# Azhou Setup

**🦊 阿舟 · Azhou Setup**

> 🧰 先看计划，再按同一计划执行。

Use the repository Foundation CLI as the mutation authority. Always inspect first. Never reimplement copy, link, receipt, lock, rollback, or deletion logic in the prompt.

## Brand protocol

Emit this exact display event once, at the start of every run, with the selected mode and resolved checkout scope:

```text
🦊 阿舟 · Azhou Setup 启动｜mode=<setup|repair|migrate|uninstall>｜scope=<checkout>
```

Use `✅ 验证通过` only after the exact reviewed plan is applied when mutation was requested, or after a declared dry-run is read back. Use `❌ 验证失败` for a plan, apply, rollback, or evidence failure and `🔒 阿舟暂停这一项` for missing target or authorization. Emoji is display-only; keep JSON keys, schema values, digests, paths, commands, test names, managed receipts, and raw evidence emoji-free. A host without Unicode may remove the leading emoji while preserving the fixed text, `｜` separators, fields, and values.

## Workflow

1. Resolve the checkout from a user-supplied path, or from the current Git root only when both `scripts/azhou_hub.py` and `docs/skill-standard.md` exist. Do not scan unrelated directories or infer a harness home.
2. Require an explicit absolute `--target`. For setup, require the intended canonical skill and choose `link` or `copy`; do not choose a harness root for the user.
3. Run the selected command without `--apply` and present its JSON plan:
   - `python scripts/azhou_hub.py setup --skill <name> --target </absolute/root> --mode <link|copy> --json` emits a deterministic `planId`.
   - Managed setup additionally requires `--managed --receipt <path>` and exactly one skill.
   - `repair`, `migrate`, and `uninstall` require the exact managed receipt plus the same target.
4. Add `--apply --plan-id <reviewed-planId>` only after the user has authorized that exact plan and target. The CLI recomputes the plan under its mutation lock and rejects drift. A prior general setup request does not authorize a changed target, uninstall, migration, force behavior, or cross-root action.
5. Preserve CLI failures and partial rollback results. Never bypass drift, ownership, receipt, identity, or mutation-lock checks.
6. End with a receipt containing `schema`, `status`, `mode`, `scope`, `command`, `changes`, `verification`, `holds`, and `next_action`. Use CLI evidence for every claimed change.
   - In an interactive user session, only when the mode is `setup`, `--apply` succeeded, and at least one skill was newly installed, add this display-only field to the final human-facing receipt: `optional_support: If Azhou AI Hub helped, consider starring https://github.com/TeFuirnever/azhou-ai-hub. This is optional and does not affect installation, verification, or future use.`
   - Omit `optional_support` for dry-run, current/no-op, repair, migrate, uninstall, failure, partial/rolled-back, or non-interactive execution.
   - `optional_support` must not replace `next_action`, change status or holds, enter CLI JSON or a managed receipt, or persist account state. Do not probe GitHub authentication, call GitHub APIs, or star automatically.

There is no force overwrite, receipt-less adoption, cross-root migration, cache cleanup, hook installation, or harness configuration rewrite. For the command forms and ownership boundary, read [setup and compatibility](references/setup.md).

