From rapid
Generate, update, and maintain project documentation from git history and RAPID artifacts
npx claudepluginhub pragnition/pragnition-public-plugins --plugin rapidThis skill is limited to using the following tools:
You are the RAPID documentation generator. This skill produces and updates project documentation by scaffolding templates, extracting changelogs from RAPID artifacts, and performing diff-aware section updates. All documentation is derived from existing project state -- never fabricated.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
You are the RAPID documentation generator. This skill produces and updates project documentation by scaffolding templates, extracting changelogs from RAPID artifacts, and performing diff-aware section updates. All documentation is derived from existing project state -- never fabricated.
Follow these steps IN ORDER. Do not skip steps.
Load environment variables before any CLI calls:
if [ -z "${RAPID_TOOLS:-}" ] && [ -n "${CLAUDE_SKILL_DIR:-}" ] && [ -f "${CLAUDE_SKILL_DIR}/../../.env" ]; then export $(grep -v '^#' "${CLAUDE_SKILL_DIR}/../../.env" | xargs); fi
if [ -z "${RAPID_TOOLS}" ]; then echo "[RAPID ERROR] RAPID_TOOLS is not set. Run /rapid:install or ./setup.sh to configure RAPID."; exit 1; fi
Use this environment preamble in ALL subsequent Bash commands within this skill.
if [ -z "${RAPID_TOOLS:-}" ] && [ -n "${CLAUDE_SKILL_DIR:-}" ] && [ -f "${CLAUDE_SKILL_DIR}/../../.env" ]; then export $(grep -v '^#' "${CLAUDE_SKILL_DIR}/../../.env" | xargs); fi
if [ -z "${RAPID_TOOLS}" ]; then echo "[RAPID ERROR] RAPID_TOOLS is not set. Run /rapid:install or ./setup.sh to configure RAPID."; exit 1; fi
node "${RAPID_TOOLS}" display banner documentation
Accept optional flags from the user invocation:
--scope <full|changelog|api|architecture> -- Controls which documentation files to generate. Default: full.--diff-only -- Read-only mode: show what changed in documentation without generating new files.Parse these from the skill arguments. If --scope is not provided, default to full. If --diff-only is present, set a flag to skip file generation steps.
# (env preamble)
node "${RAPID_TOOLS}" docs list
Parse the JSON output. Display a summary to the user:
Existing documentation: {count} files found in
docs/.
If count is 0, note that this is a fresh documentation directory.
If --diff-only is set: Skip this step entirely. Proceed to Step 4.
If NOT --diff-only:
# (env preamble)
node "${RAPID_TOOLS}" docs generate --scope {scope}
Parse the JSON output. Report how many files were created vs skipped (already existed).
If files were created, for each new template file:
If no files were created (all already existed), inform the user that all templates are already in place.
Determine the current milestone from ROADMAP.md:
.planning/ROADMAP.md to find the latest milestone ID.# (env preamble)
node "${RAPID_TOOLS}" docs diff {milestoneId}
Parse the JSON output. If entries exist, format them into Keep a Changelog markdown format and write to docs/CHANGELOG.md using the Write tool:
# Changelog
All notable changes to RAPID are documented here. This changelog is generated from ROADMAP.md set descriptions using `/rapid:documentation`.
Format follows [Keep a Changelog](https://keepachangelog.com/).
## [{milestoneId}]
### Added
- {description} (`{setName}`)
### Changed
- {description} (`{setName}`)
### Fixed
- {description} (`{setName}`)
Only include category sections (Added, Changed, Fixed, Breaking) that have entries. If no entries were found for the milestone, write the changelog template skeleton without any version sections.
If --diff-only was specified:
Run git diff docs/ to show what has changed in the docs directory since the last commit. Display the diff summary to the user.
If NOT --diff-only:
Display a summary table of all documentation files with their status (created, updated, unchanged). Suggest the user review changes with git diff docs/ before committing.
Display completion message:
Documentation generation complete. {N} files created, {M} files updated, {K} changelog entries extracted.
Review changes with
git diff docs/before committing.
Display the completion footer:
if [ -z "${RAPID_TOOLS:-}" ] && [ -n "${CLAUDE_SKILL_DIR:-}" ] && [ -f "${CLAUDE_SKILL_DIR}/../../.env" ]; then export $(grep -v '^#' "${CLAUDE_SKILL_DIR}/../../.env" | xargs); fi
if [ -z "${RAPID_TOOLS}" ]; then echo "[RAPID ERROR] RAPID_TOOLS is not set. Run /rapid:install or ./setup.sh to configure RAPID."; exit 1; fi
node "${RAPID_TOOLS}" display footer "/rapid:status"
--diff-only mode is read-only (no file modifications).