Skip to content
blog-scraper logo

Blog Scraper Skill

blog-scraper

Fetch and compress blog articles from tech-lab.sios.jp into the doc/ directory with token usage statistics and OGP metadata

SKILL.md

Full skill instructions

Blog Scraper Skill

Overview

This skill fetches blog articles from tech-lab.sios.jp/​archives/​*, compresses the HTML content by removing unnecessary attributes and whitespace, and saves the result to the doc/ directory with metadata.

When to Use

  • User requests to fetch a specific blog article
  • User wants to update existing cached articles
  • User needs to scrape multiple articles for analysis or documentation

Usage

Single Article

URL=https://tech-lab.sios.jp/​archives/[article-id] npm run scraper

Example:

URL=https://tech-lab.sios.jp/​archives/​48397 npm run scraper

Multiple Articles

For multiple articles, run the command sequentially for each URL.

Output

The scraper will:

  1. Fetch and parse the HTML from the specified URL
  2. Extract content using the CSS selector section.entry-content
  3. Compress by removing:
    • Scripts, styles, and noscript tags
    • Class, ID, and style attributes
    • Whitespace between tags
  4. Preserve:
    • Image alt text as [画像: alt]
    • Image src URLs
    • Link href attributes
  5. Add metadata as HTML comment:
    • OGP title
    • Source URL
    • OGP image URL
    • Extraction timestamp
  6. Save to docs/​data/​tech-lab-sios-jp-archives-[id].html
  7. Report compression statistics:
    • Token count reduction (estimated for Claude)
    • Compression ratio percentages
    • File size

Cache Behavior

  • If the target HTML file already exists in docs/​data/, the scraper skips fetching and reports the existing file size
  • To re-fetch, delete the existing HTML file first

Token Estimation

The scraper estimates Claude token usage for Japanese content:

  • Hiragana/​Katakana: ~1.5 chars/​token
  • Kanji: ~1 char/​token
  • ASCII: ~4 chars/​token
  • Other: ~2 chars/​token

Typical compression achieves 60-85% token reduction.

Implementation Details

See application/​tools/​scraper.ts for the TypeScript implementation using:

  • node-fetch for HTTP requests
  • cheerio for HTML parsing
  • OGP metadata extraction
  • Custom token estimation for Japanese text

Permissions Required

This skill requires the following permissions in .claude/​settings.local.json:

{
  "permissions": {
    "allow": [
      "Bash(npm run scraper:*)",
      "Bash(URL=:*)"
    ]
  }
}

Note: The Bash(URL=:*) permission uses prefix matching to allow any URL environment variable pattern. This is a broad permission - consider restricting to specific domains if needed for security.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View