← Back to Skills Marketplace
cyz9827

safety-kb-import

by cyz9827 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
62
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install safety-kb-import
Description
安全生产法规标准导入工具。当用户需要导入新法规或标准到知识库、PDF文本提取、条款拆分、批量导入、数据质量验证时使用。触发词:导入法规、添加标准、入库、导入知识库、补充标准、PDF提取文本、拆分条款、KB导入、safety-review import
Usage Guidance
This package appears to do what it says (local import of regulations into a safety-review SQLite DB), but take these precautions before using it: 1) Backup the target database (~/.openclaw-autoclaw/... or the Windows-equivalent path) before running imports — the tool updates/overwrites records. 2) Be aware the script will read and write your local DB and may be pointed to a different DB via the KB_PATH env var (not declared in the SKILL.md); verify KB_PATH is not set to an unexpected location. 3) Review the manifest JSON carefully (titles/full_text) before import to avoid importing incorrect or unofficial content; the workflow allows fallback to non-official sources (PPT/网络来源) when official text is unavailable. 4) Install PDF/OCR dependencies (pdfplumber, pdf2image, pytesseract + system Tesseract) from trusted sources. 5) If you obtained this skill from an unknown source, consider auditing the full script (scripts/kb_import.py) for any behavior you don't expect or running it in a sandboxed environment first. If you want higher assurance, ask the author to declare KB_PATH in requires.env and to provide an install spec or signed release.
Capability Analysis
Type: OpenClaw Skill Name: safety-kb-import Version: 1.0.0 The skill bundle is a legitimate tool for importing and managing safety regulations within a local SQLite knowledge base. The Python script `scripts/kb_import.py` handles PDF text extraction, structured clause splitting, and database synchronization using safe parameterized queries. The instructions in `SKILL.md` are well-documented and strictly aligned with the stated purpose of knowledge base maintenance, with no evidence of malicious intent, data exfiltration, or harmful prompt injection.
Capability Assessment
Purpose & Capability
The name/description (importing regulations into a safety KB) matches the included script and SKILL.md: the tool extracts text, splits clauses, and inserts/updates records in a local SQLite database (regulations/clauses/std_registry). This is coherent with the stated purpose. Minor mismatch: SKILL.md shows a UNIX-style DB path (~/.openclaw-autoclaw/...), while the script's DEFAULT_DB_PATH uses a Windows-style backslash path; both point to a user-home DB but differ in formatting across OSes.
Instruction Scope
Runtime instructions focus on extracting text (pdfplumber, optional OCR), building a JSON manifest, testing clause-splitting, and importing into the local safety-review DB. These actions fall within the stated import scope. Items to note: the SKILL.md and script reference using other skills or tools (web_fetch, safety-kb-query) for fetch/check operations; the workflow also instructs fallback to non-official sources (PPT/网络来源) when OCR/content is unavailable — this is a procedural choice but should be documented when used. The script also looks for an environment variable KB_PATH as an override for the DB path (not declared in requires.env).
Install Mechanism
There is no packaged install spec (instruction-only with an included script). SKILL.md asks the user to pip-install pdfplumber and optional OCR libraries and to install the Tesseract engine if needed. This is a low-risk pattern, but because dependencies are installed manually, users should install them from trusted sources and be aware of system-level requirements for OCR.
Credentials
The skill declares no required credentials or config paths, which aligns with its local-DB import purpose. However, the script respects an undocumented environment variable KB_PATH to override the DB path. No cloud credentials or unrelated secrets are requested. The use of the user's home directory DB implies the skill will read and write local files — appropriate for an importer but worth noting.
Persistence & Privilege
The skill is not marked 'always', and normal autonomous invocation is allowed. It only targets the specified local knowledge DB for inserts/updates; it does not request system-wide privileges or attempt to modify other skills' configurations. The main privilege is write access to the local SQLite file, which is expected for this tool.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install safety-kb-import
  3. After installation, invoke the skill by name or use /safety-kb-import
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of the safety-kb-import skill for importing safety regulations and standards into the knowledge base. - Supports PDF, web, .docx, and .pptx text extraction, including OCR for scanned documents. - Provides multi-pattern clause splitting (standard, policy, raw lines) for flexible document processing. - Enables batch import via manifest files with automatic conflict detection and data validation. - Integrates with the safety-review database, updating or inserting records, and ensures provenance tracking. - Offers detailed post-import validation and workflows to handle special cases such as scanned PDFs and large documents. 安全生产法规标准导入工具,支持PDF文本提取、智能条款拆分、批量入库
Metadata
Slug safety-kb-import
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is safety-kb-import?

安全生产法规标准导入工具。当用户需要导入新法规或标准到知识库、PDF文本提取、条款拆分、批量导入、数据质量验证时使用。触发词:导入法规、添加标准、入库、导入知识库、补充标准、PDF提取文本、拆分条款、KB导入、safety-review import. It is an AI Agent Skill for Claude Code / OpenClaw, with 62 downloads so far.

How do I install safety-kb-import?

Run "/install safety-kb-import" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is safety-kb-import free?

Yes, safety-kb-import is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does safety-kb-import support?

safety-kb-import is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created safety-kb-import?

It is built and maintained by cyz9827 (@cyz9827); the current version is v1.0.0.

💬 Comments