skill-to-document
Convert an Agent Skill into a formatted document (PDF, DOCX, or HTML).
Skill by aws-jp-fsi-saOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/aws-samples-skill-to-document
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, frontend, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/skill-to-document
What's inside
- Skill name
skill-to-document- Description
- Convert an Agent Skill into a formatted document (PDF, DOCX, or HTML). Use this skill when the user wants to generate a document from a specific Agent Skill's content, including its SKILL.md and referenced markdown files. Triggers on keywords: "skill to document", "スキルをドキュメント化", "ドキュメント生成", "スキルからPDF", "スキルからWord", "スキルからHTML", "generate document from skill", "convert skill to PDF", "convert skill to DOCX", "convert skill to HTML". Supports PDF (via fpdf2), DOCX (via python-docx), and HTML (built-in). All formats are always available. Defaults to HTML when no format is specified.
- License
- MIT-0
- Metadata
- author: aws-jp-fsi-sa · version: 2.0
- Instructions
- 222 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (7)
- SKILL.md
- SKILL_ja.md
- style-template.css · assets/
- generate_docx.py · scripts/
- generate_pdf.py · scripts/
- pyproject.toml · scripts/
- uv.lock · scripts/
SKILL.md (first lines)
# Skill to Document
Convert an Agent Skill package into a professionally formatted PDF, DOCX, or HTML document.
Read the skill's SKILL.md and all referenced markdown files, build a logical table of
contents, and output a complete document in Japanese.
## Prerequisites
- **Python**: 3.10 or later
- **uv**: Python package manager ([installation guide](https://docs.astral.sh/uv/getting-started/installation/))
- **OS**: macOS or Windows (Japanese system fonts are auto-detected)
The bundled Python scripts (`scripts/`) handle PDF and DOCX generation using fpdf2 and
python-docx respectively. Dependencies are managed via `scripts/pyproject.toml` and
automatically installed on first run by `uv`.
## Execution Guidelines
- Execute this skill as a subagent when possible to avoid consuming the caller's context.
- Use extended thinking (ultrathink / super think) for all processing steps due to complexity.
## Supported Output Formats
All three output formats are always available — no external skill dependencies required:
1. **HTML** — Built-in, no additional tools required. Uses bundled `assets/style-template.css`.
2. **PDF** — Generated by `scripts/generate_pdf.py` using fpdf2 with OS-native Japanese fonts.
3. **DOCX** — Generated by `scripts/generate_docx.py` using python-docx with book-quality styling.
## Architecture
This skill uses an HTML-centric approach:
```
Agent (Steps 1-7)
│
▼ Always generates HTML first (Step 7)
├── HTML format requested → output .html + style.css directly
├── PDF format requested → pass HTML to scripts/generate_pdf.py → .pdf
└── DOCX format requested → pass HTML to scripts/generate_docx.py → .docx
```
The agent always produces HTML as the intermediate representation. For PDF and DOCX,
the generated HTML file is passed to the corresponding Python script for conversion.
## Workflow
Execute these steps in order. Stop and return control on any fatal error.
### Step 1: Determine Output Format
```
User explicitly specified format?
├─ Yes (pdf) → use PDF
├─ Yes (docx) → use DOCX
├─ Yes (html) → use HTML
└─ No → use HTML (default)
```
All formats are always available. No availability check is needed.
### Step 2: Locate the Target Skill
Identify the skill to document:
- **Local skill**: Resolve the SKILL.md path from the skill name and known skill directories.
- **Remote skill (URI)**: Fetch the SKILL.md content from the given URI. If fetch fails, output the error and stop:
```
エラー: SKILL.md を取得できませんでした。
URI: <uri>
理由: <error details>
```
Read the SKILL.md frontmatter to extract `name` and `description`.
### Step 3: Collect Content
Starting from SKILL.md, recursively collect referenced files:
1. Parse all relative file references (links and explicit paths) in SKILL.md.
2. **Include**: Markdown files (`.md`) — read their full content and follow their references recursively.
3. **Include as appendix**: JSON Schema files (`.json` with `$schema` or schema-like structure) — add to the end of the document as reference material.
4. **Exclude**: Application code and scripts (`.py`, `.js`, `.ts`, `.jsx`, `.tsx`, `.mjs`, `.cjs`, `.sh`, `.bash`, `.tf`, `.hcl`, `.yaml`/`.yml` that are IaC manifests, `package.json`, `tsconfig.json`, etc.).
For remote skills, fetch referenced markdown files relative to the SKILL.md URI base.
For image files referenced in markdown (`.png`, `.jpg`, `.jpeg`, `.gif`, `.svg`, `.bmp`):
- Download to a temporary directory.
- Record the mapping from original path to local temp path.
- **Clean up all temporary files after document generation is complete.**
### Step 4: Build Table of Contents
From the collected markdown content, construct a logical document structure:
1. Map markdown headings (`#`, `##`, `###`, etc.) to chapter/section/subsection hierarchy.
2. Merge content from multiple files into a coherent structure — use the SKILL.md structure as the primary outline.
3. Assign chapter numbers (1, 1.1, 1.1.1, etc.).
4. Produce the ToC as an ordered list of `{number, title, level}` entries.
### Step 5: Generate Document Body
Compose the document body in Japanese:
- **Translate** all English content to Japanese. Preserve technical terms, AWS service names, CLI commands, and code snippets in their original form.
- **Do not summarize** — use the full original text, translated faithfully.
- Preserve the logical structure determined in Step 4.
- Maintain code blocks, tables, and lists as-is (translate surrounding prose only).
### Step 6: Place Images
For each image reference found in the content:
- Insert the image at the corresponding position in the document.
- Scale images to fit within page margins (max width: content area width).
- If an image file is unavailable, insert a placeholder note: `[画像: <original path> — 取得不可]`.
### Step 7: Generate HTMLFrom aws-samples/sample-fsi-reference-architecture-jp, MIT-0.
More from aws-samples/sample-fsi-reference-architecture-jp
- 0.740score
fsa-announcements
aws-jp-fsi-saOfficial
Fetch announcements from the Financial Services Agency of Japan (FSA), combining the official news RSS feed (~15 latest items) with archive pages…
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fsi-ransomware-detect
aws-jp-fsi-saOfficial
Provides design/assessment support for the detection/analysis aspect of ransomware countermeasures on AWS, for financial services organizations.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fsi-payments-credit-card
aws-jp-fsi-saOfficial
Reference architecture case study for a credit card issuer (イシュア) system built on the "BLEA for FSI / 金融リファレンスアーキテクチャ日本版" initiative.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-customer-references
aws-jp-fsi-saOfficial
Research AWS public customer case studies across multiple sources and organize the findings.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-payment-cryptography-guide
aws-jp-fsi-saOfficial
Use when adopting, designing, or migrating to AWS Payment Cryptography (APC).
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-security-bulletins
aws-jp-fsi-saOfficial
Fetch, search, and retrieve AWS Security Bulletins (vulnerability advisories and security announcements published by AWS).
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-blogs
aws-jp-fsi-saOfficial
Search and retrieve AWS blog posts (service guides, customer stories, event recaps, new feature announcements, etc.) from the public AWS Blog directory API.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-whatsnew
aws-jp-fsi-saOfficial
Fetch AWS What's New announcements from the official AWS API.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
boj-statistics
aws-jp-fsi-saOfficial
Fetch, search, and analyze time-series statistical data from the Bank of Japan (BOJ) public API.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
customer-context-manager
aws-jp-fsi-saOfficial
Manage customer-specific context that LLMs cannot know on their own — abbreviations, internal system names, org structures, key contacts, deal history, and…
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fisc-to-aws-security-agent
aws-jp-fsi-saOfficial
Deterministically generates source documents (Markdown) from the FISC "Security Guidelines on Computer Systems for Financial Institutions" (安対基準 / Antai…
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fsi-banking-core
aws-jp-fsi-saOfficial
Reference architecture knowledge for a bank Core Banking (勘定系) workload on AWS from the Financial Reference Architecture Japan Edition (BLEA for FSI).
SkillAFreshness: A★ 15Claude Code +9
Signals
- Stars
- 15
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 15, 2026 (14 days ago)
- Last release
- Oct 15, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 2.0
- License
- MIT-0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from aws-jp-fsi-sa
- 0.740score
fsi-payments-credit-card
aws-jp-fsi-saOfficial
Reference architecture case study for a credit card issuer (イシュア) system built on the "BLEA for FSI / 金融リファレンスアーキテクチャ日本版" initiative.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fsi-ransomware-detect
aws-jp-fsi-saOfficial
Provides design/assessment support for the detection/analysis aspect of ransomware countermeasures on AWS, for financial services organizations.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-blogs
aws-jp-fsi-saOfficial
Search and retrieve AWS blog posts (service guides, customer stories, event recaps, new feature announcements, etc.) from the public AWS Blog directory API.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-customer-references
aws-jp-fsi-saOfficial
Research AWS public customer case studies across multiple sources and organize the findings.
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
aws-payment-cryptography-guide
aws-jp-fsi-saOfficial
Use when adopting, designing, or migrating to AWS Payment Cryptography (APC).
SkillAFreshness: A★ 15Claude Code +9 - 0.740score
fsa-announcements
aws-jp-fsi-saOfficial
Fetch announcements from the Financial Services Agency of Japan (FSA), combining the official news RSS feed (~15 latest items) with archive pages…
SkillAFreshness: A★ 15Claude Code +9
Cite this page
skill-to-document. Agent Mart. https://agentmart.dev/skills/aws-samples-skill-to-document (last updated 2026-10-24)