一键导入
doc-convert
Convert local PDF/DOCX documents to text for analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert local PDF/DOCX documents to text for analysis
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | doc-convert |
| description | Convert local PDF/DOCX documents to text for analysis |
| metadata | {"aeloon":{"emoji":"📄","requires":{"bins":["python3"]}}} |
When a user references local documents or directories (e.g., "refer to ~/papers/report.pdf", "according to these files", "use the documents in ~/data/"), convert the referenced documents to text format, then read and analyze them.
Recognize when the user mentions:
~/papers/report.pdf, /home/user/docs/notes.docx)~/papers/, ./docs/)exec(command="python3 -c \"
import fitz, sys, os, pathlib
src = '{source_path}'
out_dir = os.path.expanduser('~/.aeloon/converted_docs')
os.makedirs(out_dir, exist_ok=True)
stem = pathlib.Path(src).stem
out_path = os.path.join(out_dir, stem + '.txt')
doc = fitz.open(src)
text = ''
for page in doc:
text += page.get_text() + '\n\n'
doc.close()
with open(out_path, 'w', encoding='utf-8') as f:
f.write(text.strip())
print(f'Converted: {out_path}')
print(f'Pages: {doc.page_count}, Characters: {len(text)}')
\"")
exec(command="python3 -c \"
import docx, os, pathlib
src = '{source_path}'
out_dir = os.path.expanduser('~/.aeloon/converted_docs')
os.makedirs(out_dir, exist_ok=True)
stem = pathlib.Path(src).stem
out_path = os.path.join(out_dir, stem + '.txt')
doc = docx.Document(src)
lines = []
for para in doc.paragraphs:
if para.style.name.startswith('Heading'):
level = int(para.style.name.split()[-1]) if para.style.name[-1].isdigit() else 1
lines.append('#' * level + ' ' + para.text)
else:
lines.append(para.text)
text = '\n\n'.join(lines)
with open(out_path, 'w', encoding='utf-8') as f:
f.write(text.strip())
print(f'Converted: {out_path}')
\"")
read_file(path="{converted_path}")
When the user specifies a directory:
exec(command="python3 -c \"
import fitz, docx, os, pathlib, glob
src_dir = '{directory_path}'
out_dir = os.path.expanduser('~/.aeloon/converted_docs')
os.makedirs(out_dir, exist_ok=True)
supported = {'.pdf', '.docx', '.md', '.txt', '.csv'}
converted = 0
skipped = 0
for f in sorted(pathlib.Path(src_dir).rglob('*')):
if f.suffix.lower() not in supported:
continue
out_path = pathlib.Path(out_dir) / (f.stem + '.txt')
if f.suffix.lower() == '.pdf':
doc = fitz.open(str(f))
text = '\\n\\n'.join(p.get_text() for p in doc)
doc.close()
elif f.suffix.lower() == '.docx':
doc = docx.Document(str(f))
text = '\\n\\n'.join(p.text for p in doc.paragraphs)
else:
text = f.read_text(encoding='utf-8', errors='replace')
out_path.write_text(text.strip(), encoding='utf-8')
converted += 1
print(f'OK: {f.name} -> {out_path.name}')
print(f'\\nTotal: {converted} converted, {skipped} skipped')
\"")
~/.aeloon/converted_docs/<original_stem>.txt (e.g., report.txt from report.pdf)If conversion fails:
"Failed to convert {filename}: {error}"pip install PyMuPDF pdfminer.six python-docx.md, .txt, .csv)~/.aeloon/converted_docs/), skip conversion and read the cached versionexec tool for file operations, never call read_file on binary files.md / .txt / .csv files, use read_file directly — no conversion neededAlways-on prompt memory for stable facts and preferences.
Recall past conversations through the session_search tool instead of grepping transcript files.
Reference guidance for OpenViking setup and layered-memory migration in Aeloon. Runtime usage should rely on provider-native viking_* tools, not this skill.
Search and install agent skills from ClawHub, the public skill registry.
Schedule reminders and recurring tasks.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.