devpilot-learn
Learn
Generate a clean, reader-mode HTML digest from a single content source. The digest captures the article's core argument, key points, and important visuals in a format that's easy to scan and share.
Workflow
1. Identify the input source
The user will provide one of:
- URL — a web page or online article
- PDF — a local file path to a .pdf
- Word doc — a local file path to a .docx
- Text file — a local file path to .txt, .md, or similar
- Pasted text — content directly in the message
Detect which type it is and proceed accordingly.
2. Fetch the content
For URLs:
Use WebFetch to retrieve the page. If the page content is too short or looks like
a paywall/login wall, tell the user and ask if they have another way to access it.
For PDFs:
Use the Read tool with the file path. For large PDFs (>10 pages), start with the
first 20 pages, summarize, then continue if needed.
For Word docs (.docx):
Use Bash to convert with textutil -convert txt <file> -stdout (macOS) or
pandoc <file> -t plain as a fallback. If neither is available, try reading the
file directly and extracting what you can.
For text files / pasted text: Read directly.
3. Determine output language
- If the user explicitly specifies a language (e.g., "summarize in English", "用中文总结"), use that language.
- If no language is specified, default to the language of the original content.
- If the content is mixed-language, default to the dominant language.
4. Analyze and extract
Read through the full content and identify:
- Core thesis / main argument — what is this article fundamentally about?
- Key points (5-10) — the most important facts, findings, or arguments. Each should be a self-contained statement, not a vague reference.
- Important data — statistics, numbers, percentages, dates that support key points.
- Images and charts — identify images/charts that are essential to understanding the content (skip decorative images, ads, author photos, logos).
For charts and diagrams:
- If you have the original image URL, preserve it for embedding.
- If the image is not accessible via URL (e.g., from a PDF or local file), write a clear textual description of what the chart shows, including axis labels, trends, and key data points.
5. Generate the HTML digest
Create a single, self-contained HTML file. No external dependencies — all styles are inline. The design should feel like a browser's reader mode: clean, focused, easy to read.
HTML structure:
<!DOCTYPE html>
<html lang="[language-code]">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[Article Title] - Digest</title>
<style>
/* Reader-mode styling */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
line-height: 1.8;
color: #1d1d1f;
background: #fafafa;
padding: 2rem 1rem;
}
.container {
max-width: 720px;
margin: 0 auto;
background: #fff;
padding: 2.5rem 2rem;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1 {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: 0.5rem;
line-height: 1.3;
}
.meta {
color: #6e6e73;
font-size: 0.9rem;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid #e5e5e7;
}
.meta a { color: #6e6e73; text-decoration: underline; }
.summary {
font-size: 1.05rem;
color: #424245;
margin-bottom: 2rem;
padding: 1rem 1.25rem;
background: #f5f5f7;
border-radius: 6px;
border-left: 3px solid #0071e3;
}
h2 {
font-size: 1.2rem;
font-weight: 600;
margin: 2rem 0 1rem;
color: #1d1d1f;
}
.key-points { list-style: none; padding: 0; }
.key-points li {
padding: 0.75rem 0;
border-bottom: 1px solid #f0f0f2;
padding-left: 1.25rem;
position: relative;
}
.key-points li::before {
content: "";
position: absolute;
left: 0;
top: 1.05rem;
width: 6px;
height: 6px;
background: #0071e3;
border-radius: 50%;
}
.key-points li:last-child { border-bottom: none; }
.chart-block {
margin: 1.5rem 0;
padding: 1rem;
background: #f5f5f7;
border-radius: 6px;
text-align: center;
}
.chart-block img {
max-width: 100%;
height: auto;
border-radius: 4px;
}
.chart-block .caption {
font-size: 0.85rem;
color: #6e6e73;
margin-top: 0.5rem;
}
.chart-description {
font-size: 0.95rem;
color: #424245;
text-align: left;
padding: 0.75rem 1rem;
background: #f0f0f2;
border-radius: 4px;
margin: 1rem 0;
border-left: 3px solid #86868b;
}
.footer {
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid #e5e5e7;
font-size: 0.8rem;
color: #86868b;
}
</style>
</head>
<body>
<div class="container">
<h1>[Article Title]</h1>
<div class="meta">
Source: <a href="[url]">[domain or filename]</a> | [date if available]
</div>
<div class="summary">
[2-3 sentence executive summary — the article's core message]
</div>
<h2>[Key Points section header, in output language]</h2>
<ul class="key-points">
<li>[Key point 1 — a concrete, self-contained statement]</li>
<li>[Key point 2]</li>
<!-- 5-10 key points -->
</ul>
<!-- For each important chart/image: -->
<h2>[Charts & Data section header, in output language]</h2>
<!-- If image URL is available: -->
<div class="chart-block">
<img src="[image-url]" alt="[description]">
<div class="caption">[What this chart shows and why it matters]</div>
</div>
<!-- If image is not accessible, use text description: -->
<div class="chart-description">
[Detailed description of the chart: type, axes, trends, key numbers]
</div>
<div class="footer">
Generated by Article Digest
</div>
</div>
</body>
</html>
Adapt the section headers to the output language. For example:
- English: "Key Points", "Charts & Data"
- Chinese: "要点", "图表与数据"
If there are no charts or images worth including, omit the Charts & Data section entirely.
6. Save and present
Save the HTML file using the Write tool. Naming convention:
- For URLs:
digest-[slugified-domain-or-title].html - For files:
digest-[original-filename].html
Save to the current working directory unless the user specifies otherwise.
After saving, tell the user the file path and offer to open it:
open [file-path] # macOS
Edge cases
- Paywalled content: If WebFetch returns very little content or a login page, inform the user. Suggest they paste the text directly or provide a PDF.
- Very long articles (>5000 words): Still summarize the whole thing, but aim for the higher end of key points (8-10) to ensure adequate coverage.
- Multiple URLs/files in one request: Process each one separately, generating one HTML per source. Name them distinctly.
- Non-article content (e.g., a product page, a code repo): Do your best to extract the most informative content, but note to the user that the source isn't a typical article.
More from siyuqian/devpilot
devpilot-scanning-repos
Use when the user asks to scan, audit, or sweep an entire GitHub repository for issues and file them as tickets — "scan this repo", "audit the codebase", "find bugs/security holes/missing tests", "check the docs are still accurate", "/repo-scan", "open issues for all the problems you find". Scans security, edge cases, testing coverage, and doc/code drift (CLAUDE.md, AGENTS.md, README.md and the docs they link to) without assuming business logic. Do NOT use for reviewing a single PR (use devpilot-pr-review) or language-specific style review (use devpilot-google-go-style).
9devpilot-resolve-issues
Use when the user wants to resolve, fix, work through, or burn down open GitHub issues in a repository — "fix all the issues", "resolve these tickets", "work through the repo-scan issues", "clear the backlog", "fix issue #42", "/resolve-issues", "解决所有issue", "修复这些issue", "处理issue backlog". Runs as a loop over matching issues until none remain; each REAL issue is fixed in its own `git worktree` so the main checkout stays untouched. Do NOT use for creating issues (use devpilot-scanning-repos) or for reviewing a PR the user already has open (use devpilot-pr-review).
9devpilot-pr-creator
>
8devpilot-content-creator
SEO-optimized blog and content writing skill. Use this skill whenever the user wants to write a blog post, create content for their website, improve SEO rankings, do keyword research, or plan content strategy. Triggers on any mention of blog writing, SEO content, keyword research, content marketing, "写博客", "写文章", "内容创作", "SEO优化", or when the user wants to create any form of long-form content for a website or product. Even if the user just says "write something about X for our site", use this skill.
3devpilot-google-go-style
>
2devpilot-prompt-review
Review and improve prompts for Claude (system prompts, CLAUDE.md files, SKILL.md files, API prompts, or any LLM instruction text). Use this skill whenever the user wants to review a prompt, improve prompt quality, check prompt best practices, audit instructions for Claude, optimize a system prompt, or asks "is this prompt good?". Also trigger when the user shares a prompt and asks for feedback, or when they mention prompt engineering, prompt optimization, or prompt hygiene. Even if they just paste a prompt and say "thoughts?" — use this skill.
2