All skills
simota avatar

/harvest

@51065a1
by shingo imotasimota/agent-skills85 stars
15

Collecting GitHub PR data and generating work reports. Retrieves PR info via gh commands to auto-generate weekly/monthly reports and release notes. Use when work reporting or PR analysis is needed.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/harvest

This session only. Nothing lands on disk.

referencepdf-export-guide.md

≈822 tokens on demand. Your agent reads this file only when SKILL.md points to it.

PDF Export Guide

Purpose: Use this reference when Harvest must turn Markdown or HTML reports into stable PDF output without changing the report content.

Contents

  • Preferred export paths
  • Repo scripts and assets
  • Tool selection
  • Mermaid handling
  • Troubleshooting

Preferred Export Paths

Use this order unless the request explicitly requires another tool:

Priority Path Use when
1 scripts/html-to-pdf.sh You already have HTML output and want the most robust repo-native path
2 node scripts/puppeteer-pdf.js input.html output.pdf You have Node/Puppeteer available and need HTML -> PDF
3 md-to-pdf You only have Markdown and need a fast direct export
4 pandoc You need higher-quality typesetting or LaTeX-based control
5 marp --pdf (Marp CLI) Slide-shaped report from Markdown front-matter (marp.app)
6 ASCII + browser print Mermaid or CSS compatibility is poor and a safe fallback is needed

Pandoc 3.x notes (pandoc.org/releases.html):

  • 3.8.3 added asciidoc, pptx, xlsx as input formats and bbcode as output.
  • 3.9 added WASM-targeted builds for in-browser conversion.
  • --pdf-engine accepts groff, lualatex, xelatex, wkhtmltopdf, weasyprint, typst. For Japanese reports, lualatex or xelatex with system CJK fonts remains the most reliable path; typst is a fast modern alternative when LaTeX is unavailable.

Repo Scripts And Assets

Asset Role
scripts/html-to-pdf.sh A4 HTML -> PDF conversion with method selection and validation
scripts/puppeteer-pdf.js Puppeteer fallback for HTML -> PDF
styles/harvest-style.css Report styling for PDF-friendly layout
templates/client-report.html HTML shell for client reports

Tool Selection

HTML -> PDF

./scripts/html-to-pdf.sh client-report-YYYY-MM-DD.html
./scripts/html-to-pdf.sh --method chrome client-report-YYYY-MM-DD.html output.pdf

Notes:

  • Default timeout is 60s.
  • Supported methods: chrome, wkhtmltopdf, puppeteer.
  • The script validates file existence, minimum size, and PDF magic number.

Direct Markdown -> PDF

md-to-pdf client-report-YYYY-MM-DD.md --stylesheet styles/harvest-style.css

Pandoc

pandoc client-report-YYYY-MM-DD.md -o report.pdf \
  --pdf-engine=lualatex \
  -V geometry:margin=20mm

Mermaid Handling

Use one of these strategies:

Strategy Use when
Native rendering md-to-pdf or browser-based export can execute Mermaid safely
Pre-render to SVG You need deterministic PDF output
ASCII fallback Rendering is unstable or PDF portability matters more than visual richness

ASCII fallback is the safest default for client-facing PDF reports.

Troubleshooting

Problem Action
Japanese text is garbled Use system Japanese fonts and the repo stylesheet
Mermaid does not render Pre-render diagrams or switch to ASCII
Output file is too small Treat as failed export and retry with another method
Output is not a valid PDF Fail the export; do not claim success
CSS layout breaks across pages Prefer HTML template + stylesheet + Chrome/Puppeteer path

Source: SKILL.md on GitHub

3 warnings5mo5 checks · Risk MEDIUM
  • Gen Agent Trust Hub5mo

    The skill provides comprehensive tools for PR analysis and reporting but contains several helper scripts vulnerable to command injection. Specifically, generate-report.js and html-to-pdf.sh construct shell commands using string concatenation of input arguments (like repository names or file paths) without sanitization, which could allow arbitrary command execution if an attacker influences these parameters through a malicious prompt or repository metadata.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    5/24 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 51065a1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 months ago

README badge

README badge for simota/agent-skills/harvest