doc-sync-automation
Use this skill when keeping documentation synchronized with code. Activate when the user needs to update docs after code changes, generate API documentation, create README updates, keep JSDoc/TSDoc in sync, or automate documentation workflows.
What this skill does
# Doc Sync Automation
Keep documentation synchronized with code changes automatically.
## When to Use
- Code changed and docs need updating
- Generating API documentation from code
- Creating or updating README files
- Keeping inline comments/JSDoc current
- Setting up documentation automation
## Documentation Types
| Type | Location | Sync Trigger |
|------|----------|--------------|
| Inline (JSDoc/TSDoc) | In code files | Code changes |
| API Reference | `/docs/api/` | Endpoint changes |
| README | Root or feature folders | Feature changes |
| Changelog | `CHANGELOG.md` | Any release |
| Architecture | `/docs/architecture/` | Structure changes |
## Inline Documentation (JSDoc/TSDoc)
### AI Prompt for JSDoc Generation
```markdown
Generate JSDoc comments for this function:
```typescript
async function createUser(
email: string,
password: string,
options?: { role?: string; sendWelcome?: boolean }
): Promise<User> {
// implementation
}
```
Include:
- Description
- @param for each parameter
- @returns description
- @throws if applicable
- @example usage
```
### Generated Output
```typescript
/**
* Creates a new user account with the specified credentials.
*
* @param email - The user's email address (must be unique)
* @param password - The user's password (min 8 characters)
* @param options - Optional configuration
* @param options.role - User role, defaults to 'user'
* @param options.sendWelcome - Send welcome email, defaults to true
* @returns The newly created user object
* @throws {ValidationError} If email is invalid or password too short
* @throws {DuplicateError} If email already exists
*
* @example
* const user = await createUser('[email protected]', 'securepass123');
*
* @example
* const admin = await createUser('[email protected]', 'adminpass', {
* role: 'admin',
* sendWelcome: false
* });
*/
```
### Batch Update JSDoc
```markdown
Update JSDoc for all exported functions in this file.
Keep existing descriptions if accurate, update if code changed.
```[paste file content]```
For each function, ensure:
- Description matches current behavior
- All parameters documented
- Return type documented
- Examples are valid
```
## API Documentation
### OpenAPI/Swagger from Code
```markdown
Generate OpenAPI 3.1 specification for this Express route:
```typescript
router.post('/users',
authenticate,
validate(createUserSchema),
async (req, res) => {
const user = await userService.create(req.body);
res.status(201).json(user);
}
);
```
Request schema:
```[paste validation schema]```
Response type:
```[paste User type]```
```
### Generated OpenAPI
```yaml
paths:
/users:
post:
summary: Create a new user
description: Creates a new user account. Requires authentication.
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserRequest'
example:
email: "[email protected]"
password: "securepassword123"
role: "user"
responses:
'201':
description: User created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Validation error
'401':
description: Unauthorized
'409':
description: Email already exists
```
## README Generation
### AI Prompt for README Updates
```markdown
Update this README section based on code changes:
**Current README section:**
```markdown
## Installation
npm install mypackage
```
**Code changes made:**
- Added pnpm support
- Added peer dependencies
- Changed minimum Node version to 20
Generate updated section reflecting these changes.
```
### README Sync Checklist
When code changes, check these README sections:
- [ ] **Installation** - Dependencies changed?
- [ ] **Quick Start** - API changed?
- [ ] **Configuration** - New options?
- [ ] **Examples** - Still valid?
- [ ] **Requirements** - Version requirements?
## Changelog Generation
### AI Prompt for Changelog
```markdown
Generate changelog entry for these commits:
```
abc123 feat(auth): add OAuth2 support for Google
def456 fix(api): handle null response from payment gateway
ghi789 chore(deps): update React to 19.0
jkl012 docs(readme): add deployment section
```
Follow Keep a Changelog format. Categorize as:
- Added, Changed, Deprecated, Removed, Fixed, Security
```
### Generated Changelog
```markdown
## [1.2.0] - 2026-02-04
### Added
- OAuth2 authentication support for Google accounts (#123)
- Deployment documentation in README
### Fixed
- Null response handling in payment gateway integration (#456)
### Changed
- Updated React from 18.x to 19.0
```
## Automation Setup
### Pre-commit Hook for Doc Sync
```json
// package.json
{
"husky": {
"hooks": {
"pre-commit": "npm run docs:check"
}
},
"scripts": {
"docs:check": "node scripts/check-docs-sync.js",
"docs:generate": "typedoc --out docs/api src/"
}
}
```
### GitHub Action for Docs
```yaml
# .github/workflows/docs.yml
name: Documentation
on:
push:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate API docs
run: npm run docs:generate
- name: Check for changes
id: changes
run: |
git diff --quiet docs/ || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit docs
if: steps.changes.outputs.changed == 'true'
run: |
git config user.name 'Documentation Bot'
git config user.email '[email protected]'
git add docs/
git commit -m 'docs: auto-update API documentation'
git push
```
## Doc-Code Sync Patterns
### Pattern 1: Colocated Docs
```
src/
├── users/
│ ├── userService.ts
│ ├── userService.test.ts
│ └── README.md # Feature-specific docs
```
### Pattern 2: Central Docs with References
```
docs/
├── api/
│ └── users.md # References src/users/
src/
├── users/
│ └── userService.ts # @see docs/api/users.md
```
### Pattern 3: Generated from Code
```typescript
// Code with JSDoc
/**
* @module UserService
* @description User management functionality
*/
// Auto-generated to docs/api/UserService.md
```
## Verification
After documentation updates:
```bash
# Check for broken links
npx markdown-link-check docs/**/*.md
# Validate OpenAPI spec
npx @redocly/cli lint openapi.yaml
# Check code examples still work
npx ts-node scripts/test-doc-examples.ts
```
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.