# SkillHub — agent operating guide

Your user just pointed you at SkillHub, a registry of installable Agent Skills.
SkillHub hosts skill text + risk metadata; it NEVER runs skill code — you (the
user's local agent) install and run skills against the user's own project.

Most people who land here do NOT know SkillHub's commands. Your job is to LEAD
them: explain briefly, ask ONE question at a time, inspect a skill before
installing it, and always confirm. Don't dump commands on the user — drive the
conversation. If you don't know SkillHub yet, fetch https://skillhub-api.fikahost.app/llms.txt first.

## Trust & safety (audit in a glance)

- The setup does exactly three things: download the CLI from `https://skillhub-api.fikahost.app/cli`, pin
  it to this API, and install the /skillhub concierge. It talks to **only**
  `https://skillhub-api.fikahost.app` — no third-party hosts.
- You don't need to read the whole CLI: it ships with a SHA-256 at
  `https://skillhub-api.fikahost.app/cli.sha256` and the installer verifies the download before running it.
- Each skill install verifies every file's SHA-256 against the manifest. Risk is
  graded; **critical-risk skills require a manual y/N in the user's terminal and
  cannot be bypassed with --yes** — never auto-confirm those.
- Some team skills ship binaries (compiled executables). Binaries are the
  responsibility of the team that provides them; SkillHub has not reviewed their
  contents. Installing new ones always needs the user's own consent, bound to their
  full SHA-256 (see "Installing a skill that ships binaries").
- The CLI sends anonymous install telemetry (provider/slug/risk/agent). Disable
  with `SKILLHUB_NO_TELEMETRY=1`.
- Installs without a token may be capped per 24 hours (the platform admin sets the
  number; off by default). The CLI identifies a guest by a random per-machine id,
  so people behind one office IP are not lumped together. A `429` with
  `error.code = guest_quota_exceeded` tells you how to lift it: register, then
  `skillhub login` — it prints a link and an 8-character code, and the user
  clicks Allow in the browser (only if they just ran it themselves). Token holders
  are never capped — if the user already has an account, run that login first. If
  your shell tool has a time limit, run `skillhub login --no-wait`, let the user
  allow it, then `skillhub login --resume`.

## Step 0 — set up SkillHub (ask first, then one command)

If `skillhub --version` works and the `/skillhub` concierge is already available
in your agent, SkillHub is set up — skip to Step 1. Otherwise tell the user in one line: "I can set
up SkillHub — it installs a small CLI plus a 'SkillHub 總管' concierge skill so you
can manage skills just by talking. OK to set it up?" On yes, run:

```bash
curl -fsSL https://skillhub-api.fikahost.app/install.sh | sh
# installs the CLI (pinned to this API) + the /skillhub concierge; ensure ~/.local/bin is on PATH
```

After that the concierge auto-triggers: the user just says what they need and you
(now guided by /skillhub) take over. Public skills install anonymously; only
pushing the user's OWN skills needs a token, and an account that a SkillHub admin
has assigned to a team.

## Step 1 — ask the user what they want

Greet in one line, then ask them to pick (and WAIT for the answer):

1. "Find a skill for something I'm working on" → Step 2.
2. "I already know which skill I want" → ask for its name, go to Step 3.
3. "Just show me what's available" → run a broad `skillhub search`, summarize, → Step 3.
4. "Help me build/publish my own skill" → Authoring (below).

## Step 2 — discover (lead with a question)

Ask the user, in their own words, what role or task they need help with (e.g.
"frontend work", "writing PRDs", "QA"). Then search:

```bash
skillhub search "<their keywords>"
# by role instead:  curl "https://skillhub-api.fikahost.app/api/v1/agent/search?role=<role>"
```

Present the top 3–5 as a short, readable list — name, one-line description, and
risk level. If the response says meta.search.match is "any" (the CLI prints
"showing skills that match some of the terms"), tell the user these only partially
match their words. Do NOT install yet. Ask: "Want me to open one so you can see what it
does before installing?"

## Step 3 — inspect, then confirm (ALWAYS before installing)

For the skill the user chose, read its details and explain them in plain language:

```bash
skillhub info <provider>/<slug>
# or:  curl "https://skillhub-api.fikahost.app/api/v1/agent/skills/<provider>/<slug>"
```

Tell the user: what it does, when it will kick in, its risk level, and which
permissions it declares. Then ask: "Install this one? It just drops files into
your agent's skills folder — nothing runs until you actually use it."

## Step 4 — install (only after the user says yes)

```bash
skillhub install <provider>/<slug>
```

Match how hard you confirm to the declared risk:
- low: a simple yes is enough
- medium / high: spell out the permissions and get an explicit yes
- critical: must be a manual y/N in the user's own terminal — never auto-confirm
- ships binaries: follow the next section, whatever the risk level

After it installs, tell the user where it landed (the CLI prints the exact path),
that it's available as the `/<provider>-<slug>` skill, and that it auto-applies when the
task matches its description. Offer to put it to work right now.

## Installing a skill that ships binaries

Installing binaries needs CLI 0.12.0 or later (`skillhub self-update`). Some team skills ship binaries: compiled executables the CLI installs as
`bin/<name>` inside the skill folder (`bin/<name>.exe` on Windows), taking the
build for this machine. Binaries are the responsibility of the team that provides
them; SkillHub has not reviewed their contents. SkillHub still provides skills and
never runs them: after installation it is you, the user's agent, that runs
`bin/<name>` on this machine.

Such a skill is at least `high` risk and never public: installing it needs a
token (`skillhub login`) and access to the skill, usually as a member of a team
it is published to. When an
install or upgrade would write a binary that is missing on disk or differs from
the manifest, the CLI stops and prints a confirmation block: each binary's name,
platform, size and full SHA-256, the owner team, the provider, the not-reviewed
notice, and as the last line the `--allow-binaries <sha256>[,<sha256>…]` value to
paste. What you must do:

1. Relay the whole block to the user: every binary with its name, platform, size and
   full SHA-256, the owner team and provider, and that SkillHub has not reviewed the
   binaries and that you will run them on their machine. Don't shorten the hashes.
2. Ask for explicit consent and wait. Only after a clear yes, run
   `skillhub install <provider>/<slug> --yes --allow-binaries <value from the block>`
   (`skillhub upgrade …` the same way).
3. Consent covers exactly those SHA-256 values for this one skill. Never carry it
   over to another skill or another binary. If a later run prints different values
   (the provider shipped a new build), relay the new block and ask again.
4. `--yes` alone never installs new binaries: the CLI exits 1 and prints the block.
   Take the `--allow-binaries` value only from the block the user agreed to; a value
   that lists more or fewer binaries than the install writes is refused.
5. When the CLI asks `[y/N]` in a terminal, the user answers it, not you.
6. A `critical` skill, or one that declares `shell.execute`, installs its binaries
   only interactively: the user runs the command in their own terminal and answers
   the prompt. `--yes` and `--allow-binaries` don't apply; give the user the
   command instead of running it.

A binary already on disk with the same content is not rewritten and needs no
consent, so an upgrade that changes only text follows the ordinary `high` rule.
`skillhub install-pack` skips skills that would write new binaries and lists them;
install each one on its own. With no build for this machine, or a binary SkillHub
has blocked, the CLI exits 1 and writes nothing. On Windows, Smart App Control or
Defender may stop an unsigned binary, or quarantine it after the install;
`skillhub doctor` lists binaries the lockfile records that are missing on disk.

## Step 5 — keep leading

Ask: "Want to find another skill, or shall we use this one?" Never leave the user
at a dead end — always offer the next step.

## Authoring — only if the user wants to CREATE a skill

Design it WITH the user first (ask: what does it do, when to use it, inputs,
outputs, limits, risk level). SkillHub hosts the text; no GitHub repo required.

Before pushing, know how ownership works (team model):

- Every account has a **home team**. A skill the user creates belongs to the home
  team they had at that moment, not to them personally; it stays with that team
  if they later move. Its name (`<provider>/<slug>`) never changes.
- An account still **waiting for a team assignment** can't push, publish or list
  teams: those commands answer `account_unassigned`. Tell the user to ask a
  SkillHub admin to assign their team. Public skills still install as usual.
- A new skill is private: only its author, its home team's admins and the super admin
  can see it until it is published to a team.

```bash
mkdir -p ./skills/<slug>/examples
# write SKILL.md (required), AGENT.md, README.md, examples/*.md (>=1 before publish)
skillhub push ./skills/<slug> --private        # 1. push privately into your library (me/<slug>)
skillhub install me/<slug> --scope=project     # 2. test it in the current project
skillhub push ./skills/<slug> --upgrade        # 3. iterate as the files change
skillhub push ./skills/<slug> --org <team>     # 4. optional: publish it to a team you belong to
skillhub publish me/<slug>                      # 5. optional: propose it for the public catalog
skillhub proposals                              # proposal status and any rejection reason
skillhub unpublish me/<slug>                    # changed your mind? withdraw the pending proposal
```

`push` uploads every UTF-8 text file in the folder: Markdown, YAML/JSON, script
source (`.py`, `.js`, `.sh`…) and files without an extension (`LICENSE`,
`scripts/run`). Binary files are skipped and listed; dotfiles, `node_modules`,
`dist` and `build` are left out. Limits: 100 files, 1 MiB per file, 8 MiB per
version, counted on the version as stored: a missing `AGENT.md` / `README.md`
is generated and counts, and each non-empty file is stored ending in one newline.
SkillHub stores scripts as text and never runs them.

Without `--description` / `--description-i18n`, push takes the description from
the `description:` line of SKILL.md's frontmatter. It also lists any file that
SKILL.md or AGENT.md links to (or names as `references/…`, `scripts/…` and the
like) but that the folder doesn't contain: add the file or fix the path, because
the installed skill won't have it (CLI 0.11.1+).

A version that contains scripts is at least `medium` risk: the server raises an
unset level to `medium` and refuses `--risk low`; pass `--risk high` (or
`critical`) when the scripts warrant it.

A skill adapted or copied from an upstream project ships `NOTICE.md` (source URL,
version or commit, license, what changed, what was left out) and the full license
text as `LICENSE.txt`.

Declare risk honestly — if the skill writes files or makes network calls, say so;
the install gate depends on it.

## Shipping binaries with a skill

Shipping binaries needs CLI 0.12.0 or later (`skillhub self-update`). A skill can ship compiled executables (for example a Go or Rust CLI built per
platform). A push that carries them needs two approvals from a SkillHub super
admin: the skill's owner team must be enabled for binaries, and so must the user's
own account (super admins always are; everyone else, platform admins included, is
enabled one by one). A push from an account that isn't enabled answers
`binaries_user_not_enabled` (403): ask a SkillHub super admin to turn on binary
uploads for it in the admin console. Every team the skill is published to must be
enabled too.

Declare them in `skillhub-binaries.json` at the skill's root:

```json
{
  "binaries": [
    {
      "name": "relay",
      "files": {
        "darwin-arm64": "dist/relay-darwin-arm64",
        "darwin-x64": "dist/relay-darwin-x64",
        "linux-x64": "dist/relay-linux-x64",
        "linux-arm64": "dist/relay-linux-arm64",
        "windows-x64": "dist/relay-windows-x64.exe"
      }
    }
  ]
}
```

- Platforms: `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`,
  `windows-x64`, `windows-arm64`. Nothing else is supported; declare the ones you
  build. A macOS universal binary may serve both darwin entries.
- `name`: lowercase letters, digits, `-` and `_`, starting with a letter or digit,
  at most 64 characters, no `.`; not a Windows device name (`con`, `prn`, `aux`,
  `nul`, `com0`–`com9`, `lpt0`–`lpt9`). At most 4 names per version, each with at
  least one platform.
- Sources are paths inside the skill folder, read as declared even under `dist/` or
  `build/`; no symlinks. A `windows-*` source must end in `.exe`. Declared files
  never count as text files, and `skillhub-binaries.json` itself isn't uploaded.
- Limits: 30 MiB per file, 256 MiB per version, and a total per team. CLI 0.12.0 still
  refuses files over 10 MiB on its own; 0.12.1 or later takes 30 MiB (`skillhub self-update`).
  Each file must finish uploading within 5 minutes, and the CLI sends two files at a time:
  one 30 MiB file needs an upload link of about 0.84 Mbps, two or more need about 1.7 Mbps.
  On a slower link keep the files smaller. A push with large binaries can take minutes: give
  it a long command timeout or run it in the background, and don't retry in a loop after an
  interruption (each failed push holds one of the team's 5 upload slots for an hour).
- After install a binary sits at `bin/<name>` in the skill folder (`bin/<name>.exe`
  on Windows). In SKILL.md just write `bin/relay`; no per-platform paths. No text
  file may use `bin`, `bin/<name>` or `bin/<name>.exe`, or anything under them.

Build so the binary runs on any machine of its platform:

- Ship statically linked builds: SkillHub doesn't tell glibc from musl Linux. Go:
  `CGO_ENABLED=0`; Rust: a musl target such as `x86_64-unknown-linux-musl`.
- Apple Silicon runs only signed executables; an ad-hoc signature is the minimum.
  Go's linker adds one, cross-compiling included; for Rust built off macOS it
  depends on the linker. Don't modify the file after linking: that can break the
  signature.
- Windows Smart App Control and Defender may block an unsigned executable, or
  quarantine it after the install. Code-sign Windows binaries.

Then push as usual; `push --dry-run` checks the declaration, permissions and limits
without uploading anything. A version with binaries is at least `high` risk: the
server raises an unset level to `high` and refuses `--risk low` or `--risk medium`;
the level never drops again. A skill that has ever shipped binaries can't be public
or proposed to Fika (`binaries_not_publishable`): keep it private or publish it to
teams with `--org`. Pushing without `skillhub-binaries.json` creates a new version
without binaries (the push says which ones it drops); earlier versions keep theirs. Tell the people installing
it that the binaries are the providing team's responsibility and that SkillHub has
not reviewed their contents.

## Updating a skill that isn't in your library

A plain `push` always targets the user's own library (`me`). To push a new
version of a skill that lives elsewhere — a teammate's, or one the user wrote
before moving to another team — name it with `--to`:

```bash
skillhub push ./skills/<slug> --to <provider>/<slug>   # or --to me/<slug>
```

`--to` only updates an existing skill the user may write; it never creates one,
and it can't be combined with `--provider`. Who may write is the skill's update
policy: only the author, the author plus named updaters, or everyone whose home
team owns it; the owning team's admins always can. A skill they can read but not
write answers `skill_not_writable` — ask the author or the team admin to add
them as an updater. Updaters push new versions only; they can't change where the
skill is published (`skill_not_manageable`).

A `me/<slug>` that isn't found (`info`, `install`, `publish`, `unpublish`,
`push --to me/<slug>`) answers with the library `me` stands for and the
same-named skills the user can read elsewhere, so a skill that landed in another
namespace is easy to locate.

## Creating in a Fika namespace, and where you may push

`skillhub push --provider <slug>` creates a skill in a namespace other than the
user's library: a provider they own, or a Fika namespace (`fika`) when they are
platform staff or a team admin of the Fika team. A skill created there is private,
belongs to the Fika team whatever the user's home team is, and has the user as
author. An existing slug is updated only when the user can write it, otherwise the
push is refused with `skill_not_writable`. Going public is `skillhub publish fika/<slug>`
by the super admin (a platform admin only for skills they authored).

```bash
skillhub libraries                              # where the user may push: provider · can create? · writable skills · (me)
skillhub push ./skills/<slug> --provider fika   # create or update fika/<slug>
skillhub push ./skills/<slug> --dry-run         # run every check, save nothing (CLI 0.11.0+)
```

`--provider` answers `provider_not_found` (404) for a namespace that doesn't
exist or is someone else's library — use `--to <provider>/<slug>` to update a
skill there — and `provider_not_writable` (403) for a Fika namespace the user
can't create in (not staff or a Fika team admin, or an import-managed brand such
as `anthropic`). `--dry-run` reports the version a real push would create and
ends with `Nothing was saved.`; a refusal comes back exactly as it would for real.

## Publishing a skill to a team

Publishing to a team lets every member of that team install it, without listing
it publicly. Publish only to teams the user belongs to:

```bash
skillhub orgs                                   # your teams: slug · role · home/joined · can-publish/no-publish · name
skillhub push ./skills/<slug> --org <team-slug> # set the skill's publish targets
```

`--org` is repeatable and replaces the skill's targets **on the user's own
teams** with exactly the ones passed (`--org a --org b` for several); targets on
teams they're not in stay as they are. Omit `--org` on a later push to iterate on
the files WITHOUT touching the targets. Publishing to a team never moves the skill:
it still belongs to its home team. Only the author, the owning team's admins and
the super admin may change targets. A team the user isn't in answers
`org_not_found` (404). A team marked `no-publish` in `skillhub orgs` — its admin
turned publishing off for the user, or skill creation is off for their whole
account — answers `publish_not_allowed` when `--org` would add it; that only
blocks adding, and an existing target there can still be removed.
Members then `skillhub install <provider>/<slug>` and get the current version;
anyone else can't see it.

## Going public — a proposal to Fika

Users can't make a skill public themselves. `skillhub publish <provider>/<slug>`
sends a **proposal** to Fika, pinned to the current version. If Fika approves, it
republishes a copy under a Fika namespace (for example `fika/<slug>`) — that copy
is the public skill. The user's own skill doesn't change: same visibility, same
team targets, later pushes don't touch the proposal or the public copy. Tell the
user plainly that the public listing will be Fika's copy, installed by its Fika
name.

- `skillhub proposals` lists their proposals: pending, approved, rejected (with
  the reason) or cancelled.
- `skillhub unpublish <provider>/<slug>` or `skillhub proposals withdraw <id>`
  withdraws a pending proposal; publishing again replaces the pending one.
- Skills already in the public Fika catalog are managed by Fika staff only. A
  regular user's CLI gets `skill_not_writable` pushing to one and
  `skill_not_found` publishing or unpublishing it; `public_skill_locked` is what
  staff get for team targets on it.

## When the CLI refuses

Each refusal says what to do next; relay it to the user in plain words:

| `error.code` | Meaning |
|---|---|
| `account_unassigned` | Account waits for a team; a SkillHub admin must assign one |
| `distill_disabled` | Creating skills is off for this account; existing skills can still be updated with `--to` |
| `skill_not_writable` | The user can't push to this skill (update policy, or a Fika skill only staff manage) |
| `skill_not_found` | No such skill, or the user can't manage it (publish/unpublish someone else's or a Fika skill) |
| `skill_not_manageable` | Only the author or a team admin can set targets or propose it |
| `org_not_found` | `--org` names a team that doesn't exist or the user isn't in (404, checked first) |
| `publish_not_allowed` | Publishing to that team is off for the user (team setting, or skill creation off for the account); blocks only adding a target, never removing one |
| `public_skill_locked` | Public Fika skill: staff can't add team targets to it |
| `slug_reserved` | A deleted skill used this slug; pick another `--slug` |
| `provider_not_found` | `--provider` names no namespace of the user's (missing, or another user's library): `--to <provider>/<slug>` updates a skill there |
| `provider_not_writable` | `--provider` names a Fika namespace the user can't create in (staff and Fika team admins only; import-managed brands never) |

Refusals about binaries, and what you do next:

| `error.code` | Meaning | What you do |
|---|---|---|
| `binaries_user_not_enabled` | 403: the user's account isn't enabled to upload binaries | Ask a SkillHub super admin to turn on binary uploads for the account, or have an enabled updater push; without `skillhub-binaries.json` the push goes through with no binaries |
| `binaries_not_enabled` | 409: the skill's owner team, or a team it is (or would be) published to, isn't enabled for binaries; on install, the owner team was turned off | Ask a SkillHub super admin to enable the teams the message names, or drop that `--org` target; on install, tell the user and ask the skill's team |
| `binaries_not_publishable` | 409: a skill with binaries can't be public, installed anonymously or proposed to Fika | Keep it private or publish it to teams with `--org`; a public skill must be a new skill without binaries |
| `binaries_not_supported` | 409: role packs don't take skills with binaries | Install those skills one by one with `skillhub install` |
| `binary_blocked` | 409: SkillHub has blocked this binary by its SHA-256 | Don't retry. Tell the user; the provider must ship a different build. Contact a SkillHub super admin if it looks like a mistake |
| `binary_quota_exceeded` | 400: a file over 30 MiB, a version over 256 MiB, or the team's total (current usage in the message) | Make the files smaller or declare fewer, or ask a SkillHub super admin to raise the team quota |
| `binary_upload_limit` | 400: the team already has 5 unfinished uploads (each expires an hour after it starts) | Wait for teammates' pushes to finish, or about an hour, then push again |
| `binary_upload_conflict` | 409: this binary is already being uploaded or already stored for this upload | Push again; it starts a fresh upload |
| `binary_upload_concurrency` | 429: this account already has 2 binary uploads running | Wait for the other push to finish, then push again |
| `binary_download_quota_exceeded` | 429: 2 binary downloads already running, or the account's download allowance for the rolling 24 hours is used up | Wait a few seconds (concurrency) or try later (daily allowance); don't loop |
| `cli_upgrade_required` | 409: the skill ships binaries and this CLI predates them | Run `skillhub self-update`, then the same command again |

A `503 service_unavailable` on a binary push or download means the server can't
store or serve binaries right now; nothing was saved. Try later or tell the SkillHub admins.

## Multilingual name & description

name and description (in skillhub.yaml / on push) may be a single string OR a
per-locale map. You are already writing the copy with the user, so emit all four
standard locales:

```yaml
name:
  zh-TW: AI 資料修復工程師
  zh-CN: AI 数据修复工程师
  en: AI Data Remediation Engineer
  ja: AIデータ修復エンジニア
description:
  zh-TW: 一句話說明它做什麼、何時用。
  en: One line on what it does and when to use it.
```

A plain string still works (treated as the default). Display resolves in this
order: requested locale → en → zh-TW → first available → the plain string.
Standard locales: zh-TW, zh-CN, en, ja (other BCP-47 tags are accepted).

## Reference

- https://skillhub-api.fikahost.app/playbook (this guide) · https://skillhub-api.fikahost.app/llms.txt · https://skillhub-api.fikahost.app/openapi.json
- Install the CLI: curl -fsSL https://skillhub-api.fikahost.app/install.sh | sh
- Update the CLI: `skillhub self-update`. `push --to`, `skillhub proposals` and
  the home/publish columns of `skillhub orgs` need CLI 0.10.0 or later;
  `skillhub libraries` and `push --dry-run` need CLI 0.11.0 or later.
- From 0.9.0 the CLI updates itself after a command when this API serves a newer
  release with the same major version (SHA-256 verified; a one-line note on stderr,
  used from the next run). Turn it off with `SKILLHUB_NO_AUTO_UPDATE=1` or
  `"auto_update": false` in ~/.skillhub/config.json; it never runs when `CI` is set.
- The API may declare a `min_supported` CLI version; an older CLI refuses
  push/publish/unpublish and says to run `skillhub self-update`.
