← 返回 Skills 市场
parkbeomjun-gkgkgk

Doc Structurer

作者 parkbeomjun-gkgkgk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
73
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install doc-structurer
功能描述
파싱된 문서 텍스트를 분석하여 문서 유형을 자동 분류하고, 핵심 정보를 구조화된 데이터(JSON)로 변환하는 스킬. doc-parser 결과를 받아 후속 처리하는 파이프라인 스킬.
使用说明 (SKILL.md)

doc-structurer: 문서 구조화/DB화 스킬

목적

doc-parser에서 추출한 원시 텍스트와 메타데이터를 분석하여, 문서의 성격을 자동 분류하고 핵심 필드를 구조화된 데이터로 변환한다. 이 결과는 notion-sync 스킬이 Notion DB에 저장할 수 있는 형태로 출력된다.

문서 유형 자동 분류

분류 카테고리

카테고리 키워드/패턴 예시
공문/관공서 수신, 발신, 시행, 문서번호, 관인 입찰공고, 사업계획 승인
계약서 계약, 갑/을, 조항, 위약금, 계약기간 용역계약서, 임대차계약
제안서 제안, 사업개요, 추진전략, 기대효과 RFP 응답, 기술제안서
보고서 보고, 결과, 분석, 현황, 추진실적 월간보고서, 감사보고서
회의록 회의, 참석자, 안건, 결정사항 이사회 회의록
기획서 기획, 목적, 일정, 예산, 추진방안 사업기획서, 행사기획
견적서/청구서 견적, 단가, 수량, 합계, 부가세 견적서, 세금계산서
증명서/확인서 증명, 확인, 발급, 용도 재직증명서, 사업자등록증
기타 위 패턴에 해당하지 않음 일반 문서

분류 로직

문서 분류는 다음 우선순위로 진행한다:

  1. 파일명 기반 1차 분류: 파일명에 포함된 키워드로 빠르게 추정
  2. 본문 키워드 빈도 분석: 각 카테고리별 키워드 출현 빈도를 계산
  3. 문서 구조 패턴 분석: 테이블 비율, 단락 구조, 서식 패턴으로 보정
  4. LLM 기반 최종 판별: 위 결과가 모호한 경우 LLM에게 문서 앞부분(500자)을 보여주고 분류 요청

신뢰도 점수: 각 분류에 0.0~1.0 사이의 confidence 점수를 부여한다. 0.7 미만이면 사용자에게 확인을 요청한다.

구조화 필드 추출

상세 필드 정의

모든 문서에서 다음 필드를 추출 시도한다:

{
  "doc_id": "자동 생성 UUID",
  "title": "문서 제목",
  "doc_type": "분류된 문서 유형",
  "doc_type_confidence": 0.95,
  "summary": "3줄 이내 핵심 요약",

  "assignee": "담당자/작성자",
  "organization": "발신 기관/회사",
  "recipient": "수신처",

  "dates": {
    "document_date": "문서 작성일",
    "deadline": "마감일/기한",
    "start_date": "시작일",
    "end_date": "종료일",
    "event_dates": ["행사/일정 관련 날짜들"]
  },

  "priority": "상/중/하",
  "status": "신규",
  "tags": ["자동 생성 태그들"],

  "financial": {
    "total_amount": null,
    "currency": "KRW",
    "line_items": []
  },

  "related_docs": ["관련 문서 참조"],
  "attachments": ["첨부파일 목록"],

  "key_items": ["핵심 사항/안건 목록"],
  "action_items": ["필요 조치사항"],

  "raw_metadata": {
    "filename": "원본 파일명",
    "file_type": "hwpx/docx/pdf",
    "page_count": 3,
    "ocr_applied": false
  }
}

문서 유형별 추출 전략

공문/관공서:

  • 문서번호, 수신처, 발신처를 상단에서 추출
  • "시행일자", "기한" 등 날짜 패턴 집중 탐색
  • 첨부 목록은 "붙임" 키워드 이후에서 파싱

계약서:

  • 계약 당사자(갑/을), 계약기간, 계약금액 추출
  • 조항별 핵심 내용 요약
  • 특약사항 별도 태깅

견적서/청구서:

  • 테이블에서 품목, 수량, 단가, 합계 파싱
  • 부가세, 총액 자동 계산 검증
  • 유효기간 추출

회의록:

  • 참석자 목록, 안건, 결정사항, 후속조치 분리 추출
  • 일자/장소 정보

날짜 정규화

문서에서 발견되는 다양한 날짜 형식을 YYYY-MM-DD로 통일한다:

입력 형식 정규화
2024년 3월 15일 2024-03-15
2024.03.15 2024-03-15
24/03/15 2024-03-15
3월 15일 (연도 없음) 현재 연도 적용 후 확인 요청

관련 문서 연결

같은 폴더 내 문서들 사이의 관계를 탐지한다:

  • 파일명 유사도: "계약서_v1.docx"와 "계약서_v2.docx"는 관련 문서
  • 본문 참조: 문서 내에서 다른 문서를 언급하는 경우 ("첨부된 견적서 참조")
  • 날짜/프로젝트 연관: 동일 프로젝트명이나 기간이 겹치는 문서

우선순위 자동 판정

조건 우선순위
마감일이 3일 이내
마감일이 7일 이내
마감일이 없거나 7일 초과
금액 1억 이상 상 (상향)
"긴급", "시급" 키워드 포함 상 (상향)

출력

구조화된 결과는 JSON 배열로 출력하며, notion-sync 스킬에 직접 전달 가능한 형태여야 한다. 사용자에게는 처리된 문서 수, 유형별 분포, 주의가 필요한 항목(낮은 분류 신뢰도, 누락 필드 등)을 요약 보고한다.

다음 단계

구조화된 데이터는 notion-sync 스킬을 통해 Notion 데이터베이스에 저장되고, 날짜 정보가 포함된 항목은 calendar-sync 스킬로 Apple 캘린더에 등록된다.

安全使用建议
This skill appears to do what it claims (parse parsed_results.json and produce structured JSON), but it ships its own system/chat prompts which can influence the agent's behavior. Before installing or running it, (1) review the full doc_structurer.py for any network calls (requests, urllib, socket), subprocess/exec usage, or obfuscated code; (2) read system-prompt.md and chatgpt-prompt.md to ensure they don't contain instructions that could cause data exfiltration or override safety constraints; (3) run the script in an isolated/sandbox environment on non-sensitive sample data to observe behavior; (4) avoid granting autonomous execution privileges until you trust the author or have sanitized the prompts and code. If you want, I can scan the full doc_structurer.py (untruncated) for network or execution patterns and list exact lines of concern.
能力评估
Purpose & Capability
Name/description describe document classification and JSON structuring; required binary is only python3; the included script and SKILL.md focus on reading parsed_results.json and producing structured JSON for downstream syncs, which is proportionate to the stated purpose.
Instruction Scope
Runtime instructions and system-prompt.md tell the agent to immediately run doc_structurer.py on a provided path and to use LLM assistance when confidence is low. This is functionally consistent, but the pre-scan flagged a 'system-prompt-override' pattern: the skill ships its own system/chat prompts (system-prompt.md, chatgpt-prompt.md) which can influence model behavior. That capability is normal for a skill but can be abused to change agent decision-making, so inspect prompt files and be cautious about autonomous invocation.
Install Mechanism
No install spec — instruction-only with a Python script. Nothing is downloaded or written by an installer; risk from installation mechanism is low.
Credentials
The skill requests no environment variables, no external credentials, and no config paths. That aligns with a local parsing/structuring tool.
Persistence & Privilege
always is false, model invocation is allowed (the platform default). The skill does not request permanent presence or system-level config changes in the manifest.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install doc-structurer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /doc-structurer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - 첫 번째 ClawHub 퍼블리시
元数据
Slug doc-structurer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Doc Structurer 是什么?

파싱된 문서 텍스트를 분석하여 문서 유형을 자동 분류하고, 핵심 정보를 구조화된 데이터(JSON)로 변환하는 스킬. doc-parser 결과를 받아 후속 처리하는 파이프라인 스킬. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 73 次。

如何安装 Doc Structurer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install doc-structurer」即可一键安装,无需额外配置。

Doc Structurer 是免费的吗?

是的,Doc Structurer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Doc Structurer 支持哪些平台?

Doc Structurer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Doc Structurer?

由 parkbeomjun-gkgkgk(@parkbeomjun-gkgkgk)开发并维护,当前版本 v1.0.0。

💬 留言讨论