Index of every page on this site: llms.txt
All skills
cat-xierluo avatar

/pdf-organizer

@5fb69a0
Run it yourself

当需要整理法律 PDF 时使用:检测文字层,生成页面索引、整理草稿和下游交接文件,按内容拆分、合并或直接重命名 OCR 后双层扫描件并规范命名;支持跨源页引用拼合与页覆盖审计(孤儿页/重复引用);可做旋转与倾斜校正,不做 OCR 或压缩。

Use this Skill: https://skilld.dev/gh/cat-xierluo/legal-skills/pdf-organizer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesmanifest-contract.md

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

清单契约与回归边界

本次修复决策

  • 有效 segment ID 是执行与审计共同使用的字符串标识;保留现有默认编号规则,拒绝碰撞,而不是把两个输出静默合并成一个审计键。
  • 所有来源形态一致拒绝零页 PDF,返回明确编译错误,不把空引用表当作有效输出。
  • strict 必须基于完整编译结果。编译失败或无法完成审计时不写新的 PDF;已有输出不删除、不覆盖。warn / off 保留原有逐段成功行为。
  • resolved page_refs 与 handoff source_refs 保留 [{file, pages: [整数]}] 类型和 handoff v1 标识,只改变错误的跨组聚合:按连续来源分组以表达真实输出页序。同一文件可出现多项。仓内现有 handoff 构造器直接转交列表;外部消费者须保留列表次序。
  • 不重写写入/变换管线。执行前检查通过后发生的 I/O、旋转或倾斜校正失败不保证回滚。非零退出码时输出目录可能非空,handoff 也可能包含 status 为错误的条目;下游须逐段核验,不能只看文件存在或 review_required。

运行回归

在已具备 pypdf 的环境运行(无网络、真实案卷、OCR 或模型请求):

python3 -m unittest discover -s skills/pdf-organizer/scripts -p 'test_*.py' -v

夹具在临时目录动态生成,使用不同页面宽度标记 A1、B1、A2,并实际读取输出 PDF 与从 handoff 重建的 PDF 页序。测试还覆盖 ID 冲突、审计异常、未知模式、越界范围展开前的 tripwire、严格失败与非严格部分成功对照、现有文件保留和整文件字节级复制。

未验证与不承诺

  • 这是确定性脚本的有界契约回归,不是完整自然语言 Skill 的多轮稳定性或法律业务验收。
  • 未处理真实案件、OCR 质量、文书边界语义、真实倾斜校正或外部下游 Skill 全链路。
  • 越界范围检查不构成全局资源沙箱;大型合法 PDF、重复引用、运行时源文件被修改等仍需调用方控制。普通 CLI 不承诺整个目录的原子发布或失败自动清理。

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The pdf-organizer skill is a professional and securely implemented tool for legal document management. It uses established libraries like pypdf and system utilities like ocrmypdf to split, merge, and rename legal documents based on content. The skill follows security best practices, including safe command execution using argument lists and robust filename sanitization, with no malicious patterns detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

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

Last checked against GitHub yesterday.

Activeupdated 2 months ago
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
0.6.1

README badge

README badge for cat-xierluo/legal-skills/pdf-organizer