---
title: "turnkey-tk"
description: "Set up and operate Turnkey agent authorization with the tk CLI: root and agent identities, tags, policies, approvals, secrets, expiring session keys, SSH, Git signing, inspection, and deployment beside an agent. Use for any request about who may act on Turnkey and how an unattended agent authenticates, signs, or renews its credential; not for wallets, chain signing, or broadcasting."
canonical_url: "https://skilld.dev/gh/tkhq/tk/skills"
last_updated: "2026-10-29T09:48:11.000Z"
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

---
name: turnkey-tk
description: Set up and operate Turnkey agent authorization with the tk CLI: root and agent identities, tags, policies, approvals, secrets, expiring session keys, SSH, Git signing, inspection, and deployment beside an agent. Use for any request about who may act on Turnkey and how an unattended agent authenticates, signs, or renews its credential; not for wallets, chain signing, or broadcasting.
---

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [bootstrapping-organization/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/bootstrapping-organization/SKILL.md), [deploying-signing-broker/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/deploying-signing-broker/SKILL.md), [inspecting-agents/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/inspecting-agents/SKILL.md), [managing-identities/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-identities/SKILL.md), [managing-policies/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-policies/SKILL.md), [managing-secrets/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-secrets/SKILL.md), [monitoring-activities/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/monitoring-activities/SKILL.md), [provisioning-agent-identity/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/provisioning-agent-identity/SKILL.md), [provisioning-session-agent/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/provisioning-session-agent/SKILL.md), [references/approval-models.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/approval-models.md), [references/cli-convention.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/cli-convention.md), [references/policy-language.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/policy-language.md), [references/policy-patterns.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/policy-patterns.md), [revoking-agent-keys/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/revoking-agent-keys/SKILL.md), [sidecar-patterns/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/sidecar-patterns/SKILL.md), [signing-git-commits/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/signing-git-commits/SKILL.md), [using-ssh/SKILL.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/using-ssh/SKILL.md).
>
> If the user asked to install this Skill, run `npx skilld install tkhq/tk/skills`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/skills`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/tkhq/tk/skills) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/skills`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/skills --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/skills --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Turnkey `tk` workflows

`tk` is the CLI for agent authorization on Turnkey: named profiles holding
P-256 API credentials, users and tags, policies, Secrets, expiring session
keys, SSH keys served by an agent, and OpenPGP signing. An agent here is any
principal that acts without a person watching: an LLM agent, a service, a
cron job, a CI runner. These workflows set one up and operate it. The `tk`
binary carries this package: `tk skills install --into DIR` writes it as
`DIR/turnkey-tk`.

Read [cli-convention.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/cli-convention.md) once per task. It
defines the JSON record every command prints, how pending work is resumed,
and the placeholders the examples use. Then load only the workflow the
request selects and the references that workflow names.

## Which workflow

| Request sounds like | Load |
|---|---|
| "set up Turnkey for our agents", "create the root profile", "which approval model" | [bootstrapping-organization](https://skilld.dev/api/skills-raw/tkhq/tk/skills/bootstrapping-organization/SKILL.md) |
| "create a user", "add a tag", "rotate an API key", "revoke this credential", "add a profile on this machine" | [managing-identities](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-identities/SKILL.md) |
| "write a policy", "why was this denied", "require approval for X", "update the consensus" | [managing-policies](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-policies/SKILL.md) |
| "approve this", "what is pending", "wait for the activity", "reject it", "who voted" | [monitoring-activities](https://skilld.dev/api/skills-raw/tkhq/tk/skills/monitoring-activities/SKILL.md) |
| "store a secret", "give the agent its environment", "finish a pending export", "rotate a secret", "fence what the agent can export", "two agents must not read each other's secrets" | [managing-secrets](https://skilld.dev/api/skills-raw/tkhq/tk/skills/managing-secrets/SKILL.md) |
| "provision an agent", "give the agent a permanent key", "create the agent user", "stop the agent registering keys" | [provisioning-agent-identity](https://skilld.dev/api/skills-raw/tkhq/tk/skills/provisioning-agent-identity/SKILL.md) |
| "revoke the agent's key", "task ended, cut off the key", "scoped task finished", "scope a revoker to its agents", "key leaked", "revoker user", "revoke without root" | [revoking-agent-keys](https://skilld.dev/api/skills-raw/tkhq/tk/skills/revoking-agent-keys/SKILL.md) |
| "session keys", "expiring credential", "renew the agent's key", "set up a provisioner", "the session expired" | [provisioning-session-agent](https://skilld.dev/api/skills-raw/tkhq/tk/skills/provisioning-session-agent/SKILL.md) |
| "git over SSH", "ssh with a Turnkey key", "start the ssh agent", "ssh says agent refused operation" | [using-ssh](https://skilld.dev/api/skills-raw/tkhq/tk/skills/using-ssh/SKILL.md) |
| "sign commits", "configure git signing", "gpg.program", "verify-commit fails" | [signing-git-commits](https://skilld.dev/api/skills-raw/tkhq/tk/skills/signing-git-commits/SKILL.md) |
| "GPG signing broker container", "credential-free Git signing", "provisioner container", "mount the signing socket" | [deploying-signing-broker](https://skilld.dev/api/skills-raw/tkhq/tk/skills/deploying-signing-broker/SKILL.md) |
| "what is pending", "which agents have keys", "when does this key expire", "who approved", "audit the agents" | [inspecting-agents](https://skilld.dev/api/skills-raw/tkhq/tk/skills/inspecting-agents/SKILL.md) |
| "deploy the agent", "run tk in a container", "renewal loop", "sidecar", "where does the key live" | [sidecar-patterns](https://skilld.dev/api/skills-raw/tkhq/tk/skills/sidecar-patterns/SKILL.md) |

Preflight for the SSH and commit-signing rows: when a signing broker principal
already exists (a `broker` tag, or a running `tk gpg agent serve`), commit
signing routes through
[deploying-signing-broker](https://skilld.dev/api/skills-raw/tkhq/tk/skills/deploying-signing-broker/SKILL.md), which is GPG
only. SSH through a broker runs [using-ssh](https://skilld.dev/api/skills-raw/tkhq/tk/skills/using-ssh/SKILL.md) as the broker
principal; its broker rule lists the substitutions. Run as the agent itself,
[using-ssh](https://skilld.dev/api/skills-raw/tkhq/tk/skills/using-ssh/SKILL.md) and
[signing-git-commits](https://skilld.dev/api/skills-raw/tkhq/tk/skills/signing-git-commits/SKILL.md) grant the agent signing
authority and are for deployments that intend that.

Identity provisioning here means a Turnkey user and its credentials; wallets,
chain signing, and broadcasting belong to the wallet package, not this one.

A continuation ("the export is pending", "renew the key", "the activity was
rejected") loads the workflow that owns the step, not the bootstrap. Loading a
workflow grants no permission: export, delete, and organization scope stay
with the user's authorization.

## References

| Reference | Read when |
|---|---|
| [cli-convention.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/cli-convention.md) | always, once |
| [policy-language.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/policy-language.md) | writing or debugging a `condition` or `consensus` |
| [policy-patterns.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/policy-patterns.md) | applying the fleet and signing-key policy set |
| [approval-models.md](https://skilld.dev/api/skills-raw/tkhq/tk/skills/references/approval-models.md) | choosing how much a human approves |
| [commands.md](../docs/commands.md) | checking an exact flag; generated from the parser |

## Vocabulary

| Term | Meaning |
|---|---|
| root | a member of the organization's root quorum; a satisfied quorum bypasses policies; never an agent runtime credential |
| agent | a non-root user tagged `agent`; holds only the credentials its route needs |
| provisioner | a non-root user tagged `provisioner`; proposes expiring API keys for an explicit set of agent users |
| human-approver | tag on the people who approve `allow-once` activities |
| revoker | a non-root user tagged `revoker`; deletes API keys on an explicit set of agent users and nothing else |
| allow-always | ALLOW policy the agent's own vote satisfies alone |
| allow-once | ALLOW policy whose consensus also requires a distinct `human-approver`; approval is per activity |
| `consensus=unilateral`, `consensus=approval` | static properties on Secrets choosing which export policy applies |
| long-lived route | agent with one non-expiring API key, scoped by policy |
| session route | agent on expiring keys minted by a provisioner; the agent generates each keypair and hands over only the public key |
| anchor key | a never-expiring key whose private half is discarded, so an API-key-only user on the session route stays valid |
