docs-workflow-pr-analysis
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
Run PR/MR analysis for the docs orchestrator workflow. Dispatches a subagent to run understand-pull-request, keeping the heavy orchestration out of the main context. Produces a structured PR-ANALYSIS.md. Conditional on has_pr — skipped when no PR URL is available.
In this repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- action-commentsSkill
- article-extractorSkill
- docs-convert-gdoc-mdSkill
- docs-orchestratorSkill
- docs-review-content-qualitySkill
- docs-review-modular-docsSkill
- docs-review-securitySkill
- docs-review-styleSkill
- docs-review-technicalSkill
- docs-ticket-readinessSkill
- docs-workflow-code-analysisSkill
- docs-workflow-create-jiraSkill
- docs-workflow-create-merge-requestSkill
- docs-workflow-jira-readySkill
- docs-workflow-pipeline-diagnosticsSkill
- docs-workflow-planningSkill
- docs-workflow-quality-gateSkill
- docs-workflow-requirementsSkill
- docs-workflow-scope-req-auditSkill
- docs-workflow-security-reviewSkill
- docs-workflow-startSkill
- docs-workflow-style-reviewSkill
- docs-workflow-tech-reviewSkill
- docs-workflow-writingSkill
- git-pr-readerSkill
- ibm-sg-audience-and-mediumSkill
- ibm-sg-language-and-grammarSkill
- ibm-sg-legal-informationSkill
- ibm-sg-numbers-and-measurementSkill
- ibm-sg-punctuationSkill
- ibm-sg-referencesSkill
- ibm-sg-structure-and-formatSkill
- ibm-sg-technical-elementsSkill
- jira-readerSkill
- jira-writerSkill
- learn-codeSkill
- lint-with-valeSkill
- mdita-writeSkill
- query-codeSkill
- redhat-docs-tocSkill
- rh-ssg-accessibilitySkill
- rh-ssg-formattingSkill
- rh-ssg-grammar-and-languageSkill
- rh-ssg-gui-and-linksSkill
- rh-ssg-legal-and-supportSkill
- rh-ssg-release-notesSkill
- rh-ssg-structureSkill
- rh-ssg-technical-examplesSkill
- rn-known-issuesSkill
- understand-pull-requestSkill
- validate-plugin-prereqsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Verify --pr is a valid GitHub or GitLab PR/MR URL
- Very specific: line 26
Verify --repo directory exists
- Very specific: line 27
Create --output-dir if needed
- Distinctive: line 33
Check if learn-code output exists from a prior code-analysis step:
- Distinctive: line 58
After the agent completes, copy the PR analysis output to the step's output directory:
- Very specific: line 70
If PR-*-ANALYSIS.md is not found after the agent completes, mark the step as failed and report the error.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
docs-workflow-pr-analysis
Orchestrator step skill that wraps understand-pull-request to analyze a specific PR/MR and produce change-specific documentation context.
Arguments
| Flag | Required | Description |
--pr | Yes | PR/MR URL (GitHub or GitLab) |
--repo | Yes | Path to the cloned source repository |
--ticket | Yes | JIRA ticket ID |
--output-dir | Yes | Base output directory (.agent_workspace/<ticket>/pr-analysis/) |
Execution
1. Validate inputs
- Verify
--pris a valid GitHub or GitLab PR/MR URL - Verify
--repodirectory exists - Create
--output-dirif needed
2. Dispatch understand-pull-request subagent
You MUST use the Agent tool to run understand-pull-request in an isolated subagent. Do NOT invoke Skill: understand-pull-request inline — that would load 570+ lines of skill text plus all intermediate orchestration into the main context.
Check if learn-code output exists from a prior code-analysis step:
CODE_ANALYSIS_DIR="$(dirname "${OUTPUT_DIR}")/code-analysis"
ls "${CODE_ANALYSIS_DIR}/ONBOARDING.md" 2>/dev/nullBuild the agent prompt with or without learn-code context:
Agent:
description: "Analyze PR: <PR_URL>"
prompt: |
Run the understand-pull-request skill to analyze this PR/MR.
Skill: understand-pull-request, args: "<PR_URL> --repo <REPO>"
[If learn-code analysis exists at CODE_ANALYSIS_DIR:]
Learn-code analysis is available at <CODE_ANALYSIS_DIR>. The skill
will use it for richer module-level context.
After the skill completes, report the location of the output files
(PR-*-ANALYSIS.md and any pr-context.json).After the agent completes, copy the PR analysis output to the step's output directory:
# Find the understand-pull-request output — it writes to .work/ or the repo's .agent_workspace/
# Look for PR-*-ANALYSIS.md in the agent's output locations
find "${REPO}" -name "PR-*-ANALYSIS.md" -newer "${OUTPUT_DIR}" 2>/dev/null | head -1Copy the found files:
PR-<N>-ANALYSIS.md— Structured change analysis documentpr-context.json— PR metadata and per-module change data (if produced)
If PR-*-ANALYSIS.md is not found after the agent completes, mark the step as failed and report the error.
3. Write step-result.json
{
"schema_version": 1,
"step": "pr-analysis",
"ticket": "<TICKET>",
"completed_at": "<ISO 8601>",
"pr_number": "<N>",
"pr_url": "<PR URL>",
"modules_affected": "<count>",
"platform": "github|gitlab"
}4. Report completion
Print summary:
PR analysis complete:
- PR: <url>
- Modules affected: <N>
- Platform: <github|gitlab>
- Output: <output-dir>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

