Skip to content

add pdf-sg-review skill#94

Open
max-cx wants to merge 2 commits intoredhat-documentation:mainfrom
max-cx:pdf-review
Open

add pdf-sg-review skill#94
max-cx wants to merge 2 commits intoredhat-documentation:mainfrom
max-cx:pdf-review

Conversation

@max-cx
Copy link
Copy Markdown

@max-cx max-cx commented Apr 17, 2026

Summary by CodeRabbit

  • New Features

    • Added a PDF style‑guide review skill: converts PDFs to text, splits content for parallelized analysis, detects style violations, generates structured timestamped reports, and offers an optional interactive remediation flow with editable suggestions.
  • Chores

    • Updated ignore rules to exclude generated skill artifacts, temporary files, chunk outputs, and report directory.

⚠️ Please test it as part of review.

⚠️ This skill makes the following existing skills redundant:

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a pdf-sg-review skill pointer, a detailed SKILL.md implementing a multi-phase PDF→text chunking, parallel agent analysis, report-merge and optional interactive remediation loop; updates .gitignore to ignore generated skill artifacts. (≤50 words)

Changes

Cohort / File(s) Summary
Skill registration
/.claude/skills/pdf-sg-review
Adds a skill pointer referencing ../../plugins/docs-tools/skills/pdf-sg-review.
Ignore patterns
.gitignore
Adds ignore rules for generated skill outputs under plugins/docs-tools/skills/pdf-sg-review/: style-guides/, chunks/, temp/, and reports/.
Skill workflow docs
plugins/docs-tools/skills/pdf-sg-review/SKILL.md
Adds a comprehensive, multi-phase workflow: argument resolution (PR/commit/path/HEAD), chunk existence check, pdftotext check and PDF upload/convert, chunk splitting, temp/ and reports/ creation, per-chunk parallel agents consuming chunk+commit-diff, merging/deduping/renumbering findings into a strict report format, and an optional interactive Apply/Skip/Modify remediation phase.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Skill as pdf-sg-review Skill
    participant FS as Filesystem
    participant PD as pdftotext (Poppler)
    participant Task as Task/Agents
    participant Repo as Git/Source

    User->>Skill: invoke /pdf-sg-review (PR/commit/path/HEAD)
    Skill->>FS: check `${CLAUDE_SKILL_DIR}/chunks/` existence
    alt chunks missing
        Skill->>PD: check availability
        PD-->>Skill: available / not available
        alt available
            User->>Skill: upload PDFs
            Skill->>PD: convert PDFs -> text
            Skill->>FS: write numbered chunk files to `chunks/`
        else not available
            Skill->>User: instruct to install poppler-utils
        end
    end
    Skill->>FS: create `temp/`, write `temp/commit-diff.txt`
    Skill->>Task: spawn one agent per chunk (provide chunk + diff)
    Task-->>Skill: structured findings per chunk
    Skill->>FS: merge findings, dedupe, renumber, write `reports/` markdown
    alt issues exist
        Skill->>User: present issues for Apply/Skip/Modify
        User->>Skill: choose action
        Skill->>Repo: apply edits via Edit tool
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title 'add pdf-sg-review skill' directly and clearly summarizes the main change: introducing a new skill named pdf-sg-review.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Real People Names In Style References ✅ Passed Pull request contains no references to real people by name in style references, plugin commands, skill documentation, or example prompts.
Git Safety Rules ✅ Passed All git operations in the PR are read-only (git diff, git show, git log, git rev-parse). No git push, force push, or hardcoded remote names found.
No Untrusted Mcp Servers ✅ Passed PR contains no MCP server installations; new skill uses only existing tools and Claude's built-in capabilities.
Skill And Script Conventions ✅ Passed The pull request adheres to skill and script conventions with proper use of directory references and no prohibited plugin: prefix or slash-command syntax.
Plugin Registry Consistency ✅ Passed No plugin.json or marketplace.json files exist in repository. PR adds pdf-sg-review skill without creating plugin registry entries requiring marketplace.json sync.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/docs-tools/skills/ibm-sg-review/SKILL.md`:
- Around line 38-42: Replace all hardcoded home paths like
"~/redhat-docs-agent-tools/..." in SKILL.md with the appropriate environment
variables: use ${CLAUDE_SKILL_DIR} for paths that refer to scripts or files
co-located with this skill and use ${CLAUDE_PLUGIN_ROOT} for cross-skill or
plugin-root references; update every occurrence (including the other mentioned
occurrences corresponding to the same pattern) so commands, examples and file
listings point to the variable-based paths instead of the tilde-prefixed home
path.
- Around line 46-119: SKILL.md currently embeds procedural orchestration in the
"Phase 0: Verify Chunks Exist" section; extract that entire workflow into a
standalone script (e.g., prepare_style_guides) that performs: checking for
chunks, verifying pdftotext, creating the style-guides and chunks directories,
converting PDFs to text and splitting into chunks, and returning structured JSON
results (success/failure, absolute paths, and counts) on stdout and errors on
stderr; update SKILL.md to be declarative and simply dispatch to this script,
invoking the AskUserQuestion tool only based on the script's structured output
(use the same option labels: "Done - I uploaded the PDF(s)" and "Skip - proceed
without PDF review") and ensure SKILL.md no longer contains the conditional/loop
logic currently under "Phase 0: Verify Chunks Exist".
- Around line 10-14: The usage examples currently use the legacy slash-command
form (e.g., "/ibm-sg-review https://github.com/org/repo/pull/123",
"/ibm-sg-review `#123`", "/ibm-sg-review HEAD~1", "/ibm-sg-review
path/to/file.adoc", "/ibm-sg-review") — update them to the current skill
reference convention by removing the leading slash and phrasing them as plain
examples of invoking the skill (e.g., "ibm-sg-review
https://github.com/org/repo/pull/123", "ibm-sg-review 123", "ibm-sg-review
HEAD~1", "ibm-sg-review path/to/file.adoc", "ibm-sg-review" or reformat as
sentences explaining each invocation), and ensure any adjacent explanatory text
uses the new convention consistently (look for occurrences of the token
"ibm-sg-review" in SKILL.md to replace).
- Around line 60-63: Multiple fenced code blocks in SKILL.md are missing
language identifiers (MD040); update each triple-backtick block (the ``` blocks
that contain messages like "No PDF style guide chunks found. I need to set up
your style guides first.", "AI review report", and "You are analyzing
documentation content for style guide violations.") to include an appropriate
language tag (e.g., use ```text for plain text snippets or a more specific tag
if content is code/JSON/YAML) for all ranges flagged (around the listed ranges
60-63, 69-72, 81-86, 123-131, 134-136, 145-147, 154-180) so markdownlint MD040
is satisfied; ensure consistency across similar blocks and do not change the
block contents beyond adding the language identifier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bb9c4319-b03b-49ce-8266-14d90055f118

📥 Commits

Reviewing files that changed from the base of the PR and between b51a490 and d15c106.

📒 Files selected for processing (2)
  • .claude/skills/ibm-sg-review
  • plugins/docs-tools/skills/ibm-sg-review/SKILL.md

Comment thread plugins/docs-tools/skills/ibm-sg-review/SKILL.md Outdated
Comment thread plugins/docs-tools/skills/ibm-sg-review/SKILL.md Outdated
Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md
Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md Outdated
@max-cx max-cx force-pushed the pdf-review branch 2 times, most recently from d59daf7 to 574ae0e Compare April 17, 2026 18:44
@max-cx max-cx changed the title add ibm-sg-review skill add pdf-sg-review skill Apr 17, 2026
@max-cx max-cx force-pushed the pdf-review branch 3 times, most recently from ef7a5a4 to 07b2217 Compare April 17, 2026 19:14
@max-cx max-cx marked this pull request as draft April 17, 2026 19:35
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (2)

46-119: 🛠️ Refactor suggestion | 🟠 Major

Move orchestration logic out of SKILL.md into scripts and keep this file declarative.

The phased branching/looping workflow is embedded inline (chunk checks, install gating, conversion, merge, interactive resolution). Per repo rules, this should be dispatched to scripts/*.py (JSON stdout/stderr) and SKILL.md should only orchestrate script calls + output checks.

Refactor direction (shape only)
-### Phase 0: Verify Chunks Exist
-...inline conditional workflow...
-### Phase 1: Setup
-...inline workflow...
-### Phase 2: Parallel Analysis
-...inline workflow...
-### Phase 3: Merge Results
-...inline workflow...
-### Phase 4: Interactive Issue Resolution
-...inline workflow...
+### Execute workflow
+1. Prepare PDF/style-guide inputs and chunk inventory:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/prepare_chunks.py "$ARGUMENTS" --json`
+2. Build review input (target diff/files):
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/prepare_review_input.py "$ARGUMENTS" --json`
+3. Run parallel chunk analysis:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/run_parallel_review.py --json`
+4. Merge findings and render final report:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/merge_report.py --json`
+5. Optional interactive issue resolution:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/resolve_issues.py --interactive --json`

Based on learnings: “Do NOT embed procedural logic inline in SKILL.md… defer that logic to a script that emits structured output (typically JSON on stdout, errors on stderr).”

Also applies to: 120-214, 257-277

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` around lines 46 - 119, The
SKILL.md currently embeds procedural orchestration (chunk checks, pdftotext
gating, PDF-to-text conversion, splitting and interactive prompts) which must be
moved into executable scripts; create one or more scripts under scripts/ (e.g.,
scripts/prepare_pdf_chunks.py and scripts/manage_pdf_review.py) that perform the
phased workflow and emit structured JSON to stdout and errors to stderr, then
replace the inline step-by-step shell logic in SKILL.md with declarative calls
to those scripts and simple checks of their JSON output (use AskUserQuestion
only to present choices and pass results into the scripts); ensure the scripts
implement the checks described (pdftotext presence, creating style-guides and
chunks, conversion/splitting, chunk-count verification, and the "Done/Skip"
flow) and that SKILL.md only orchestrates invocation and output handling.

60-63: ⚠️ Potential issue | 🟡 Minor

Add language identifiers to all fenced code blocks (MD040).

Several fenced blocks are missing a language tag and currently fail markdownlint.

Minimal fix pattern
-```
+```text
 No PDF style guide chunks found. I need to set up your style guides first.

- +text
AI review report
...


-```
+```text
You are analyzing documentation content for style guide violations.
...
</details>

As per coding guidelines, follow static-analysis-enforced markdown quality for changed `.md` files.


Also applies to: 69-72, 81-86, 128-136, 139-141, 150-152, 159-185

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/docs-tools/skills/pdf-sg-review/SKILL.md around lines 60 - 63,
Several fenced code blocks in SKILL.md lack language identifiers (triggering
markdownlint MD040); locate the anonymous triple-backtick blocks such as the one
containing "No PDF style guide chunks found. I need to set up your style guides
first.", the blocks around "AI review report ..." and "You are analyzing
documentation content for style guide violations.", and the other ranges noted
(lines ~69-72, 81-86, 128-136, 139-141, 150-152, 159-185) and add appropriate
language tags (e.g., text for plain text output, json for JSON, ```bash
for shell examples) so every fenced code block includes a language identifier.
Ensure consistency across SKILL.md by choosing the most semantically accurate
language tag for each block.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Inline comments:
In @plugins/docs-tools/skills/pdf-sg-review/SKILL.md:

  • Around line 52-53: Replace every hardcoded home-directory path like
    '/redhat-docs-agent-tools/plugins/docs-tools/skills/pdf-sg-review/chunks/' with
    the skill/plugin substitution variables: use ${CLAUDE_SKILL_DIR}/chunks for
    assets bundled with this skill and ${CLAUDE_PLUGIN_ROOT}/... (or
    workspace-relative Cursor paths) for cross-skill calls; update the other
    occurrences of the same pattern (the commands that call ls, cp, or run scripts
    referencing '
    /redhat-docs-agent-tools/...') to use these variables so paths
    remain portable and follow the skill conventions.
  • Around line 10-15: The examples in SKILL.md use the old slash-command syntax
    (e.g., "/pdf-sg-review ..."); update them to the modern skill invocation format
    by removing the leading slash and presenting usages like "pdf-sg-review
    https://github.com/org/repo/pull/123", "pdf-sg-review 123" (or "pdf-sg-review
    #123"), "pdf-sg-review HEAD~1", "pdf-sg-review path/to/file.adoc", and
    "pdf-sg-review" for default behavior so all examples reference the pdf-sg-review
    skill without a leading "/" while preserving the same argument forms and intent.

Duplicate comments:
In @plugins/docs-tools/skills/pdf-sg-review/SKILL.md:

  • Around line 46-119: The SKILL.md currently embeds procedural orchestration
    (chunk checks, pdftotext gating, PDF-to-text conversion, splitting and
    interactive prompts) which must be moved into executable scripts; create one or
    more scripts under scripts/ (e.g., scripts/prepare_pdf_chunks.py and
    scripts/manage_pdf_review.py) that perform the phased workflow and emit
    structured JSON to stdout and errors to stderr, then replace the inline
    step-by-step shell logic in SKILL.md with declarative calls to those scripts and
    simple checks of their JSON output (use AskUserQuestion only to present choices
    and pass results into the scripts); ensure the scripts implement the checks
    described (pdftotext presence, creating style-guides and chunks,
    conversion/splitting, chunk-count verification, and the "Done/Skip" flow) and
    that SKILL.md only orchestrates invocation and output handling.
  • Around line 60-63: Several fenced code blocks in SKILL.md lack language
    identifiers (triggering markdownlint MD040); locate the anonymous
    triple-backtick blocks such as the one containing "No PDF style guide chunks
    found. I need to set up your style guides first.", the blocks around "AI review
    report ..." and "You are analyzing documentation content for style guide
    violations.", and the other ranges noted (lines ~69-72, 81-86, 128-136, 139-141,
    150-152, 159-185) and add appropriate language tags (e.g., text for plain text output, json for JSON, ```bash for shell examples) so every fenced code
    block includes a language identifier. Ensure consistency across SKILL.md by
    choosing the most semantically accurate language tag for each block.

</details>

<details>
<summary>🪄 Autofix (Beta)</summary>

Fix all unresolved CodeRabbit comments on this PR:

- [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)
- [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `513d4b8f-c966-4144-ac48-45722a9d1dae`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d15c10610d3030833ee13a0fc735abaa4c4b4f6d and 803e9a2dcc42be0f1fb03e5410337ff784e07a87.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.claude/skills/pdf-sg-review`
* `.gitignore`
* `plugins/docs-tools/skills/pdf-sg-review/SKILL.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* .claude/skills/pdf-sg-review
* .gitignore

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md Outdated
Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (3)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (3)

11-11: ⚠️ Potential issue | 🟡 Minor

Remove legacy slash-command example from skill usage docs.

/pdf-sg-review 123 should not appear in skill invocation examples; keep only modern skill-style invocations.

Suggested doc fix
-- pdf-sg-review `#123` or /pdf-sg-review 123 - review a PR by number
+- pdf-sg-review `#123` or 123 - review a PR by number

Based on learnings: “Do not use old slash-command syntax (e.g., /skill-name).”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` at line 11, Update the
SKILL.md usage line to remove the legacy slash-command example: delete the
`/pdf-sg-review 123` variant and leave only the modern skill-style invocation
(e.g., `pdf-sg-review `#123`` or similar), ensuring the example reflects the
current skill invocation pattern; locate the string "pdf-sg-review `#123` or
/pdf-sg-review 123 - review a PR by number" and replace it so the slash command
is omitted.

46-213: ⚠️ Potential issue | 🟠 Major

Move workflow control logic out of SKILL.md and into scripts.

This section is still procedural/orchestrator-heavy (branching, checks, loops, phase control). Keep SKILL.md declarative and dispatch to script(s) that return structured output.

Suggested structure (declarative dispatch)
-### Phase 0: Verify Chunks Exist
-... (inline conditional workflow)
-### Phase 1: Setup
-... (inline orchestration)
-### Phase 2: Parallel Analysis
-... (inline orchestration)
-### Phase 3: Merge Results
-... (inline orchestration)
-### Phase 4: Interactive Issue Resolution
-... (inline orchestration)
+## Execute workflow
+1. Prepare inputs/chunks:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/prepare_chunks.py "$ARGUMENTS" --json`
+2. Run parallel review:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/run_parallel_review.py --json`
+3. Merge report:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/merge_report.py --json`
+4. Optional interactive resolution:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/resolve_issues.py --interactive --json`

Based on learnings: “Do NOT embed procedural logic inline in SKILL.md… defer that logic to a script that emits structured output.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` around lines 46 - 213, The
SKILL.md currently contains procedural/orchestrator logic in "Phase 0"–"Phase
3"; extract those procedures into one or more scripts (e.g., a
setup/orchestrator script) that perform the checks, chunk creation, agent
spawning and merge steps and emit structured machine-readable output (JSON) and
clear user-facing messages; then shrink SKILL.md to a declarative dispatch that
documents the expected inputs/outputs and shows the command to run the script(s)
and the exact JSON schema they return (including how AskUserQuestion choices are
surfaced), moving loop/branch logic (chunk existence, pdftotext check,
mkdir/split, Task tool invocations, parsing of agent responses,
deduping/renumbering and cleanup) out of SKILL.md and into named scripts so
callers/tests can invoke them and validate structured results.

60-63: ⚠️ Potential issue | 🟡 Minor

Add language identifiers to fenced code blocks (MD040).

Several fenced blocks are untyped; markdownlint flags these. Use text, bash, or a specific language tag as appropriate.

Example patch pattern
-      ```
+      ```text
       No PDF style guide chunks found. I need to set up your style guides first.
       ```

-   ```
+   ```text
    AI review report
    ...
    ```

-```
+```text
 You are analyzing documentation content for style guide violations.
 ...
</details>

As per coding guidelines, follow static-analysis-enforced markdown quality for changed `.md` files.


Also applies to: 69-72, 81-86, 128-136, 139-141, 150-152, 159-185

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @plugins/docs-tools/skills/pdf-sg-review/SKILL.md around lines 60 - 63, The
markdown has several untyped fenced code blocks in SKILL.md (e.g., the blocks
containing "No PDF style guide chunks found. I need to set up your style guides
first.", "AI review report", and the assistant prompt examples); update each
triple-backtick block to include an appropriate language tag such as text or
bash (for plain messages use text, for shell examples use bash, or a
specific language when showing code) so that markdownlint rule MD040 is
satisfied; search for all untyped blocks in SKILL.md (including the ranges referenced in the review) and replace the opening with ```text or the
correct language tag while leaving the block contents unchanged.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @plugins/docs-tools/skills/pdf-sg-review/SKILL.md:

  • Line 11: Update the SKILL.md usage line to remove the legacy slash-command
    example: delete the /pdf-sg-review 123 variant and leave only the modern
    skill-style invocation (e.g., pdf-sg-review #123`` or similar), ensuring the
    example reflects the current skill invocation pattern; locate the string
    "pdf-sg-review #123 or /pdf-sg-review 123 - review a PR by number" and replace
    it so the slash command is omitted.
  • Around line 46-213: The SKILL.md currently contains procedural/orchestrator
    logic in "Phase 0"–"Phase 3"; extract those procedures into one or more scripts
    (e.g., a setup/orchestrator script) that perform the checks, chunk creation,
    agent spawning and merge steps and emit structured machine-readable output
    (JSON) and clear user-facing messages; then shrink SKILL.md to a declarative
    dispatch that documents the expected inputs/outputs and shows the command to run
    the script(s) and the exact JSON schema they return (including how
    AskUserQuestion choices are surfaced), moving loop/branch logic (chunk
    existence, pdftotext check, mkdir/split, Task tool invocations, parsing of agent
    responses, deduping/renumbering and cleanup) out of SKILL.md and into named
    scripts so callers/tests can invoke them and validate structured results.
  • Around line 60-63: The markdown has several untyped fenced code blocks in
    SKILL.md (e.g., the blocks containing "No PDF style guide chunks found. I need
    to set up your style guides first.", "AI review report", and the assistant
    prompt examples); update each triple-backtick block to include an appropriate
    language tag such as text or bash (for plain messages use text, for shell examples use bash, or a specific language when showing code) so that
    markdownlint rule MD040 is satisfied; search for all untyped blocks in SKILL.md (including the ranges referenced in the review) and replace the opening with ```text or the correct language tag while leaving the block contents
    unchanged.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `11621b92-d1a5-4b08-a942-82a1945d1e0e`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 803e9a2dcc42be0f1fb03e5410337ff784e07a87 and d3cbaeee92b4f6029d892d5a50740a1f93493332.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.claude/skills/pdf-sg-review`
* `.gitignore`
* `plugins/docs-tools/skills/pdf-sg-review/SKILL.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* .claude/skills/pdf-sg-review
* .gitignore

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (2)

10-12: ⚠️ Potential issue | 🟡 Minor

Remove legacy slash-style invocation from usage examples.

The example ... or /pdf-sg-review 123 reintroduces deprecated slash invocation style. Keep examples in modern skill invocation format only.

Based on learnings: “Do not use old slash-command syntax (e.g., /skill-name).”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` around lines 10 - 12, The
usage examples include a deprecated slash-style invocation "/pdf-sg-review 123";
remove that legacy example and keep only modern invocation forms such as
"pdf-sg-review `#123`" and "pdf-sg-review https://github.com/org/repo/pull/123"
(and the commit form "pdf-sg-review HEAD~1") so the SKILL.md only shows current
skill invocation syntax; update the example line to drop the "/pdf-sg-review
123" entry and ensure the remaining examples are formatted consistently.

46-119: ⚠️ Potential issue | 🟠 Major

Move orchestration logic from SKILL.md into scripts.

This file still embeds conditional workflow, branching, and execution control directly in markdown. Keep SKILL.md declarative and dispatch to scripts under skills/pdf-sg-review/scripts/ that emit structured output.

Suggested shape
-### Phase 0: Verify Chunks Exist
-...inline conditional logic...
-### Phase 1: Setup
-...inline orchestration...
-### Phase 2: Parallel Analysis
-...inline orchestration...
-### Phase 3: Merge Results
-...inline orchestration...
-### Phase 4: Interactive Issue Resolution
-...inline orchestration...
+### Execute workflow
+1. Prepare/validate chunks:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/prepare_chunks.py "$ARGUMENTS" --json`
+2. Collect review input:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/collect_review_input.py "$ARGUMENTS" --json`
+3. Run parallel analysis:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/run_parallel_review.py --json`
+4. Merge/dedupe/format report:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/merge_report.py --json`
+5. Optional issue-resolution loop:
+   `python3 ${CLAUDE_SKILL_DIR}/scripts/resolve_issues.py --interactive --json`

Based on learnings: “Do NOT embed procedural logic inline in SKILL.md… defer that logic to a script that emits structured output (typically JSON on stdout, errors on stderr).”

Also applies to: 120-213, 257-277

🧹 Nitpick comments (1)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (1)

4-4: Add a migration note for the claimed redundancy with existing skills.

The PR states this skill makes multiple ibm-sg-* skills redundant, but this file does not document deprecation/migration behavior. Add an explicit differentiation/consolidation note to prevent overlapping usage paths.

Based on learnings: “When adding or significantly modifying plugin files (commands, skills, agents), check for overlapping functionality against existing plugins and open PRs. Flag HIGH similarity (>=85%) immediately with consolidation recommendation.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` at line 4, The SKILL.md
description currently claims this skill makes multiple ibm-sg-* skills redundant
but lacks any migration/deprecation guidance; update SKILL.md to add an explicit
"Migration and Consolidation" note that (1) lists the overlapping ibm-sg-*
skills by name, (2) states recommended migration paths or deprecation timelines
for those skills, and (3) documents the consolidation policy including the HIGH
similarity flag (>=85%) and the action to open a consolidation PR or
coordination ticket; reference the skill name/description text and the ibm-sg-*
identifier so readers can find the affected items.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Around line 138-141: The text claims “directory and subdirectories” but the
command shown (ls ${CLAUDE_SKILL_DIR}/chunks/) is non‑recursive; either update
the wording to say just “directory” to match the existing ls command, or change
the example to perform a recursive listing (use a recursive file listing such as
a recursive ls or find) so the command actually lists subdirectories; edit
SKILL.md replacing the mismatched wording or replacing the ls command
accordingly.
- Around line 149-152: Phase 1 Step 4 currently only shows the path
${CLAUDE_SKILL_DIR}/temp/commit-diff.txt and is not executable; update the code
block under "Phase 1 Step 4" to include concrete shell commands that write the
resolved diff into that file (for example, use the GitHub CLI to output a PR
diff or use git show/git diff to output a commit or range) and include commented
examples for PR vs commit/range cases, ensuring the commands redirect output
into "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt".

---

Duplicate comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Around line 10-12: The usage examples include a deprecated slash-style
invocation "/pdf-sg-review 123"; remove that legacy example and keep only modern
invocation forms such as "pdf-sg-review `#123`" and "pdf-sg-review
https://github.com/org/repo/pull/123" (and the commit form "pdf-sg-review
HEAD~1") so the SKILL.md only shows current skill invocation syntax; update the
example line to drop the "/pdf-sg-review 123" entry and ensure the remaining
examples are formatted consistently.

---

Nitpick comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Line 4: The SKILL.md description currently claims this skill makes multiple
ibm-sg-* skills redundant but lacks any migration/deprecation guidance; update
SKILL.md to add an explicit "Migration and Consolidation" note that (1) lists
the overlapping ibm-sg-* skills by name, (2) states recommended migration paths
or deprecation timelines for those skills, and (3) documents the consolidation
policy including the HIGH similarity flag (>=85%) and the action to open a
consolidation PR or coordination ticket; reference the skill name/description
text and the ibm-sg-* identifier so readers can find the affected items.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 157981b0-b1c5-40c5-a2f1-b00177c95ef1

📥 Commits

Reviewing files that changed from the base of the PR and between d3cbaee and dc40985.

📒 Files selected for processing (1)
  • plugins/docs-tools/skills/pdf-sg-review/SKILL.md

Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md Outdated
Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md Outdated
@max-cx max-cx marked this pull request as ready for review April 20, 2026 18:10
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (3)

25-33: ⚠️ Potential issue | 🟠 Major

Move orchestration/branching out of SKILL.md into scripts.

Line 25 onward embeds argument parsing, branching, setup, and control-flow directly in markdown. This makes the skill brittle and conflicts with the skill architecture conventions.

Based on learnings: “Do NOT embed procedural logic (conditionals, path construction, validation) inline in SKILL.md… defer that logic to a script that emits structured output (typically JSON on stdout, errors on stderr).”

Also applies to: 46-119, 120-213, 257-277


149-152: ⚠️ Potential issue | 🟠 Major

Phase 1 Step 4 is non-executable as written.

Line 151 is only a target path; it does not retrieve or write diff content. Add concrete commands that produce ${CLAUDE_SKILL_DIR}/temp/commit-diff.txt.

Suggested fix
 4. Retrieve the commit diff content and save it to a temporary file:
    ```bash
-   ${CLAUDE_SKILL_DIR}/temp/commit-diff.txt
+   # PR URL/number input
+   gh pr diff <number> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"
+   # Commit/range input examples:
+   # git show <ref> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"
+   # git diff <range> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"
    ```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` around lines 149 - 152,
Phase 1 Step 4 currently only lists the target path
`${CLAUDE_SKILL_DIR}/temp/commit-diff.txt` without any command to produce it;
update the step in SKILL.md to include concrete commands that write the diff
into that file (e.g., use `gh pr diff <number> >
"${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"` for PRs and provide alternatives
like `git show <ref> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"` or `git diff
<range> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"`), ensuring the
documentation around the `${CLAUDE_SKILL_DIR}/temp/commit-diff.txt` target
explains which command to use depending on PR vs commit/range inputs.

11-11: ⚠️ Potential issue | 🟡 Minor

Remove legacy slash-command invocation example.

Line 11 still includes /pdf-sg-review 123; keep only modern skill invocation examples.

Based on learnings: “Do not use old slash-command syntax (e.g., /skill-name).”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` at line 11, Remove the
legacy slash-command example "/pdf-sg-review 123" from the SKILL.md line that
currently reads "pdf-sg-review `#123` or /pdf-sg-review 123 - review a PR by
number" and keep only the modern invocation examples (e.g., "pdf-sg-review `#123`"
or "pdf-sg-review 123"); update the text so it no longer contains the leading
slash variant and reads clearly like "pdf-sg-review `#123` - review a PR by
number" (or include both modern forms without the slash).
🧹 Nitpick comments (1)
plugins/docs-tools/skills/pdf-sg-review/SKILL.md (1)

4-4: Add explicit consolidation/migration guidance for replaced skills.

The description says this skill makes multiple existing skills redundant. Please document deprecation/replacement mapping (and planned cleanup) to prevent parallel, conflicting usage.

Based on learnings: “When adding or significantly modifying plugin files… check for overlapping functionality… Flag HIGH similarity (>=85%) immediately with consolidation recommendation.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md` at line 4, Update the
SKILL.md description to include an explicit deprecation and replacement section
listing which existing skills this PDF style-review skill supersedes (add
mapping like "replaces: [skill-name-A, skill-name-B]") and a short planned
cleanup timeline; also add a consolidation guidance note instructing operators
to check for overlapping functionality and, per the project guideline, to
immediately flag any HIGH similarity (>=85%) between skills with a consolidation
recommendation; ensure these notes appear alongside the existing "description"
paragraph so reviewers see the replacement mapping and the similarity threshold
rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Around line 37-42: The spec currently contradicts itself: the "spawn multiple
parallel agents" step describes that "each agent writes findings to a separate
temporary file" while later steps expect in-band responses; pick one contract
and make the orchestration and docs consistent. Either (A) keep the file-write
contract: update the agent behavior so each agent writes its report to a
uniquely named temp file (per "each agent writes findings to a separate
temporary file"), ensure the final merge step reads those temp files and deletes
them afterwards, and update the SKILL.md text to remove any references to
in-band responses; or (B) switch to in-band responses: remove the file-write
behavior from the agents, change the orchestration that spawns agents to collect
their returned outputs (IPC/promises) and pass them to the "final merge step",
and update SKILL.md to remove mentions of temp files—ensure only one contract
(file-based or in-band) is documented and implemented for the "spawn multiple
parallel agents", "each agent writes findings..." and "final merge step combines
all findings" flow.

---

Duplicate comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Around line 149-152: Phase 1 Step 4 currently only lists the target path
`${CLAUDE_SKILL_DIR}/temp/commit-diff.txt` without any command to produce it;
update the step in SKILL.md to include concrete commands that write the diff
into that file (e.g., use `gh pr diff <number> >
"${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"` for PRs and provide alternatives
like `git show <ref> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"` or `git diff
<range> > "${CLAUDE_SKILL_DIR}/temp/commit-diff.txt"`), ensuring the
documentation around the `${CLAUDE_SKILL_DIR}/temp/commit-diff.txt` target
explains which command to use depending on PR vs commit/range inputs.
- Line 11: Remove the legacy slash-command example "/pdf-sg-review 123" from the
SKILL.md line that currently reads "pdf-sg-review `#123` or /pdf-sg-review 123 -
review a PR by number" and keep only the modern invocation examples (e.g.,
"pdf-sg-review `#123`" or "pdf-sg-review 123"); update the text so it no longer
contains the leading slash variant and reads clearly like "pdf-sg-review `#123` -
review a PR by number" (or include both modern forms without the slash).

---

Nitpick comments:
In `@plugins/docs-tools/skills/pdf-sg-review/SKILL.md`:
- Line 4: Update the SKILL.md description to include an explicit deprecation and
replacement section listing which existing skills this PDF style-review skill
supersedes (add mapping like "replaces: [skill-name-A, skill-name-B]") and a
short planned cleanup timeline; also add a consolidation guidance note
instructing operators to check for overlapping functionality and, per the
project guideline, to immediately flag any HIGH similarity (>=85%) between
skills with a consolidation recommendation; ensure these notes appear alongside
the existing "description" paragraph so reviewers see the replacement mapping
and the similarity threshold rule.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fbe385b4-6271-4854-899b-13fff6d65d02

📥 Commits

Reviewing files that changed from the base of the PR and between dc40985 and aa98221.

📒 Files selected for processing (1)
  • plugins/docs-tools/skills/pdf-sg-review/SKILL.md

Comment thread plugins/docs-tools/skills/pdf-sg-review/SKILL.md
@aireilly
Copy link
Copy Markdown
Member

why do we need to have a PDF in the mix here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants