/doc-detective:doc-detective-install-github-actionfrom doc-detective
Installs and configures the Doc Detective GitHub Action for automated documentation testing in CI. Creates workflow files and configures triggers, PR creation, issue creation, and integrations.
Ships in doc-detective. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 (push with --create-pr-on-change) | Workflow trigger event (pull_request, push, schedule, etc.) |
--no-exit-on-fail | false | Let the CI check pass when Doc Detective tests fail. By default, failing tests fail the check. |
--exit-on-fail | true | Deprecated, because failing the check is now the default |
--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 --no-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: actions/setup-node@v4
with:
node-version: 24
- uses: doc-detective/github-action@v2
with:
# Inputs configured per options
Configuration rules:
| Condition | Action |
|---|---|
| Existing config found at repo root | Set config to the config file name |
| Existing config found outside repo root | Set working_directory to the config's parent directory, and set config to the file name only. config resolves against working_directory, so working_directory: docs with config: docs/.doc-detective.json points at docs/docs/.doc-detective.json. |
--no-exit-on-fail | Set exit_on_fail: false. Otherwise, omit the input: it defaults to true. |
--create-pr-on-change | Set create_pr_on_change: true, add contents: write and pull-requests: write permissions. Unless --trigger is given, trigger on push to the default branch instead of pull_request. On pull_request, the action builds its branch from the source PR's merge commit. The PR it opens then carries the source PR's changes too, and every source PR overwrites the same pr_branch. If the user passes --trigger pull_request, warn them of both. |
--create-issue-on-fail | Set create_issue_on_fail: true, add issues: write permission |
--integrations provided | Set the issue_mentions input to the comma-separated list. Don't use the deprecated integrations input. |
--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.--create-pr-on-change: Tell the user that each run force-pushes one branch, doc-detective-changes by default, and updates its open PR. Nobody should commit to that branch by hand, and a branch protection rule that blocks force-pushes to it stops the PR. Also tell them the PR commits every changed file by default, including images that screenshot steps save, which can show unreleased UI or customer data. Suggest setting pr_paths to the folders the PR should update.token input: Remind the user to add the secret to the repository settings.GITHUB_TOKEN and may need approval before merging..doc-detective/runs/<runId>/, under the config's outputDir. The action keeps the run folder and reports out of git through .git/info/exclude. To keep them after the job, add an actions/upload-artifact step with include-hidden-files: true. Its path is the run folder relative to the repo root. With the config in working_directory and no outputDir set, that's <working_directory>/.doc-detective/runs/, for example docs/.doc-detective/runs/. See references/action-reference.md.$NAME in specs. Doc Detective shows their values as ***NAME*** in logs, results, and the issues the action creates.name: Doc Detective
on:
pull_request:
permissions:
contents: read
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: doc-detective/github-action@v2
name: Doc Detective
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
doc-detective:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: doc-detective/github-action@v2
with:
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: actions/setup-node@v4
with:
node-version: 24
- uses: doc-detective/github-action@v2
with:
create_issue_on_fail: true
issue_mentions: 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: actions/setup-node@v4
with:
node-version: 24
- uses: doc-detective/github-action@v2
with:
working_directory: docs
config: .doc-detective.json
# Open PRs only from pushes to main. On pull_request, the PR would
# carry the source PR's changes and share one pr_branch.
create_pr_on_change: ${{ github.event_name == 'push' }}
pr_labels: doc-detective,automated
create_issue_on_fail: true
issue_labels: doc-detective,test-failure
issue_mentions: 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 testsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub doc-detective/agent-tools --plugin doc-detective9 skills in this plugin
/doc-detective-doc-testingVerify documentation and procedures with Doc Detective test specifications. MANDATORY: Read SKILL.md first. Format: {"goTo":"url"} {"find":"text"} {"click":"text"} - action IS the key. NEVER {"action":"goTo"}. Keywords: test spec, Doc Detective, test JSON, test documentation, test docs, test procedure, verify procedures./doc-detective-generateInterpret documentation procedures into Doc Detective test specifications without executing/doc-detective-initInitialize Doc Detective in a repository with documentation detection, config generation, test creation, and iterative fix loopOther plugins' skills for the same job