template-sds-generator
Generate a deterministic, template-preserving 16-section SDS/MSDS package from 1 DOCX template, 1 prompt/rule file, and 1-3 source SDS/MSDS files, with DOCX/PDF output plus structured JSON, provenance CSV, and review checklist artifacts.
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- template-sds-generator
- version
- 0.2.1
- homepage
- https://github.com/YJLi-new/OPENCLAW-SKILLS/tree/main/template-sds-generator-skill
- metadata
- { "openclaw": { "os": [ "darwin", "linux", "win32" ], "emoji": "🧪", "homepage": "https://github.com/YJLi-new/OPENCLAW-SKILLS/tree/main/template-sds-generator-skill", "requires": { "anyBins": [ "python3", "python", "py" ] }, "skillKey": "template-sds-generator" } }
- description
- Generate a deterministic, template-preserving 16-section SDS/MSDS package from 1 DOCX template, 1 prompt/rule file, and 1-3 source SDS/MSDS files, with DOCX/PDF output plus structured JSON, provenance CSV, and review checklist artifacts.
- user-invocable
- true
03 SKILL.md 正文
Use this skill when the user wants a traceable SDS/MSDS package that must preserve a supplied Word template.
Use {baseDir} to refer to this skill folder.
Preconditions
- Before production use, replace the placeholder company block in
{baseDir}/config/fixed_company.ymlwith the owning company's approved supplier information. - The runtime needs Python 3.11+.
- OCR is optional. If scanned PDFs are expected,
tesseractmust be available on the host or in the sandbox/container runtime. - PDF export requires
sofficeorlibreofficeon the execution runtime. - This package is self-bootstrapping at runtime: the Python launcher creates
.venvand installsrequirements.lockinside the skill folder on first use. - ClawHub publishes text files only. The fallback base template
assets/templates/sds_base.docxis generated locally on first use when it is missing.
Canonical entrypoint
Prefer the bundled cross-platform Python launcher instead of shell-only wrappers:
python3 {baseDir}/scripts/run_openclaw_skill.py --template-docx <template.docx> --prompt-file <rules.txt> --sources <source1> [<source2> <source3>] --outdir <target> --mode draft
Windows launcher variants:
py {baseDir}\scripts\run_openclaw_skill.py --template-docx <template.docx> --prompt-file <rules.txt> --sources <source1> [<source2> <source3>] --outdir <target> --mode draft
python {baseDir}\scripts\run_openclaw_skill.py --template-docx <template.docx> --prompt-file <rules.txt> --sources <source1> [<source2> <source3>] --outdir <target> --mode draft
Workflow
- If the runtime looks incomplete, run:
python3 {baseDir}/scripts/runtime_doctor.pyOn Windows usepyorpython. - Run the canonical entrypoint. The launcher creates or repairs
.venv, installsrequirements.lock, and generates a generic base template ifassets/templates/sds_base.docxis missing. - Use
--enable-ocronly when scanned PDFs are expected. If no OCR backend is available, the run fails clearly. - Return the generated files from
outputs/runs/.../final. - When provenance or review details matter, inspect
outputs/runs/.../audit.
Output expectations
Primary deliverables:
final/sds_document.docxfinal/sds_document.pdfwhen a PDF engine is availablefinal/structured_data.jsonfinal/field_source_map.csvfinal/review_checklist.md
Audit outputs may also include:
audit/content_policy_report.jsonaudit/ocr_audit.jsonaudit/field_source_map.mdrun_manifest.json
Guardrails
- Preserve the supplied template layout. Do not clear the document body when the user provides a client template.
- Do not invent safety-critical values such as GHS classifications, UN numbers, packing groups, flash points, LD50 values, or regulatory identifiers.
- Treat
structured_data.json,field_source_map.csv, andreview_checklist.mdas first-class deliverables alongside the DOCX/PDF.
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.