From doc-detective
Installs and configures Doc Detective GitHub Action workflow for automated documentation testing in CI. Detects project context, creates YAML file, sets triggers, PR/issue creation, and integrations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/doc-detective:doc-detective-install-github-actionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Skill:** `doc-detective:install-github-action`
Skill: doc-detective:install-github-action
Install and configure the Doc Detective GitHub Action for automated documentation testing in CI. Detects project context, creates the workflow file, and configures optional features like PR creation and issue creation.
/doc-detective-install-github-action [options]
| Option | Default | Description |
|---|---|---|
--trigger <event> | pull_request | Workflow trigger event (pull_request, push, schedule, etc.) |
--exit-on-fail | false | Fail the CI check when Doc Detective tests fail |
--create-pr-on-change | false | Create a PR when files change during test execution (e.g., updated screenshots) |
--create-issue-on-fail | false | Create a GitHub issue when tests fail |
--integrations <list> | (none) | Comma-separated integrations to mention in issues (doc-sentinel, promptless, dosu, claude, opencode, copilot, cursor) |
--ci | false | Non-interactive; use defaults, no prompts |
/doc-detective-install-github-action
/doc-detective-install-github-action --ci
/doc-detective-install-github-action --trigger push --exit-on-fail
/doc-detective-install-github-action --create-pr-on-change --create-issue-on-fail --integrations claude,copilot
Confirm all of the following before starting. If any item is unavailable, stop and ask the user.
| Criteria | How to find it |
|---|---|
| Repository root is accessible | Check working directory — ask user if unclear |
| Git repository initialized | .git exists (file or directory) |
| GitHub remote detected | .git/config references github.com, or gh repo view succeeds |
| Workflows directory exists or can be created | .github/workflows/ exists or parent .github/ can be created |
Before completing:
.github/workflows/doc-detective.yml (or user-chosen name)permissions: blockPhases run in order. Do NOT advance to the next phase if the current phase fails.
.git exists as a file or directory). If not, stop and inform the user..git/config for github.com in a remote URL, or run gh repo view --json url if the gh CLI is available. If not a GitHub repo, stop and inform the user this skill is GitHub-specific..doc-detective.json, doc-detective.config.js. Record the path if found..github/workflows/ — note any existing doc-detective*.yml files to avoid conflicts.input field from existing config if available, otherwise look for common directories (docs/, documentation/, content/, wiki/). Fall back to . if no convention is detected.Build the workflow YAML based on project context and user options.
Base workflow structure:
name: Doc Detective
on:
<trigger>: # from --trigger option, default: pull_request
permissions:
contents: read # base permission; expanded below if features require it
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: doc-detective/github-action@v1
with:
# Inputs configured per options
Configuration rules:
| Condition | Action |
|---|---|
| Existing config found | Set config input to the config file path |
| Config not at repo root | Set working_directory to the config's parent directory |
--exit-on-fail | Set exit_on_fail: true |
--create-pr-on-change | Set create_pr_on_change: true, add contents: write and pull-requests: write permissions |
--create-issue-on-fail | Set create_issue_on_fail: true, add issues: write permission |
--integrations provided | Set integrations input to the comma-separated list |
--trigger schedule | Use cron syntax; suggest cron: '0 6 * * 1' (Monday 6 AM UTC) and prompt for customization unless --ci |
If not in --ci mode, present the generated workflow to the user for confirmation before writing. Explain each enabled feature and the permissions it requires.
.github/workflows/ directory if it doesn't exist..github/workflows/doc-detective.yml already exists.
--ci mode: show the existing file, ask the user for an alternative name or confirm overwrite.--ci mode: use doc-detective-<timestamp>.yml to avoid overwriting.Summarize what was created and list any manual steps needed:
--create-pr-on-change: Remind the user that the default GITHUB_TOKEN works for PR creation, but if the repo requires specific token permissions, they may need to configure a custom token.token input: Remind the user to add the secret to the repository settings.GITHUB_TOKEN and may need approval before merging.name: Doc Detective
on:
pull_request:
permissions:
contents: read
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: doc-detective/github-action@v1
name: Doc Detective
on:
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: doc-detective/github-action@v1
with:
exit_on_fail: true
create_pr_on_change: true
name: Doc Detective
on:
push:
branches: [main]
permissions:
contents: read
issues: write
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: doc-detective/github-action@v1
with:
exit_on_fail: true
create_issue_on_fail: true
integrations: claude,copilot
name: Doc Detective
on:
pull_request:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: doc-detective/github-action@v1
with:
config: docs/.doc-detective.json
exit_on_fail: true
create_pr_on_change: true
pr_labels: doc-detective,automated
create_issue_on_fail: true
issue_labels: doc-detective,test-failure
integrations: claude,copilot
/doc-detective-init — Initialize Doc Detective in a repository (includes GitHub Action setup as final step)/doc-detective-project-bootstrap — Full project bootstrap (includes GitHub Action setup as final step)/doc-detective-test — Run existing Doc Detective testsnpx claudepluginhub doc-detective/agent-tools --plugin doc-detectiveBootstraps Doc Detective in repos by detecting documentation files, generating minimal config and tests for procedures, iteratively running/fixing them, and injecting passing tests into source files. Use for initial setup, init/bootstrap requests, or onboarding to doc testing.
Configures Grammarly integration in GitHub Actions for automated documentation quality scoring during CI/CD pipelines with Node.js scripts.
This skill should be used when the user says "set up CI", "create GitHub Actions", "scaffold CI pipeline", "add CI/CD", "configure continuous integration", "create test workflow", "create release workflow", "add pre-commit hooks", "set up linting pipeline", "configure ruff in CI", "configure biome in CI", "add typo checking", or wants to add, update, or customize CI/CD pipelines for their project. For initial project setup including basic CI, see init-project. Use ci-scaffolding for adding or customizing CI/CD in existing projects.