> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-api/stackai-api-developer-guide/skills-and-versioned-bundles.md).

# Skills and versioned bundles

Skills package reusable instructions and supporting files. GET `/v2/skills` to discover visible built-in and organization skills. GET a skill for its current published instructions/manifest; GET `/versions` and a numbered version for reproducible integrations.

#### Publish a first version

Use multipart form fields for a simple skill:

```bash
curl --fail-with-body -sS "$STACKAI_BASE_URL/v2/skills" \
  -H "Authorization: Bearer $STACKAI_API_KEY" \
  --form-string 'name=policy-summary' \
  --form-string 'description=Summarize approved policy text with citations' \
  --form-string 'instructions=Summarize only the provided policy. Cite the source and state when evidence is missing.'
```

For a bundle, send repeated `files` parts whose filenames preserve relative POSIX paths, or a single zip. Include the bundle's `SKILL.md` and valid supporting files. Do not use absolute paths or traversal paths in the bundle. Use the endpoint's validation errors to fix invalid or oversized bundles; no universal upload-size allowance is promised here.

#### Publish and pin revisions

POST `/v2/skills/{skill_id}/versions` to publish another version. Repeat `carry_paths` to retain selected files, and set `base_version` to the version to copy from when needed; otherwise it uses the current version. Unmentioned files are not a substitute for explicitly carried files. Supplying a changed name can rename the skill when publishing.

Save the skill ID and returned version number. Fetch that exact version when reproducibility matters instead of always using latest. Version numbers are 1-based. Conflicting names or versions can produce 409. DELETE removes an owned skill and all its versions; organization administrators may delete other organization skills. Do not treat deletion as an unpublish operation for just one version.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-api/stackai-api-developer-guide/skills-and-versioned-bundles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
