본문으로 건너뛰기
cccskills
무료GitHub에 공개

daftai-url-to-markdown

Fetch any URL and convert to markdown using Chrome CDP, with automatic image downloading. Supports auto-capture and wait-for-user modes. Downloads article images to local directory and rewrites image references to relative paths. Use when user wants to save a webpage as markdown with images. Keywords: url to markdown, save webpage, download article, 网页转markdown

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구YouTube

실행 점수 미검증

설치 방법 보기

포함된 파일(7)

  • SKILL.md6.3 KB
  • scripts/cdp.ts10.8 KB
  • scripts/constants.ts544 B
  • scripts/download-images.ts3.5 KB
  • scripts/html-to-markdown.ts9.6 KB
  • scripts/main.ts6.6 KB
  • scripts/paths.ts1.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

URL to Markdown

Fetches any URL via Chrome CDP and converts HTML to clean markdown, with automatic image downloading.

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions:

  1. Determine this SKILL.md file's directory path as SKILL_DIR
  2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts
  3. Replace all ${SKILL_DIR} in this document with the actual path

Script Reference:

ScriptPurpose
scripts/main.tsCLI entry point for URL fetching
scripts/download-images.tsImage download and path rewriting

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .daftai-skills/daftAI-url-to-markdown/EXTEND.md && echo "project"

# Then user-level
test -f "$HOME/.daftai-skills/daftAI-url-to-markdown/EXTEND.md" && echo "user"
PathLocation
.daftai-skills/daftAI-url-to-markdown/EXTEND.mdProject directory
$HOME/.daftai-skills/daftAI-url-to-markdown/EXTEND.mdUser home
ResultAction
FoundRead, parse, apply settings
Not foundUse defaults

EXTEND.md Supports: Default output directory | Default capture mode | Timeout settings | Image download toggle

Features

  • Chrome CDP for full JavaScript rendering
  • Two capture modes: auto or wait-for-user
  • Automatic image downloading with local path rewriting
  • <picture> / <source> tag support for complete image extraction
  • Clean markdown output with metadata
  • Handles login-required pages via wait mode

Usage

# Auto mode (default) - capture and download images
bun ${SKILL_DIR}/scripts/main.ts <url>

# Wait mode - wait for user signal before capture
bun ${SKILL_DIR}/scripts/main.ts <url> --wait

# Skip image downloading
bun ${SKILL_DIR}/scripts/main.ts <url> --no-images

# Save to specific file
bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md

Options

OptionDescription
<url>URL to fetch
-o <path>Output file path (default: auto-generated)
--waitWait for user signal before capturing
--no-imagesSkip downloading images (keep remote URLs)
--timeout <ms>Page load timeout (default: 30000)

Capture Modes

ModeBehaviorUse When
Auto (default)Capture on network idlePublic pages, static content
Wait (--wait)User signals when readyLogin-required, lazy loading, paywalls

Wait mode workflow:

  1. Run with --wait → script outputs "Press Enter when ready"
  2. Ask user to confirm page is ready
  3. Send newline to stdin to trigger capture

Output Format

YAML front matter with url, title, description, author, published, captured_at fields, followed by converted markdown content.

Output Directory

url-to-markdown/<domain>/
├── <slug>.md
└── images/
    ├── image1.png
    ├── image2.svg
    └── ...
  • <slug>: From page title or URL path (kebab-case, 2-6 words)
  • Images are saved to images/ subdirectory next to the markdown file
  • Image references in markdown use relative paths: images/<filename>
  • Conflict resolution: Append timestamp <slug>-YYYYMMDD-HHMMSS.md

Environment Variables

VariableDescription
URL_CHROME_PATHCustom Chrome executable path
URL_DATA_DIRCustom data directory
URL_CHROME_PROFILE_DIRCustom Chrome profile directory

Troubleshooting: Chrome not found → set URL_CHROME_PATH. Timeout → increase --timeout. Complex pages → try --wait mode.

Post-Capture Validation

After the script finishes, the agent MUST perform the following validation steps before reporting completion:

1. Completeness Check

  • Use read_web_page to fetch the original URL
  • Compare the generated Markdown against the original page content
  • Ensure no paragraphs, sections, or headings are missing

2. Video & Embedded Media Detection

  • Search the original page source (curl) for <video>, <iframe>, <source>, or links to Vimeo, YouTube, Wistia, Lottie, etc.
  • For each embedded video found, insert a link at the correct position in the Markdown: [视频:<caption or description>](<video_url>)
  • Videos are often hidden in JS-rendered mediaGallery blocks — check the page's raw HTML/JSON for vimeo.com, youtube.com, .mp4, .webm

3. Image Placement Verification

  • Confirm that images appear after the correct paragraphs, matching their positions on the original page
  • Check that all ![](images/...) references point to files that actually exist in the images/ directory

4. Irrelevant Content Cleanup

  • Remove navigation menus, tag/category lists, newsletter signup forms, "Related articles" sections, footer boilerplate, and social media icons
  • Remove duplicate titles (e.g., page title repeated as H1)
  • Keep only the article body content and author attribution

5. Formatting & Style Verification

  • Check that bold/italic emphasis is preserved (not stripped during conversion)
  • Verify heading hierarchy (H2/H3 levels match the original page structure)
  • Confirm ordered/unordered lists retain their structure
  • Ensure blockquotes are properly converted with >
  • Verify code blocks use ``` fencing with correct language tags
  • Check that <hr> elements are converted to ---
  • Note: colors, fonts, spacing and other CSS-only styles are out of scope for Markdown

6. Link Verification

  • Fix broken links caused by inline cards or embedded previews spanning multiple lines
  • Convert relative links (e.g., /blog/some-post/) to absolute URLs (e.g., https://domain.com/blog/some-post/)
  • Ensure all [text](url) links are properly formatted

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Checks and fixes Chinese copywriting with autocorrect-backed workflows for text and single-file Markdown/TXT inputs. Use when user asks to normalize Chinese punctuation, spacing, or full-width/half-width usage. Also triggers for "校对", "检查排版", "中英文空格", "全角半角". Does not rewrite document structure, product claims, or UI messaging.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

Writes, rewrites, and reviews Chinese technical documentation, product copy, and UI microcopy using ruanyf/document-style-guide, STE-inspired Chinese methods for procedural passages, and separate product and UI extensions. Use for 中文技术写作, README, API documentation, 操作指南, 安装部署说明, 故障排查文档, 运维 Runbook, 工具描述, Agent 指令文案, 产品介绍, 功能说明, 界面文案, 按钮, 空状态, and 错误提示 when the task concerns meaning, structure, or wording. Delegates requested formatting checks to daftai-chinese-copywriting. Pure punctuation or spacing tasks belong to that skill; personal essays and author-voice articles do not belong here.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

Audits a Cloudflare application repository for code paths and configuration that may create usage-based billing exposure. Use when asked to inspect Cloudflare Worker, D1, Durable Objects, storage, queue, or compute usage for unexpected bills, billing risks, or cost drivers. Reports evidence and uncertainty. Runs offline by default; optionally correlates user-authorized, bounded evidence from existing official tools. Does not guarantee a spending cap.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

Extracts timed subtitles from local video/audio files using Whisper. Outputs SRT format with accurate timestamps. Handles complex filenames automatically. Use when user asks to "extract subtitles", "get subtitles", "transcribe video", "识别字幕", "提取字幕", or "获取字幕".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

Optimizes natural-language image requests and rough prompts into ready-to-use GPT Image 2.5 prompts using the official prompting guide as a live reference. Use when users ask to improve image prompts, 优化生图提示词, 把想法变成提示词, or write prompts for GPT Image 2.5 Flare or Sunburst. Produces prompt text, not images, unless the user explicitly asks to generate.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

Converts transparent or solid-background single-color PNG files and SVG files containing one embedded or local PNG into verified path-only SVG output. Removes pure-color backgrounds automatically. Uses Potrace threshold and parameter scans with alpha error metrics to preserve detailed logos, stamps, engravings, and line art. Use when the user asks to convert images to SVG, vectorize PNG, convert bitmap to true SVG, remove embedded raster data from SVG, 图片转矢量, PNG 转 SVG, 真矢量, or 位图描摹.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

daftAI2026/daftAI-skills172026년 10월 15일 업데이트

daftAI2026의 스킬 모두 보기

이 스킬의 문제 신고