원클릭으로
write-camunda-docs
// Writes documentation for the current code changes and raises a PR to camunda/camunda-docs — or updates an existing docs PR if one is already open for this branch.
// Writes documentation for the current code changes and raises a PR to camunda/camunda-docs — or updates an existing docs PR if one is already open for this branch.
Review an engineering spec, design doc, or WIP RFC through a product-sense lens — problem framing, user fit, product fit, and whether the spec is framed clearly enough for the team to act on it. Calibrates to the spec's maturity stage (early direction, partial spec, ready-for-define) so early-stage work gets direction feedback, not premature spec polish. Use before implementation begins, on work-in-progress specs. Output is a structured review posted inline in the conversation — does NOT write files to the working directory. Triggers on: "review this spec", "review this RFC", "review this design", "PM review", "spec review", "product-sense review", a GitHub issue/PR link containing a spec body, a Google Doc design doc link, or a pasted spec. Use when user: asks for a structured review of an engineering proposal before Define/build; needs to surface cross-product dependencies or hidden deferrals; wants to validate problem framing, scope, and edge states before committing to implementation; or wants a second o
Create an Architecture Decision Record (ADR) as a Markdown file. Triggers on: "write an ADR", "capture this decision", "migrate this doc into an ADR", architecture folder, decision records, ADR numbering/renumbering, and requests to turn a Google Doc / kickoff note / conversation outcome into a durable decision record. Use when user: asks to create or migrate an ADR, records a just-made architectural decision, adds a decision to an existing ADR folder (e.g. docs/adrs/), or needs to align a draft with the house ADR format.
Searches Camunda 8 documentation for domain knowledge needed during implementation. Use when a change involves Camunda-specific concepts, APIs, configuration, or behavior — such as BPMN, DMN, Zeebe, Connectors, Operate, Tasklist, Identity, or any Camunda platform component.
Validates structural or foundational code changes against Camunda architecture principles. Use when a change alters module boundaries, APIs, data flows, core architecture, domain models, or protocols.
| name | write-camunda-docs |
| description | Writes documentation for the current code changes and raises a PR to camunda/camunda-docs — or updates an existing docs PR if one is already open for this branch. |
| compatibility | Requires gh CLI with write access to camunda/camunda-docs |
| metadata | {"author":"camunda"} |
Use this skill when the current code changes need to be documented in the Camunda 8 public documentation at https://docs.camunda.io/. Typical triggers:
The skill creates a PR against camunda/camunda-docs on first run. On subsequent runs for the same source branch it updates the existing docs PR instead of opening a new one.
Collect the diff and recent commits on the current branch to understand what changed:
# Summary of changed files
git diff main --stat
# Full diff for context (pipe through head to avoid token overflow on large diffs)
git diff main -- . | head -500
# Recent commits on this branch
git log main..HEAD --oneline
Also read the PR description for the current branch if one exists:
gh pr view --json title,body,url 2>/dev/null || echo "No PR found for current branch"
Read any relevant source files touched by the diff to understand the full context of the change.
Based on the diff, determine:
gh search code --repo camunda/camunda-docs "<relevant keyword>" --json path,url | head -20
If no existing page covers the topic, plan to create a new .md file in the appropriate /docs/ subtree.
Consult the /howtos/documentation-guidelines.md in camunda-docs for naming and linking conventions:
gh api repos/camunda/camunda-docs/contents/howtos/documentation-guidelines.md \
--jq '.content' | base64 -d | head -200
Look for an open PR in camunda/camunda-docs that was previously opened for the same source branch or code PR. Use a consistent branch name derived from the current branch:
SOURCE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
DOCS_BRANCH="docs/${SOURCE_BRANCH}"
# Check if that branch/PR already exists
gh pr list --repo camunda/camunda-docs --head "$DOCS_BRANCH" --json number,url,title
Capture whether a PR already exists — this determines whether step 6 creates or updates.
Work in a temporary directory to avoid polluting the current workspace:
DOCS_DIR=$(mktemp -d)
gh repo clone camunda/camunda-docs "$DOCS_DIR" -- --depth 1 --quiet
cd "$DOCS_DIR"
git checkout -b "$DOCS_BRANCH" 2>/dev/null || git checkout "$DOCS_BRANCH"
If the branch already exists remotely, pull it so edits are applied on top:
git pull origin "$DOCS_BRANCH" --rebase 2>/dev/null || true
Based on your analysis in steps 1–2, edit or create the relevant Markdown files in $DOCS_DIR.
Writing guidelines (from camunda-docs conventions):
/docs/ (for the next/unreleased version) unless the change is already in a shipped release, in which case also update the matching /versioned_docs/version-X.Y/ directory.md extension; use relative paths within the same subtree, absolute paths across subtrees (without a /docs/ prefix)/static/img/ (version-independent) or alongside the .md file (versioned)If the change adds or removes a page, update sidebars.js accordingly.
cd "$DOCS_DIR"
git add -A
git commit -m "docs: document <short description of the code change>"
git push origin "$DOCS_BRANCH"
If no PR exists yet (from step 3), create one:
# Retrieve the source PR URL for cross-linking
SOURCE_PR_URL=$(gh pr view --json url -q .url 2>/dev/null || echo "")
gh pr create \
--repo camunda/camunda-docs \
--head "$DOCS_BRANCH" \
--base main \
--title "docs: <concise title matching the code change>" \
--body "$(cat <<'EOF'
## Summary
<!-- One paragraph describing what this doc change covers and why it is needed -->
## Related
<!-- Link to the source code PR -->
${SOURCE_PR_URL}
## Checklist
- [ ] Prose follows the [technical writing style guide](https://github.com/camunda/camunda-docs/blob/main/howtos/technical-writing-styleguide.md)
- [ ] All internal links include `.md` extension
- [ ] New pages are added to `sidebars.js`
- [ ] Images have alt text
EOF
)"
If a PR already exists, push to the same branch (already done in step 6) and update its description if the scope changed:
EXISTING_PR=$(gh pr list --repo camunda/camunda-docs --head "$DOCS_BRANCH" \
--json number -q '.[0].number')
gh pr edit "$EXISTING_PR" --repo camunda/camunda-docs \
--body "$(cat <<'EOF'
## Summary
<!-- Updated: <date> — describe what was changed in this iteration -->
## Related
${SOURCE_PR_URL}
## Checklist
- [ ] Prose follows the [technical writing style guide](https://github.com/camunda/camunda-docs/blob/main/howtos/technical-writing-styleguide.md)
- [ ] All internal links include `.md` extension
- [ ] New pages are added to `sidebars.js`
- [ ] Images have alt text
EOF
)"
Output:
Clean up the temporary directory:
rm -rf "$DOCS_DIR"