Agent Skills
› opensquilla/opensquilla
› meta-pdf-intelligence
meta-pdf-intelligence
GitHub元技能,用于PDF分析、摘要、对比及问答。通过多技能编排实现提取、综合与证据索引,确保结果可追溯并存储结构化记忆。
Trigger Scenarios
需要PDF内容分析
PDF摘录摘要或对比
涉及跨文档的综合推理
要求提供可追溯的证据来源
Install
npx skills add opensquilla/opensquilla --skill meta-pdf-intelligence -g -y
SKILL.md
Frontmatter
{
"kind": "meta",
"name": "meta-pdf-intelligence",
"always": false,
"triggers": [
"看一下这个 PDF",
"看看这个 PDF",
"读一下这个 PDF",
"分析这个 PDF",
"总结这个 PDF",
"帮我看 PDF",
"处理 PDF",
"PDF 抽要",
"PDF intelligence",
"pdf digest",
"compare these PDFs",
"page-backed findings",
"PDF excerpt",
"pasted PDF excerpt",
"PDF page says",
"analyze these PDFs",
"PDF analysis",
"PDF comparison",
"PDF 摘录"
],
"provenance": {
"origin": "opensquilla-original",
"license": "Apache-2.0"
},
"composition": {
"steps": [
{
"id": "intake",
"kind": "llm_chat",
"with": {
"task": "Parse the PDF request into a document-analysis contract. Determine\nwhether this is a single-PDF summary, multi-PDF comparison, or a\ntargeted question-answer task. Preserve every file path or URL the\nuser mentioned. Treat quoted page text, pasted excerpts, and phrases\nlike \"I don't have the PDF upload handy\" as first-class source\nstatus signals.\n\nUser request:\n{{ inputs.user_message | xml_escape | truncate(1200) }}\n\nReturn exactly:\nMODE: <single_summary|multi_compare|question_answer>\nSOURCE_STATUS: <readable_pdf|inline_excerpts_only|mixed_pdf_and_inline|reference_without_content>\nDOCUMENTS:\n - <path or URL>\nUSER_EXCERPTS:\n - PAGE: <page number or unknown>\n QUOTE: <verbatim user-provided excerpt or empty>\nQUESTION: <specific question or empty>\nOUTPUT_LANGUAGE: <language>\nNEEDS_CLARIFICATION: <yes|no>\nMISSING_FIELDS:\n - <source_material|question|none>\nCLARIFY_REASON: <one concise reason, or none>\n",
"system": "You parse PDF-analysis requests into strict extraction contracts."
}
},
{
"id": "pdf_clarify",
"kind": "user_input",
"when": "'NEEDS_CLARIFICATION: yes' in outputs.intake",
"clarify": {
"mode": "form",
"intro": "PDF 分析缺少可用来源或目标问题。请补齐材料,或确认只基于已提供摘录\/文件名给出有限结论。\n",
"fields": [
{
"name": "source_status",
"type": "enum",
"prompt": "来源状态 \/ Source status",
"choices": [
"readable_pdf",
"inline_excerpts_only",
"reference_only"
],
"required": true
},
{
"name": "source_material",
"type": "string",
"prompt": "PDF 路径\/URL、上传说明,或页面摘录 \/ PDF path, URL, upload note, or excerpts",
"required": true,
"max_chars": 2000
},
{
"name": "question",
"type": "string",
"prompt": "具体问题 \/ Specific question",
"max_chars": 300
},
{
"name": "output_language",
"type": "enum",
"prompt": "输出语言 \/ Output language",
"choices": [
"zh",
"en",
"ja",
"other"
],
"default": "zh"
}
],
"nl_extract": true,
"timeout_hours": 24,
"cancel_keywords": [
"算了",
"取消",
"cancel",
"stop",
"abort"
]
},
"depends_on": [
"intake"
]
},
{
"id": "extract",
"when": "'SOURCE_STATUS: inline_excerpts_only' not in outputs.intake and (\n 'SOURCE_STATUS: reference_without_content' not in outputs.intake\n or inputs.get('collected', {}).get('pdf_clarify', {}).get('source_status') == 'readable_pdf'\n) and \"don't have the pdf\" not in (inputs.user_message | lower) and \"do not have the pdf\" not in (inputs.user_message | lower) and \"no pdf upload\" not in (inputs.user_message | lower) and \"pdf upload handy\" not in (inputs.user_message | lower) and not ('page ' in (inputs.user_message | lower) and ' says ' in (inputs.user_message | lower))",
"with": {
"task": "Extract text, tables, page numbers, headings, and document names for\nthis PDF analysis contract:\n{{ outputs.intake | truncate(2000) }}\n\nDo not invent PDF content. If no readable local path, URL, or\nattachment is actually accessible, return UNAVAILABLE with the\nreason instead of a synthetic summary.\n"
},
"skill": "pdf-toolkit",
"depends_on": [
"intake",
"pdf_clarify"
],
"on_failure": "inline_excerpt_extract"
},
{
"id": "inline_excerpt_extract",
"kind": "llm_chat",
"with": {
"task": "The PDF extraction skill could not read the file in this runtime.\nBuild a minimal evidence packet only from filenames, URLs, quoted\nexcerpts, pasted text, and explicit user claims in the request.\nClearly label missing page evidence as unavailable.\n\nUser request:\n{{ inputs.user_message | xml_escape | truncate(4000) }}\n",
"system": "You provide a safe fallback when a PDF file is unavailable to the extractor."
}
},
{
"id": "per_document_digest",
"with": {
"text": "Intake:\n{{ outputs.intake }}\n\nOriginal user request:\n{{ inputs.user_message | xml_escape | truncate(4000) }}\n\nExtracted PDF content:\n{{ outputs.extract }}\n\nIf extraction was skipped, unavailable, or inconsistent with the\nUSER_EXCERPTS in intake, summarize only the user-provided excerpts\nand explicitly mark all other document content as unavailable.\n",
"style": "pdf_per_document_digest",
"max_words": 2500
},
"skill": "summarize",
"depends_on": [
"extract"
]
},
{
"id": "cross_document_synthesis",
"kind": "llm_chat",
"with": {
"task": "Synthesize the PDF analysis according to the intake mode. For\nsingle_summary, produce a structured summary. For multi_compare,\ncompare agreements, conflicts, and unique claims. For question_answer,\nanswer the question directly first.\n\nRequirements:\n- produce a compact final deliverable, not process commentary\n- source hierarchy: first trust verbatim user-provided excerpts and\n pasted text; then trust extractor output only when it is actually\n from a readable PDF and does not conflict with the user excerpts;\n then place synthesis under Inferences\n- if SOURCE_STATUS is inline_excerpts_only or reference_without_content,\n ignore any downstream claims that are not present in USER_EXCERPTS\n or the original user request\n- if the original user request says the PDF is not uploaded, no PDF\n is handy, or uses inline phrasing like \"page 3 says ...\", treat\n the entire answer as EXCERPT-ONLY even if intake or a downstream\n digest says otherwise\n- if extractor output conflicts with USER_EXCERPTS, treat it as an\n extraction anomaly, do not include the conflicting claim as fact\n- in EXCERPT-ONLY mode, never claim page count, section headings,\n tables, figures, authors, in-memory extraction, or unseen page\n coverage unless those exact facts appear in the user's request\n- use Evidence IDs: E1, E2, E3...\n- include an Evidence Matrix with columns:\n ID | Document | Page | Evidence | Supports | Confidence\n- cite file names and page numbers whenever available\n- every Key Fact must cite at least one Evidence ID\n- separate Direct Evidence from Inferences; do not put inference\n inside the fact list\n- never merge evidence from different documents without naming them\n- if the PDF file was not available and only excerpts\/user claims\n were provided, label the answer EXCERPT-ONLY and do not make\n document-wide claims\n- for EXCERPT-ONLY answers, include a Source Excerpts table with\n Page and Verbatim Text before key facts\n- include open questions, extraction limits, and verification needs\n- include a Reusable Memory Index as YAML or JSON with:\n documents, evidence_ids, key_facts, page_refs, open_questions,\n tags, confidence\n\nOriginal user request:\n{{ inputs.user_message | xml_escape | truncate(4000) }}\n\nClarification answers (may be empty when not needed):\n{{ inputs.get('collected', {}).get('pdf_clarify', {}) | tojson }}\n\nIntake:\n{{ outputs.intake | truncate(2000) }}\n\nPer-document digest:\n{{ outputs.per_document_digest | truncate(8000) }}",
"system": "You synthesize PDF findings with traceable evidence, evidence IDs, and explicit limits."
},
"depends_on": [
"per_document_digest"
]
},
{
"id": "traceable_index",
"kind": "llm_chat",
"with": {
"task": "Build a compact memory index for later recall. Use structured fields:\ndocuments, key_facts, page_refs, tables, open_questions.\n\nAnalysis:\n{{ outputs.cross_document_synthesis | truncate(6000) }}",
"system": "You build compact structured indexes for later PDF recall."
},
"depends_on": [
"cross_document_synthesis"
]
},
{
"id": "memorize",
"kind": "tool_call",
"tool": "memory_save",
"tool_args": {
"mode": "append",
"path": "memory\/pdf-intel.md",
"content": "{{ outputs.traceable_index }}"
},
"depends_on": [
"traceable_index"
],
"tool_allowlist": [
"memory_save"
]
}
]
},
"description": "Use this meta-skill instead of answering directly when the user needs PDF analysis, pasted PDF excerpt analysis, digesting, comparison, or question answering that benefits from multi-skill orchestration across PDF extraction, summarization, cross-document synthesis, traceable evidence indexing, and memory capture.",
"meta_priority": 55,
"final_text_mode": "step:cross_document_synthesis"
}
PDF Intelligence (Meta-Skill)
Process one or more PDFs into a traceable analysis entry. The workflow first classifies the request, preserves file/page evidence, synthesizes across documents when needed, and stores a structured memory index.
Fallback
LLM should manually run pdf-toolkit scripts then summarize and
memory_save.
Version History
- 7f72a32 Current 2026-07-05 18:41


