用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Wike-CHI/acquisition-agent --skill document-pro命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | document-pro |
| version | 1.0.0 |
| description | 文档处理技能 - 让 AI 能够读取、解析、提取 PDF、DOCX、PPT 等文档的关键信息。当用户要求分析文档、提取内容、总结报告时触发此技能。 |
| triggers | ["文档处理","document","PDF DOCX"] |
Skill Graph: 领域 → [[_index-meta|系统元技能领域]]
赋予 AI 强大的文档处理能力:
| 格式 | 读取 | 写入 | 工具 |
|---|---|---|---|
| ✅ | ✅ | pdfplumber, PyPDF2 | |
| DOCX | ✅ | ✅ | python-docx |
| PPTX | ✅ | ❌ | python-pptx |
| XLSX | ✅ | ✅ | openpyxl |
| TXT | ✅ | ✅ | 内置 |
| Markdown | ✅ | ✅ | 内置 |
# 提取文本
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
for page in pdf.pages:
text = page.extract_text()
print(text)
# 提取表格
with pdfplumber.open("document.pdf") as pdf:
table = pdf.pages[0].extract_tables()
读取:
from docx import Document
doc = Document("document.docx")
for para in doc.paragraphs:
print(para.text)
# 提取表格
for table in doc.tables:
for row in table.rows:
print([cell.text for cell in row.cells])
生成:
from docx import Document
from docx.shared import Pt, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
# 标题
doc.add_heading('报告标题', level=0)
doc.add_heading('第一节', level=1)
# 段落
p = doc.add_paragraph('正文内容...')
p.alignment = WD_ALIGN_PARAGRAPH.LEFT
# 表格
table = doc.add_table(rows=3, cols=3, style='Light Grid Accent 1')
table.cell(0, 0).text = '列1'
table.cell(0, 1).text = '列2'
table.cell(0, 2).text = '列3'
# 保存
doc.save('output.docx')
完整的 .docx 生成指南见
word-docx技能,包含中文文档、开发信模板、报告模板等最佳实践。
from pptx import Presentation
prs = Presentation("presentation.pptx")
for slide in prs.slides:
for shape in slide.shapes:
if shape.has_text_frame:
print(shape.text)
1. 识别文档类型 → 选择正确的工具
2. 读取内容 → 提取文本、表格、图片
3. 分析信息 → 理解结构、提取要点
4. 总结呈现 → 用中文总结给用户
向用户呈现文档时: