web-crawler
Skill2 starsChanged 22 days agoMITView on GitHub
Crawl và clone hoàn toàn một website, tạo Next.js website chạy được local. Use when: user muốn clone/mirror website, scrape dữ liệu, copy cấu trúc trang web, tạo website từ site có sẵn, crawl content để phân tích.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Starchild-ai-agent/official-skillstheir own version, first seen May 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Starchild-ai-agent/official-skills★ 32same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- skills/react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- check-seoSkill
- brainstormingSkill
- check-seoSkill
- code-reviewerSkill
- create-a-skillSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- advancedSkill
- basicsSkill
- branchingSkill
- conflictsSkill
- historySkill
- remoteSkill
- gitSkill
- undoSkill
- workflowsSkill
- vercel-react-best-practicesSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- senior-backendSkill
- senior-frontendSkill
- senior-fullstackSkill
- senior-qaSkill
- skill-creatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- test-fullySkill
- using-git-worktreesSkill
- using-screenkitSkill
- vercel-composition-patternsSkill
- verification-before-completionSkill
- webapp-testingSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
Web Crawler → Website Generator Skill
Skill này crawl một website và tạo ra Next.js website hoàn chỉnh chạy được local, với layout responsive cao cấp cho cả PC và mobile.
Trigger Scenarios
- "Crawl website X lấy toàn bộ nội dung"
- "Clone/copy website X"
- "Tạo website local từ site X"
- "Scrape dữ liệu từ trang X"
- "Mirror website để dùng offline"
Workflow Đầy Đủ (6 bước)
Bước 1 — Xác định yêu cầu
Hỏi user (xem chi tiết tại references/planning-questions.md):
- URL gốc cần crawl
- Website có dùng JavaScript không? (→ chọn crawler)
- Màu chủ đạo của site gốc? (hex color)
- Tên website?
Bước 2 — Chọn crawler phù hợp
| Website | Crawler |
| Tĩnh (HTML, WordPress, PHP) | scripts/crawler.py |
| Có JS (React, Vue, Next.js) | scripts/crawler_playwright.py |
Bước 3 — Cài môi trường
pip install httpx beautifulsoup4 playwright aiosqlite lxml
playwright install chromiumBước 4 — Chạy crawler
# Website tĩnh
python scripts/crawler.py --url https://example.com --depth 2 --db site.sqlite
# Website có JavaScript (React, Vue, SPA)
python scripts/crawler_playwright.py --url https://example.com --depth 2 --db site.sqliteTham số quan trọng:
--depth 2— đủ cho hầu hết site (depth 1 = chỉ trang chủ)--max-pages 200— giới hạn nếu site lớn--delay 2.0— tránh bị block
Bước 5 — Generate website
python scripts/generate_site.py \
--db site.sqlite \
--out ./output-site \
--site-name "Tên Website" \
--primary-color "#BB162B" \
--download-imagesScript này tạo Next.js project hoàn chỉnh gồm:
package.json— dependencies (Next.js 15, Tailwind v4, TypeScript)src/lib/data.ts— toàn bộ data từ crawlsrc/app/layout.tsx— responsive header/footer với mobile menusrc/app/page.tsx— homepage với hero + page gridsrc/app/[slug]/page.tsx— content pages với sidebarsrc/app/globals.css— Tailwind v4 + custom animations
Bước 6 — Chạy local
cd output-site
npm install
npm run dev
# → http://localhost:3000Output Features
Layout PC (≥1024px)
- Fixed header với dropdown navigation
- 2-col layout: main content + sticky sidebar
- Page grid 3 cột ở homepage
Layout Mobile (<768px)
- Hamburger menu với slide-down drawer
- Single column layout
- Touch-friendly buttons (min 44px tap target)
- Breadcrumb navigation
UX
- Smooth scroll, fade-up animations
- Sticky sidebar (related pages)
- 404 not-found page
- SEO metadata tự động (title, description)
- Static Generation (SSG) — nhanh, không cần server
Core Principles
- Luôn kiểm tra robots.txt trước khi crawl
- Rate limiting: delay 1.5–2s giữa requests
- Deduplication: URL hash để tránh crawl trùng
- Error handling: retry với exponential backoff
- Responsive first: mobile layout là ưu tiên
- Respect scope: chỉ crawl domain mục tiêu
Files
| File | Mô tả |
scripts/crawler.py | Crawler cho site tĩnh (httpx + BS4) |
scripts/crawler_playwright.py | Crawler cho JS/SPA (Playwright) |
scripts/generate_site.py | Tạo Next.js website từ SQLite |
references/planning-questions.md | Câu hỏi cần hỏi trước khi bắt đầu |
references/tech-stack.md | So sánh tool crawl |
references/database-schema.md | Schema SQLite |
references/data-processing.md | Query và xử lý dữ liệu |
Ví dụ hoàn chỉnh — Clone kia-hcm.com
# 1. Crawl (site WordPress có lazy loading → dùng Playwright)
python scripts/crawler_playwright.py \
--url https://kia-hcm.com \
--depth 2 \
--db kia.sqlite \
--delay 2.0
# 2. Generate Next.js site
python scripts/generate_site.py \
--db kia.sqlite \
--out ./kia-local \
--site-name "KIA HCM" \
--primary-color "#BB162B" \
--download-images
# 3. Chạy
cd kia-local && npm install && npm run devDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

