# Update Docs

> Update documentation based on code changes since last push. Use when the user wants to update, sync, or refresh documentation to match recent code changes across packages.

- Skill: `januarylabs/update-docs` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add januarylabs/update-docs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/januarylabs/update-docs/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: JanuaryLabs (https://skillmd.com/u/januarylabs)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/januarylabs/update-docs

---


# Update Documentation

Analyze code changes since last push and update documentation for affected packages.

## Steps

### 1. Get Changed Files Since Last Push

```bash
git diff --name-only @{push}...HEAD
```

If `@{push}` doesn't exist (never pushed), compare with main:

```bash
git diff --name-only origin/main...HEAD
```

### 2. Identify Affected Packages

From the changed files list:

- Filter to files matching `packages/*/src/**`
- Extract unique package names (e.g., `text2sql`, `agent`, `toolbox`)
- Skip packages without existing docs in `apps/docs/app/docs/`

### 3. For EACH Affected Package, Spawn a doc-updater Sub-Agent IN PARALLEL

Use the Task tool with `subagent_type: "doc-updater"` for each package:

```
Task({
  subagent_type: "doc-updater",
  prompt: "Update documentation for package: [package-name]

           Changed files in this package:
           - path/to/file1.ts
           - path/to/file2.ts

           Documentation location: apps/docs/app/docs/[package-name]/

           Analyze the changes and update corresponding documentation."
})
```

### 4. Summarize Updates

After all sub-agents complete, provide a summary:

- Which packages were updated
- What documentation changes were made
- Any new pages created or pages that need attention

## Change Detection Rules

| Change Type                        | Documentation Impact                 |
| ---------------------------------- | ------------------------------------ |
| `src/index.ts` exports changed     | Check if public API docs need update |
| New file in `src/lib/**/*.ts`      | May need new documentation page      |
| Modified file in `src/lib/**/*.ts` | Update related docs                  |
| Deleted file                       | Remove or deprecate related docs     |
| New adapter/agent/feature          | Create new documentation page        |

## Writing Style

Read [prose.md](prose.md) for documentation writing conventions (frontmatter, headings, Fumadocs components, code blocks, content patterns).

