update-api-docs
Update the API reference documentation by downloading the latest OpenAPI spec from production and regenerating the Docusaurus API docs
git clone --depth 1 https://github.com/Agenta-AI/agenta /tmp/update-api-docs && cp -r /tmp/update-api-docs/.agents/skills/update-api-docs ~/.claude/skills/update-api-docsSKILL.md
# Update API Documentation
This skill guides you through updating the API reference documentation from the production OpenAPI specification.
## Overview
The API documentation is generated from an OpenAPI spec using `docusaurus-plugin-openapi-docs`. The workflow involves:
1. Downloading the latest `openapi.json` from production
2. Replacing the local spec file
3. Regenerating the API documentation pages
## File Locations
| Purpose | Path |
|---------|------|
| OpenAPI spec (source) | `docs/docs/reference/openapi.json` |
| Generated API docs | `docs/docs/reference/api/*.api.mdx` |
| Generated sidebar | `docs/docs/reference/api/sidebar.ts` |
| Docusaurus config | `docs/docusaurus.config.ts` |
## Steps
### 1. Run the update script
The wrapper script at `docs/scripts/update-api-docs.sh` downloads the OpenAPI
spec, replaces the local file, and regenerates the docs in one step.
```bash
cd docs
# Default — fetch from production (live cloud API)
pnpm update-api-docs
# Explicit live cloud API
pnpm update-api-docs:live
# From a locally running API (http://localhost/api/openapi.json)
pnpm update-api-docs:local
# From an explicit local file
pnpm update-api-docs:file /path/to/openapi.json
```
The script writes the spec to `docs/docs/reference/openapi.json` and then
runs `npm run clean-api-docs -- agenta` followed by
`npm run gen-api-docs -- agenta`. The `agenta` argument refers to the OpenAPI
config ID defined in `docusaurus.config.ts`.
### 2. Install dependencies (if needed)
If this is a fresh clone or dependencies haven't been installed:
```bash
cd docs
npm install
```
This generates:
- Individual `.api.mdx` files for each endpoint
- `.tag.mdx` files for API categories
- `sidebar.ts` for navigation
### 5. Verify the changes
Optionally, start the dev server to preview:
```bash
cd docs
npm run start
```
Then visit `http://localhost:5000/docs/reference/api` to verify the API docs render correctly.
## Commit Guidelines
When committing these changes:
1. **First commit** - API docs update:
```
docs(api): update OpenAPI spec from production
```
2. Include all changed files:
- `docs/docs/reference/openapi.json`
- `docs/docs/reference/api/*.api.mdx`
- `docs/docs/reference/api/*.tag.mdx`
- `docs/docs/reference/api/sidebar.ts`
## Troubleshooting
### "missing required argument 'id'" error
The clean and generate commands require the config ID. Use:
```bash
npm run clean-api-docs -- agenta
npm run gen-api-docs -- agenta
```
### "docusaurus: not found" error
Run `npm install` in the `docs/` directory first.
### Deprecation warning about onBrokenMarkdownLinks
This is a known warning and can be safely ignored. It will be addressed in a future Docusaurus v4 migration.
## Related Configuration
The OpenAPI plugin is configured in `docs/docusaurus.config.ts`:
```typescript
[
"docusaurus-plugin-openapi-docs",
{
id: "openapi",
docsPluginId: "classic",
config: {
agenta: {
specPath: "docs/reference/openapi.json",
outputDir: "docs/reference/api",
downloadUrl: "https://raw.githubusercontent.com/Agenta-AI/agenta/refs/heads/main/docs/docs/reference/openapi.json",
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag",
},
},
},
},
],
```Helps add announcement cards to the sidebar banner system. Use when adding changelog entries, feature announcements, updates, or promotional banners to the Agenta sidebar. Handles both simple changelog entries and complex custom banners.
Playbook for adding a new coding-agent harness to Agenta (Codex, Hermes, Gemini, OpenCode, ...). Use when starting, planning, or reviewing a new-harness project. Covers the readiness audit of prior art, the spike-first milestone plan, the full integration-surface checklist, the per-harness variance axes to probe, and the process/communication contract with Mahmoud. Living document: every harness project appends its lessons to resources/LESSONS.md.
>-
Where to put frontend code (package vs app layer) and how to use the @agenta/* packages. Use when authoring or moving code in web/packages, choosing between @agenta/ui, @agenta/entities, @agenta/entity-ui, @agenta/shared, @agenta/playground, using molecules, loadable/runnable bridges, the EntityPicker, or writing package unit tests.
Use this skill to create and publish changelog announcements for new features, improvements, or bug fixes. This skill handles the complete workflow - creating detailed changelog documentation pages, adding sidebar announcement cards, and ensuring everything follows project standards. Use when the user mentions adding changelog entries, documenting new features, creating release notes, or announcing product updates.
Hard-won GitButler mechanics for multi-lane work in this repo — committing to a specific lane in a stack, spreading a pile of edits back across an existing stack, ordering a stack and setting PR bases, and recovering from a scrambled workspace. Use when working with stacked branches, when `but rub`/`but absorb`/`but commit --only` mis-routes a change, when a stack collapses or a commit lands on the wrong lane, or when a hunk gets dropped. Not needed for ordinary single-lane work.
Drive a researched and planned feature to a landed, tested change. Use after plan-feature has produced a docs/design/<project>/ workspace and the user says "implement it", "build the plan", "run the plan", or "let's ship this". Orchestrates refresh-plan, implement, review, a debug-local-deployment loop, and a test loop across the daytona / local-pi / claude x SDK / UI matrix, then documentation and a GitButler stacked branch. The orchestrator stays in the loop and spins narrow subagents for each phase.
Feature-folder layout, states/ convention, and data-flow rules for the Agenta mobile app (web/mobile). Use when creating or moving files under web/mobile, deciding where a component lives, adding a new feature or screen, or wiring data into mobile components.