> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish your first Skill with the CLI

> Authenticate, select a disposable workspace, publish one approved sample Skill, and verify the version.

Use this flow to prove that your local CLI, identity, workspace access, and
Skill lifecycle work together. Publish only to a disposable workspace that you
can archive after the check.

<Note>
  **Preview.** Confirm this workflow in your environment before using it in a
  production publishing pipeline.
</Note>

## Before you start

* Install the current `atlanai` CLI and confirm `atlanai version` succeeds.
* Use an Atlan account with Agent Registry enabled and permission to publish to
  a disposable workspace.
* Start with an approved disposable Skill directory that has `SKILL.md` at its
  root. This guide does not define a new bundle format.

## Authenticate

Open the browser login flow, then confirm the resolved account:

```bash theme={null}
atlanai auth login
atlanai auth status
```

The CLI stores the refresh credential in the operating system's supported
credential store. `auth status` reports the source and account without printing
the token.

For CI, containers, and cloud coding agents, provide a pre-provisioned API key
or bearer token through `ATLANAI_TOKEN`. It takes precedence over stored
credentials.

```bash theme={null}
export ATLANAI_TOKEN="<api-key>"
atlanai auth status
```

Do not put the value in source control, a task prompt, or a command argument.
The trace daemon reads the environment it inherited at startup. After changing
the value, stop the daemon so the next hook starts it with the new credential:

```bash theme={null}
atlanai daemon stop
```

`auth status` proves that the CLI can resolve an identity and credential source.
It does not prove that the identity can publish to the workspace you intend to
use.

## Select a disposable workspace

```bash theme={null}
atlanai workspace list --query "CLI examples"
atlanai context use workspace_01example --as cli-examples
atlanai context show
```

The active context is stored locally. Commands that accept `--workspace` can
override it for one request.

## Validate and preview the upload

```bash theme={null}
atlanai skill validate ./skills/disposable-example
atlanai skill push ./skills/disposable-example --dry-run
```

Validation reports every local package problem in one run. The dry run must
show the workspace and upload plan you expect. Stop here if either command
points to a different workspace or package.

## Publish and verify

```bash theme={null}
atlanai skill push ./skills/disposable-example --workspace workspace_01example
atlanai skill list --workspace workspace_01example --json id,name,version_ordinal
atlanai skill get skill_01example
atlanai skill versions skill_01example
```

Use the Skill ID returned by `push` in the last two commands. A successful
check shows the intended Skill in the selected workspace and its new version in
the version history.

## Correct or clean up

Use `atlanai skill rollback skill_01example --to <version> --dry-run` before
restoring an earlier package. Rollback appends a new version; it does not
rewrite history. When the disposable check is complete, archive the sample
Skill with `atlanai skill delete skill_01example` and confirm the prompt only
after checking the ID.

Next, [automate repository publishing](/guides/skills/sync-from-github) or
[capture coding-agent traces](/cli/traces).
