Install the CLI
Install approved skills in Claude Code with the Slancha CLI. Tracing is optional.
Install
Open Claude Code in your workspace and copy the command under Install shared skills. Run it in your terminal as your normal user, not as root. That command includes SLANCHA_API_URL for the API this console uses. Keep that assignment: downloading install.sh without it uses the CLI's built-in API default, which may be a different deployment. If the CLI is already installed, use the If the CLI is already installed commands on the same page; slancha auth --api selects that API explicitly.
The Claude Code page shows the exact command for the host you are on. The installer prints what it will do before it does it. It needs curl, python3 3.9 or newer, and a tool that computes sha256. It then:
- downloads
scripts/slancha.pyfrom the open-source Slancha plugin repository, at a commit pinned inside the installer, and checks the file's sha256 against the value pinned with it. A mismatch installs nothing; - installs it as
~/.local/share/slancha/slancha.py, with aslanchacommand in~/.local/bin; - runs
slancha auth; - runs
slancha init.
Core slancha init needs claude and git on your PATH. Optional slancha init --tracing also needs uv and a Python 3.10 or newer that uv can find. It says which are missing.
The commands
| Command | What it does |
|---|---|
slancha auth | Signs in. You approve your own skill access in the console. --manage asks for an agent token (below). --tracing requests tracing keys and requires an admin. --no-browser only prints the link; --api URL picks another Slancha API. |
slancha init | Sets up Claude Code for Slancha, without tracing. --tracing also sets up tracing. --dry-run says what it would change and changes nothing. Safe to run again. |
slancha update [skill] | Installs or updates skills from your library. Also /slancha:update inside Claude Code. --dry-run and --force are available. |
slancha status | Shows the token, the API, the installed Slancha skills and any usage reports waiting to upload. Also /slancha:status. |
slancha tracing status | Shows this machine's tracing plugin and its settings, and, with an agent token, what the workspace receives. |
slancha tracing on, slancha tracing off | Turns the tracing plugin on or off in Claude Code. --project does it for the current directory only, in Claude Code's gitignored local settings. |
slancha tracing config [--max-chars N] [--images on|off] | Shows the tracing plugin's options, or sets them: cut each captured input or output at N characters, and upload images or not. Skill tags stay on, because Slancha counts traces per skill by them. |
slancha hook | Run by Claude Code's hooks, not by you. It records skill use. |
slancha flush | Uploads the waiting usage reports. The hooks start it in the background. |
These commands work with your workspace's library and jobs, for you or for an agent you run. Most need an agent token: with a plain personal token the API refuses them, and the CLI tells you to run slancha auth --manage.
| Command | What it does |
|---|---|
slancha whoami | The workspace, the role the token acts as, what it can do and when it expires. |
slancha skills | Lists the workspace's skills. |
slancha skill <s> | One skill: its served version, its pending change and its versions. |
slancha upload <path> [path ...] [--name N] [--dry-run] | Uploads one or more skill folders or zips for review, like Upload a skill in the console. A directory with no SKILL.md is a folder of skills: each child folder that has a SKILL.md, and each zip, is one skill. Each skill becomes its own proposal, one failure does not stop the rest, and the command ends with a summary per skill. It requests a security scan for each uploaded skill and reports its acceptance criteria. If the scan does not start, the command says so, and slancha scan <s> --wait retries it. A skill that already has a change waiting for review is reported and skipped. --name works only with one skill. --dry-run packages each skill and checks it against its acceptance criteria, including a skill with a change waiting, and uploads nothing. |
slancha pending [<s>] | The changes waiting for review, or the one for skill <s>. |
slancha review <s> | The review card of the change waiting for <s>: its checks, scan, diff and acceptance criteria. |
slancha jobs [--skill S] | Jobs, newest first, optionally for one skill. |
slancha job <id> [--wait] [--cancel] | One job. --wait waits until it ends; --cancel cancels it. |
slancha scan <s> [--revision R] [--wait] | Scans a skill again: by default the version waiting for review, else the served one. --wait waits for the verdict. |
slancha draft <s> [--new --project P [--description D]] | Starts a draft from traces for <s>, or writes a new skill from project P. It sends scrubbed session excerpts to the workspace's model provider on the workspace's own key. An agent token needs the workspace to allow agent jobs. |
slancha outcomes <s> [--start] [--days N] | How the sessions that used <s> ended; --start starts an outcome job. --days is 1 to 90 and defaults to 30. The same workspace setting applies. |
slancha criteria <s> [--check PATH | --revision R] | The skill's acceptance criteria. With neither --check nor --revision it prints the rules and how the served and waiting versions do, and it exits 0 even when a version fails a rule. --check checks a folder or zip at PATH. --revision checks a stored version. Nothing is uploaded. Either of those exits 3 when a rule fails. |
Every one of these, and every slancha tracing command, takes --json. Exit codes: 0 done, 1 an error or a refusal, 2 a usage error, 3 the acceptance criteria are not met. slancha criteria <s> with neither --check nor --revision exits 0. Pass --check or --revision in CI to get exit 3 when a rule fails. An upload of several skills exits 3 if any skill misses its criteria, otherwise 1 if any skill failed. With one skill path, upload --json prints the API's object; with more than one skill, or a folder of them, it prints an array with one result per skill. update, status, hook and flush exit 0 even when they report a problem, because Claude Code runs them too and shows their message. An upload that exits 1 or 3 after printing Uploaded is stored, and the skill takes no other upload until it is approved or rejected. Exit 3 there means the version fails its acceptance criteria and cannot be approved. Exit 1 there means its security scan did not start, which slancha scan <s> --wait retries.
Sign in
Run slancha auth, open the console link and check that the displayed code matches. Choose your workspace and approve skill access. Codes expire after ten minutes; the CLI checks for approval every five seconds and stops when the code expires. Requests using --tracing require an admin; requests using --manage require a proposer or above. If it can, the CLI opens the browser link for you.
The code pays out once: the next poll after approval receives a personal token and the code is spent. Tracing keys are included only for an explicit tracing request approved by an admin. Slancha stores only a hash of the device code. The approval and the token are recorded in the audit trail.
The CLI saves these files in ~/.config/slancha, a directory only you can read:
token: your personal token, which starts withslancha_pat_;config.json: the API you signed in to;tracing.json: your workspace's tracing host and keys, only for a tracing sign-in. A later skills-only sign-in removes this cached file.
A plain personal token can read your workspace's published skills and report their use. It can do nothing else. It does not expire. Any member can create one on the Claude Code page, where you can also revoke your own. The token is shown once. You can store one by hand in ~/.config/slancha/token or in SLANCHA_TOKEN.
Agent tokens
slancha auth --manage asks for an agent token: one that lets the CLI, or an agent you run with it, work with the library as you do. The console shows what it asks for before you approve. A proposer, approver or admin can approve it; a viewer cannot.
- It acts as your role in the workspace, but never above proposer. A viewer's agent token is a viewer.
- It can read skills, pending changes, review cards, history and jobs, upload skills, scan them, and follow and cancel jobs.
- It can start drafts and outcome jobs only while an admin allows agent jobs in Workspace settings. A draft sends scrubbed excerpts of the workspace's sessions to its model provider on the workspace's own key; the scrub is not perfect. Each run has a cost cap.
- It cannot approve, reject or roll back, set acceptance criteria, or manage members, keys or tokens.
- It expires 30 days after you approve it. The Claude Code page lists it with its expiry, marked "agent".
An agent token replaces the token in ~/.config/slancha/token; there is one token file. When it expires, the hooks stop reporting use and /slancha:update stops working too, until you run slancha auth again, with --manage for a new agent token.
What init changes on the machine
Default slancha init installs the Slancha skill plugin without configuring tracing. To enable tracing separately, run slancha auth --tracing, have an admin approve, then run slancha init --tracing. Before enabling it, confirm an operator attached tracing to the workspace and that you understand the machine-wide capture described in Sessions. Skills-only init does not remove tracing configured earlier. The tracing setup does four things, each safe to repeat:
- It clones the tracing tool's Claude Code plugin into a folder under
~/.local/share/slancha/, checks out a fixed commit, and installs it in Claude Code for your user. - It installs the Slancha plugin from the Slancha plugin repository through Claude Code's plugin marketplace; plain
slancha initdoes this step too. That install takes the repository's current version. It is not pinned to the installer's commit. - It merges tracing settings into
~/.claude/settings.json, leaving your other settings alone. It sets the tracing plugin's public key, secret and base URL under names that stay with that plugin, and removes the names other programs also read so their traces are not rerouted. It turns skill tags on and image upload off. - It rewrites
settings.jsonwith permissions only you can read, because it now holds your workspace's tracing secret.
After it runs, every Claude Code session on that machine is traced to your workspace's tracing project. See Sessions. Restart Claude Code to load the plugins. slancha tracing off stops it and slancha tracing on starts it again, without running init; slancha tracing status shows where it stands. init warns if you added a tracing hook by hand, because it would send every turn twice, and if your shell exports that tool's environment variables.
What the hooks do
The Slancha plugin registers Claude Code hooks for session start, skill calls and slash commands, stop, and session end. A hook never fails, never blocks a session, and prints nothing except one notice.
- When a Slancha skill is used, the hook appends one line to
~/.cache/slancha/usage.jsonl: the skill, its installed version, whether the Skill tool invocation succeeded, a hash of the session id, and the time. Tool success does not establish that the task was completed or that the skill helped. It holds no prompts and no file contents. - When Claude Code stops or a session ends, it starts
flushin the background to upload those lines. Lines that cannot be sent wait and retry; ones older than about 29 days are dropped. - Once a day, at session start, it tells you if an installed skill has a newer approved version.
Install your first approved skill
Sign-in and init set up the plugin; they do not install every skill in your workspace. Open Skills in the console and choose a skill that has an approved version. Copy its exact name, then replace your-skill-name below:
slancha update your-skill-name --dry-run
slancha update your-skill-name
Inside Claude Code, the equivalent is /slancha:update your-skill-name. A skill waiting for review cannot be installed. slancha update with no name updates skills already installed and lists other approved skills; it does not automatically install those others. If the command asks you to, run /reload-skills in Claude Code. Check slancha status for the installed revision before using the skill.
How approved skills arrive
slancha update compares each Slancha skill in ~/.claude/skills (or a project's .claude/skills) with the version your library serves. Only approved versions are served. A skill that is waiting for review reports "not published yet".
For each download it checks:
- the response names the version you asked for, and the zip matches the sha256 the server sent in
X-Slancha-Sha256; - every file in the zip matches the sha256 and size listed in the zip's manifest, and the zip holds exactly the files the manifest lists;
- the zip stays within the same limits as an upload (200 files, 256 KB a file, 2 MB in all), holds no links, and holds no path that leaves the skill's folder.
It talks to the Slancha API over HTTPS only, sends the token only there, and refuses redirects. If a check fails, it installs nothing and keeps what you had. If you edited a skill, update keeps your copy and says so, unless you pass --force; it then saves the old copy in .slancha-backup beside the skill.
These checks catch a damaged or altered download. They are not a signature check, and the digest comes from the same server as the zip.
Download and install write every file as mode 0644. A bundled script is not executable, so ./scripts/verify.sh is refused. A skill runs a script as bash scripts/verify.sh or python3 scripts/x.py.
If ~/.claude/skills did not exist when your session started, Claude Code is not watching it yet. update says so, and you run /reload-skills.
Machine agent, by invitation
Machine-agent enrollment is not available in the hosted API or console. Contact Slancha if you need it.