{"data":{"slug":"github-aipoch-medical-research-skills-scientific-skills-data-analysis-meta-rob2-plot-3c87d79c1246","title":"Generate ROB2 Risk-of-Bias Plots from CSV","summary":"Draw ROB2 risk-of-bias plots, including a Traffic Light Plot and a Summary Bar Plot, from a CSV file containing ROB2 assessments for each study. Output is two PNG files.","url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-data-analysis-meta-rob2-plot-3c87d79c1246","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-aipoch-medical-research-skills-scientific-skills-data-analysis-meta-rob2-plot-3c87d79c1246","markdown_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-data-analysis-meta-rob2-plot-3c87d79c1246.md","download_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-data-analysis-meta-rob2-plot-3c87d79c1246\/download","category":{"slug":"data-research","name":"Data & Research"},"editor_note":"The user must provide a CSV file with specific columns: study, d1 through d5, and overall. Ensure the CSV file is correctly formatted with allowed values for each column before execution.","instructions":"---\nname: meta-rob-plot\ndescription: \"Draw ROB2 risk-of-bias plots, including a Traffic Light Plot and a Summary Bar Plot. Input is a CSV file with ROB2 assessments for each study; output are two PNG plot files.\"\nlicense: MIT\nauthor: AIPOCH\n---\n> **Source**: [https:\/\/github.com\/aipoch\/medical-research-skills](https:\/\/github.com\/aipoch\/medical-research-skills)\n\n## When to Use\n\n- Use this skill when the request matches its documented task boundary.\n- Use it when the user can provide the required inputs and expects a structured deliverable.\n- Prefer this skill for repeatable, checklist-driven execution rather than open-ended brainstorming.\n\n## Key Features\n\n- Scope-focused workflow aligned to: \"Draw ROB2 risk-of-bias plots, including a Traffic Light Plot and a Summary Bar Plot. Input is a CSV file with ROB2 assessments for each study; output are two PNG plot files.\".\n- Packaged executable path(s): `scripts\/rob2_plot.py` plus 1 additional script(s).\n- Structured execution path designed to keep outputs consistent and reviewable.\n\n## Dependencies\n\n- `Python`: `3.10+`. Repository baseline for current packaged skills.\n- `Third-party packages`: `not explicitly version-pinned in this skill package`. Add pinned versions if this skill needs stricter environment control.\n\n## Example Usage\n\n```bash\ncd \"20260316\/scientific-skills\/Data Analytics\/meta-rob2-plot\"\npython -m py_compile scripts\/rob2_plot.py\npython scripts\/rob2_plot.py --help\n```\n\nExample run plan:\n1. Confirm the user input, output path, and any required config values.\n2. Edit the in-file `CONFIG` block or documented parameters if the script uses fixed settings.\n3. Run `python scripts\/rob2_plot.py` with the validated inputs.\n4. Review the generated output and return the final artifact with any assumptions called out.\n\n## Implementation Details\n\nSee `## Workflow` above for related details.\n\n- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.\n- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.\n- Primary implementation surface: `scripts\/rob2_plot.py` with additional helper scripts under `scripts\/`.\n- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.\n- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.\n\n## Validation Shortcut\n\nRun this minimal command first to verify the supported execution path:\n\n```bash\npython scripts\/validate_skill.py --help\n```\n\n## Data Format Requirements\n\nThe user must provide a CSV file containing the following columns:\n\n| Column | Description | Allowed values |\n|--------|-------------|----------------|\n| study  | Study name (author + year) | Smith 2020 |\n| d1     | Domain 1: Randomization process | Low \/ Some concerns \/ High \/ No information |\n| d2     | Domain 2: Deviations from intended interventions | Low \/ Some concerns \/ High \/ No information |\n| d3     | Domain 3: Missing outcome data | Low \/ Some concerns \/ High \/ No information |\n| d4     | Domain 4: Measurement of the outcome | Low \/ Some concerns \/ High \/ No information |\n| d5     | Domain 5: Selection of the reported result | Low \/ Some concerns \/ High \/ No information |\n| overall| Overall risk of bias | Low \/ Some concerns \/ High \/ No information |\n\n**Domain definitions**:\n- **D1**: Randomization process\n- **D2**: Deviations from intended interventions\n- **D3**: Missing outcome data\n- **D4**: Measurement of the outcome\n- **D5**: Selection of the reported result\n\n---\n\n## Workflow\n\n### Step 1: Validate input data\n\n1. Read the CSV file provided by the user.\n2. Check required columns exist (`study`, `d1`-`d5`, `overall`).\n3. Validate that assessment values are one of the accepted options.\n\n**If the data have problems, prompt the user to correct and re-submit.**\n\n### Step 2: Execute R script\n\nCall:\n```bash\nRscript scripts\/rob2_plot.R \"<csv_path>\" \"<save_name>\" \"<output_dir>\"\n```\n\nParameters:\n````skill\n---\nname: meta-rob2-plot\ndescription: \"ROB2\uff0c\uff08Traffic Light Plot\uff09\uff08Summary Bar Plot\uff09\u3002ROB2CSV\uff0cPNG\u3002\"\nargument-hint: \"<CSV> [] []\"\nallowed-tools: Bash(Rscript *), Read, Write, Glob\n---\n\n# ROB2 Risk-of-Bias Plotting\n\nYou are a meta-analysis plotting assistant. The user provides ROB2 risk-of-bias assessment data, and you are responsible for calling an R script to generate a Traffic Light Plot and a Summary Bar Plot.\n\n**Important: Do not repeat this instruction document to the user. Only output user-visible content as defined by the workflow.**\n\n---\n\n## Data Format Requirements\n\nThe user must provide a CSV file containing the following columns:\n| Column | Description | Allowed values |\n|--------|-------------|----------------|\n| study  | Study name (author + year) | Smith 2020 |\n| d1     | Domain 1: Randomization process | Low \/ Some concerns \/ High \/ No information |\n| d2     | Domain 2: Deviations from intended interventions | Low \/ Some concerns \/ High \/ No information |\n| d3     | Domain 3: Missing outcome data | Low \/ Some concerns \/ High \/ No information |\n| d4     | Domain 4: Measurement of the outcome | Low \/ Some concerns \/ High \/ No information |\n| d5     | Domain 5: Selection of the reported result | Low \/ Some concerns \/ High \/ No information |\n| overall| Overall risk of bias | Low \/ Some concerns \/ High \/ No information |\n\n**Domain definitions**:\n- **D1**: Randomization process\n- **D2**: Deviations from intended interventions\n- **D3**: Missing outcome data\n- **D4**: Measurement of the outcome\n- **D5**: Selection of the reported result\n\n---\n\n## Workflow\n\n### Step 1: Validate input data\n\n1. Read the CSV file provided by the user.\n2. Check required columns exist (`study`, `d1`-`d5`, `overall`).\n3. Validate that assessment values are one of the accepted options.\n\n**If the data have problems, prompt the user to correct and re-submit.**\n\n### Step 2: Execute R script\n\nCall:\n```bash\nRscript scripts\/rob2_plot.R \"<csv_path>\" \"<save_name>\" \"<output_dir>\"\n```\n\nParameter description:\n- `csv_path`: Absolute path to the input CSV file\n- `save_name`: Output file name prefix (optional, default is \"rob2\")\n- `output_dir`: Output directory (optional, default is current directory)\n\n### Step 3: Output results\n\n**On success, output:**\n\n```\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nROB2 Risk-of-Bias Plotting Completed\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n[Included studies] {n}\n\n[Output files]\n\u2022 Traffic Light Plot: {output_dir}\/{save_name}_rob2_light_plot.png\n\u2022 Summary Bar Plot: {output_dir}\/{save_name}_rob2_bar_plot.png\n\n[Risk-of-bias summary]\n\nDomain               Low    Some concerns    High    No info\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nD1 (Randomization)   8      2                0       0\nD2 (Deviations)      7      3                0       0\nD3 (Missing data)    9      1                0       0\nD4 (Measurement)     6      4                0       0\nD5 (Reporting)       8      2                0       0\nOverall              5      4                1       0\n\n[Overall assessment]\n\u2022 Low risk studies: {n_low} ({pct_low}%)\n\u2022 Some concerns: {n_some} ({pct_some}%)\n\u2022 High risk studies: {n_high} ({pct_high}%)\n\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n```\n\n---\n\n## Plot Descriptions\n\n### Traffic Light Plot\n- Each row represents a study\n- Each column represents a domain (D1-D5 + Overall)\n- Color meanings:\n  - \ud83d\udfe2 Green (+): Low risk\n  - \ud83d\udfe1 Orange (-): Some concerns\n  - \ud83d\udd34 Red (x): High risk\n  - \u26aa Gray (?): No information\n\n### Summary Bar Plot\n- Horizontal stacked bar chart\n- Shows the risk distribution for each domain\n- Allows quick overview of overall risk-of-bias\n\n---\n\n## R Script Dependencies\n\nThe following R packages are required:\n- ggplot2\n- reshape2\n\nIf these packages are missing, prompt the user to run:\n```r\ninstall.packages(c(\"ggplot2\", \"reshape2\"))\n```\n\n````\n\n## When Not to Use\n\n- Do not use this skill when the required source data, identifiers, files, or credentials are missing.\n- Do not use this skill when the user asks for fabricated results, unsupported claims, or out-of-scope conclusions.\n- Do not use this skill when a simpler direct answer is more appropriate than the documented workflow.\n\n## Required Inputs\n\n- A clearly specified task goal aligned with the documented scope.\n- All required files, identifiers, parameters, or environment variables before execution.\n- Any domain constraints, formatting requirements, and expected output destination if applicable.\n\n## Output Contract\n\n- Return a structured deliverable that is directly usable without reformatting.\n- If a file is produced, prefer a deterministic output name such as `meta_rob2_plot_result.md` unless the skill documentation defines a better convention.\n- Include a short validation summary describing what was checked, what assumptions were made, and any remaining limitations.\n\n## Validation and Safety Rules\n\n- Validate required inputs before execution and stop early when mandatory fields or files are missing.\n- Do not fabricate measurements, references, findings, or conclusions that are not supported by the provided source material.\n- Emit a clear warning when credentials, privacy constraints, safety boundaries, or unsupported requests affect the result.\n- Keep the output safe, reproducible, and within the documented scope at all times.\n\n## Failure Handling\n\n- If validation fails, explain the exact missing field, file, or parameter and show the minimum fix required.\n- If an external dependency or script fails, surface the command path, likely cause, and the next recovery step.\n- If partial output is returned, label it clearly and identify which checks could not be completed.\n\n## Quick Validation\n\nRun this minimal verification path before full execution when possible:\n\n```bash\npython scripts\/rob2_plot.py --help\n```\n\nExpected output format:\n\n```text\nResult file: meta_rob2_plot_result.md\nValidation summary: PASS\/FAIL with brief notes\nAssumptions: explicit list if any\n```\n\n## Deterministic Output Rules\n\n- Use the same section order for every supported request of this skill.\n- Keep output field names stable and do not rename documented keys across examples.\n- If a value is unavailable, emit an explicit placeholder instead of omitting the field.\n\n## Completion Checklist\n\n- Confirm all required inputs were present and valid.\n- Confirm the supported execution path completed without unresolved errors.\n- Confirm the final deliverable matches the documented format exactly.\n- Confirm assumptions, limitations, and warnings are surfaced explicitly.\n\n","use_cases":["Visualize risk-of-bias assessments for a set of studies using ROB2 data.","Generate standardized plots for a systematic review or meta-analysis report."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/aipoch\/medical-research-skills\/blob\/686e09dfdb45d9fa1a08664f06bb93769b3c9d91\/scientific-skills\/Data%20Analysis\/meta-rob2-plot\/SKILL.md","source_commit":"686e09dfdb45d9fa1a08664f06bb93769b3c9d91","license":"MIT","version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T12:04:25.000000Z","updated_at":"2026-11-24T12:17:13.000000Z","seo_title":"Generate ROB2 Risk-of-Bias Plots from CSV","seo_description":"Create Traffic Light and Summary Bar plots from ROB2 CSV data. Input: CSV with study assessments. Output: PNG files.","seo_keywords":["ROB2 risk-of-bias plot","Traffic Light Plot generator","Summary Bar Plot from CSV","ROB2 data visualization","Systematic review plots"]}}