bytedance/agentkit-samples is a collection of examples and tutorials for Volcengine AgentKit, an AI-agent development platform for building, deploying, and operating agent applications. Developers use the samples to learn agent creation, multi-agent collaboration, memory, retrieval, MCP integrations, media generation, customer service, and other workflows. The catalogue skills provide agent workflows based on these examples.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add bytedance/agentkit-samples --skill byted-tos-doc-processgit clone --depth 1 https://github.com/bytedance/agentkit-samplesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bytedance/agentkit-samples/byted-tos-doc-process)<a href="https://agentmods.dev/skills/bytedance/agentkit-samples/byted-tos-doc-process"><img src="https://agentmods.dev/badge/skills/bytedance/agentkit-samples/byted-tos-doc-process.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00099 | $0.01391 |
| Opus 5 | $0.00049 | $0.00696 |
| Sonnet 5 | $0.00020 | $0.00278 |
| Haiku 4.5 | $0.00010 | $0.00139 |
Grade B, and why
byted-tos-doc-process scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
All scripts support `--key` to override `TOS_OBJECT_KEY`. Structured scripts also support `--json` for machine-readable output, and `doc_preview_process.py` / `doc_total_page.py` support `--dry-run` to preview the resolv How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Volcengine TOS Document Process
Preview and convert office documents stored in Volcengine TOS — PDF/PNG/JPG conversion, page count, HTML preview URL, and page-range export.
Setup (once per environment)
Install dependencies on first use:
cd {baseDir}
pip install -r {baseDir}/requirements.txt
Then run scripts with Python 3.7+:
python3 {baseDir}/scripts/<script>.py <args>
If you see a ModuleNotFoundError for tos, reinstall dependencies.
Environment Variables
This skill relies on the TOS identity declared in the metadata block. Common runtime variables are:
| Environment Variable | Required | Description |
|---|---|---|
TOS_ACCESS_KEY |
Yes | TOS access key ID |
TOS_SECRET_KEY |
Yes | TOS secret access key |
TOS_ENDPOINT |
Yes | TOS endpoint URL |
TOS_REGION |
Yes | TOS region |
TOS_BUCKET |
Yes | Source bucket that stores the document |
TOS_OBJECT_KEY |
No | Source object key of the document. Can be overridden with --key |
TOS_SECURITY_TOKEN |
No | STS session token when using temporary credentials |
Quick start (common tasks)
# Convert document to PDF
python3 {baseDir}/scripts/doc_preview_pdf.py --key report.docx --output preview.pdf
# Preview page 2 as PNG
python3 {baseDir}/scripts/doc_preview_png.py --key report.docx --page 2 --output page_2.png
# Preview page 2 as JPG
python3 {baseDir}/scripts/doc_preview_jpg.py --key report.docx --page 2 --output page_2.jpg
# Get total page count
python3 {baseDir}/scripts/doc_total_page.py --key report.docx --dest-type pdf
# Resolve HTML preview URL
python3 {baseDir}/scripts/doc_preview_html_url.py --key report.docx
# Batch export page range to TOS
python3 {baseDir}/scripts/doc_preview_process.py --key report.docx \
--dest-type jpg --img-mode 1 --start-page 1 --end-page 3 \
--saveas-bucket "output-bucket" --saveas-object "export/page_{Page}.jpg"
# Batch screenshot a PDF page range
python3 {baseDir}/scripts/doc_batch_screenshot.py --key test.pdf \
--format png --start-page 1 --end-page 3 \
--saveas-object "skill-test/doc/{Page}.png"
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- LICENSE 11 KB
- README.md 5.5 KB
- REFERENCE.md 7.9 KB
- requirements.txt 4 B
- scripts/doc_batch_screenshot.py 4.6 KB runs code
- scripts/doc_preview_html_url.py 12 KB runs code
- scripts/doc_preview_jpg.py 7.8 KB runs code
- scripts/doc_preview_params.py 3.6 KB runs code
- scripts/doc_preview_pdf.py 7.2 KB runs code
- scripts/doc_preview_png.py 8.0 KB runs code
- scripts/doc_preview_process.py 12 KB runs code
- scripts/doc_total_page.py 7.6 KB runs code
- WORKFLOWS.md 11 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 125 lines · 99 tokens per session scan B 0e17775d4d0d
byted-tos-doc-process is a skill published in the GitHub repository bytedance/agentkit-samples (449 stars, last pushed 2d ago), licensed Apache-2.0. It adds 99 tokens to every session and 1,391 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.
nano-pdf
Edits PDF files using natural-language instructions via the nano-pdf CLI. Supports modifying text, changing titles, fixing typos, and updating content on specific pages. Use when the user wants to edit a PDF, modify PDF content, update PDF text, fix a typo in a PDF, change a PDF title, or rewrite part of a PDF page.
hive.pdf
Read, write, merge, split, rotate, watermark, encrypt, and OCR PDF files using Python (pypdf, pdfplumber, reportlab, pypdfium2) and command-line tools (poppler-utils, qpdf). Use when the user asks to extract text/tables/images from a PDF, create or modify a PDF, combine or split PDFs, OCR a scanned PDF…
pdf-toolkit
Structured .pdf operations: extract text/tables, merge pages from multiple PDFs, split a PDF by page ranges, fill PDF form fields, and generate fresh PDFs from JSON. Trigger when the user wants programmatic PDF work without natural-language rewriting — examples: pull tables from a report, combine three PDFs, extract…
nano-pdf
Edit PDFs with natural-language instructions using the nano-pdf CLI.
pdf-analysis
A PDF analysis method for reading both normal PDFs with selectable text and scanned PDFs made from page images.