[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFXMMG9FKM09821TM6ZA4Z":3,"skill-same:01M6AFXMMG9FKM09821TM6ZA4Z":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":53,"linkOnly":54,"markdownContent":55,"markdownBody":56,"frontMatter":57,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":63,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M6AFXMMG9FKM09821TM6ZA4Z","cf-crawl","Cloudflare 网站内容抓取","Crawl entire websites using Cloudflare Browser Rendering \u002Fcrawl API. Initiates async crawl jobs, polls for completion, and saves results as markdown files. Useful for ingesting documentation sites, knowledge bases, or any web content into your project context. Requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables.","使用 Cloudflare Browser Rendering 的 \u002Fcrawl API 抓取整个网站。启动异步抓取任务，轮询完成状态，并将结果保存为 markdown 文件。适用于将文档站点、知识库或任何 Web 内容摄取到项目上下文中。需要 CLOUDFLARE_ACCOUNT_ID 和 CLOUDFLARE_API_TOKEN 环境变量。","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33602,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fcf-crawl\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRK8296DVQW3GCBXC89NVG","网页搜索与信息研究","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],"cf crawl","crawl","useful","web","for","cloudflare browser rendering","Variables","web content","rendering","environment variables","as","token","project","files","context","knowledge","markdown","api","content","cloudflare","browser","documentation","2026-11-10 10:12:30",false,"---\nname: cf-crawl\ndescription: \"Crawl entire websites using Cloudflare Browser Rendering \u002Fcrawl API. Initiates async crawl jobs, polls for completion, and saves results as markdown files. Useful for ingesting documentation sites, knowledge bases, or any web content into your project context. Requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables.\"\n---\n\n# Cloudflare Website Crawler\n\nYou are a web crawling assistant that uses Cloudflare's Browser Rendering \u002Fcrawl REST API to crawl websites and save their content as markdown files for local use.\n\n## Prerequisites\n\nThe user must have:\n1. A Cloudflare account with Browser Rendering enabled\n2. `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` available (see below)\n\n## Workflow\n\nWhen the user asks to crawl a website, follow this exact workflow:\n\n### Step 1: Load Credentials\n\nLook for `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` in this order:\n\n1. **Current environment variables** - Check if already exported in the shell\n2. **Project `.env` file** - Read `.env` in the current working directory and extract the values\n3. **Project `.env.local` file** - Read `.env.local` in the current working directory\n4. **Home directory `.env`** - Read `~\u002F.env` as a last resort\n\nTo load from a `.env` file, parse it line by line looking for `CLOUDFLARE_ACCOUNT_ID=` and `CLOUDFLARE_API_TOKEN=` entries. Use this bash approach:\n\n```bash\n# Load from .env if vars are not already set\nif [ -z \"$CLOUDFLARE_ACCOUNT_ID\" ] || [ -z \"$CLOUDFLARE_API_TOKEN\" ]; then\n  for envfile in .env .env.local \"$HOME\u002F.env\"; do\n    if [ -f \"$envfile\" ]; then\n      eval \"$(grep -E '^CLOUDFLARE_(ACCOUNT_ID|API_TOKEN)=' \"$envfile\" | sed 's\u002F^\u002Fexport \u002F')\"\n    fi\n  done\nfi\n```\n\nIf credentials are still missing after checking all sources, tell the user to add them to their project `.env` file:\n```\nCLOUDFLARE_ACCOUNT_ID=your-account-id\nCLOUDFLARE_API_TOKEN=your-api-token\n```\n\nThe API token needs \"Browser Rendering - Edit\" permission. Create one at [Cloudflare Dashboard > API Tokens](https:\u002F\u002Fdash.cloudflare.com\u002Fprofile\u002Fapi-tokens).\n\n### Step 2: Validate Credentials\n\nVerify both variables are set and non-empty before proceeding.\n\n### Step 3: Initiate Crawl\n\nSend a POST request to start the crawl job. Choose parameters based on user needs:\n\n```bash\ncurl -s -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"url\": \"\u003CTARGET_URL>\",\n    \"limit\": \u003CNUMBER_OF_PAGES>,\n    \"formats\": [\"markdown\"],\n    \"options\": {\n      \"excludePatterns\": [\"**\u002Fchangelog\u002F**\", \"**\u002Fapi-reference\u002F**\"]\n    }\n  }'\n```\n\nFor incremental crawls, add the `modifiedSince` parameter (Unix timestamp in seconds):\n\n```bash\ncurl -s -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"url\": \"\u003CTARGET_URL>\",\n    \"limit\": \u003CNUMBER_OF_PAGES>,\n    \"formats\": [\"markdown\"],\n    \"modifiedSince\": \u003CUNIX_TIMESTAMP>\n  }'\n```\n\nWhen `--since` is provided, convert to Unix timestamp: `date -d \"2026-03-10\" +%s` (Linux) or `date -j -f \"%Y-%m-%d\" \"2026-03-10\" +%s` (macOS).\n\nThe response returns a job ID:\n```json\n{\"success\": true, \"result\": \"job-uuid-here\"}\n```\n\n### Step 4: Poll for Completion\n\nPoll the job status every 5 seconds until it completes:\n\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?limit=1\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | python3 -c \"import sys,json; d=json.load(sys.stdin); print(f'Status: {d[\\\"result\\\"][\\\"status\\\"]} | Finished: {d[\\\"result\\\"][\\\"finished\\\"]}\u002F{d[\\\"result\\\"][\\\"total\\\"]}')\"\n```\n\nPossible job statuses:\n- `running` - Still in progress, keep polling\n- `completed` - All pages processed\n- `cancelled_due_to_timeout` - Exceeded 7-day limit\n- `cancelled_due_to_limits` - Hit account limits\n- `errored` - Something went wrong\n\n### Step 5: Retrieve Results\n\nWhen using `modifiedSince`, check for skipped pages to see what was unchanged:\n\n```bash\n# See which pages were skipped (not modified since the given timestamp)\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=skipped&limit=50\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\nFetch all completed records using pagination (cursor-based):\n\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=completed&limit=50\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\nIf there are more records, use the `cursor` value from the response:\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=completed&limit=50&cursor=\u003CCURSOR>\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\n### Step 6: Save Results\n\nSave each page's markdown content to a local directory. Use a script like:\n\n```bash\n# Create output directory\nmkdir -p .crawl-output\n\n# Fetch and save all pages\npython3 -c \"\nimport json, os, re, sys, urllib.request\n\naccount_id = os.environ['CLOUDFLARE_ACCOUNT_ID']\napi_token = os.environ['CLOUDFLARE_API_TOKEN']\njob_id = '\u003CJOB_ID>'\nbase = f'https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F{account_id}\u002Fbrowser-rendering\u002Fcrawl\u002F{job_id}'\noutdir = '.crawl-output'\nos.makedirs(outdir, exist_ok=True)\n\ncursor = None\ntotal_saved = 0\n\nwhile True:\n    url = f'{base}?status=completed&limit=50'\n    if cursor:\n        url += f'&cursor={cursor}'\n\n    req = urllib.request.Request(url, headers={\n        'Authorization': f'Bearer {api_token}'\n    })\n    with urllib.request.urlopen(req) as resp:\n        data = json.load(resp)\n\n    records = data.get('result', {}).get('records', [])\n    if not records:\n        break\n\n    for rec in records:\n        page_url = rec.get('url', '')\n        md = rec.get('markdown', '')\n        if not md:\n            continue\n        # Convert URL to filename\n        name = re.sub(r'https?:\u002F\u002F', '', page_url)\n        name = re.sub(r'[^a-zA-Z0-9]', '_', name).strip('_')[:120]\n        filepath = os.path.join(outdir, f'{name}.md')\n        with open(filepath, 'w') as f:\n            f.write(f'\u003C!-- Source: {page_url} -->\\n\\n')\n            f.write(md)\n        total_saved += 1\n\n    cursor = data.get('result', {}).get('cursor')\n    if cursor is None:\n        break\n\nprint(f'Saved {total_saved} pages to {outdir}\u002F')\n\"\n```\n\n## Parameter Reference\n\n### Core Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `url` | string | (required) | Starting URL to crawl |\n| `limit` | number | 10 | Max pages to crawl (up to 100,000) |\n| `depth` | number | 100,000 | Max link depth from starting URL |\n| `formats` | array | [\"html\"] | Output formats: `html`, `markdown`, `json` |\n| `render` | boolean | true | `true` = headless browser, `false` = fast HTML fetch |\n| `source` | string | \"all\" | Page discovery: `all`, `sitemaps`, `links` |\n| `maxAge` | number | 86400 | Cache validity in seconds (max 604800) |\n| `modifiedSince` | number | - | Unix timestamp; only crawl pages modified after this time |\n\n### Options Object\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `includePatterns` | array | [] | Wildcard patterns to include (`*` and `**`) |\n| `excludePatterns` | array | [] | Wildcard patterns to exclude (higher priority) |\n| `includeSubdomains` | boolean | false | Follow links to subdomains |\n| `includeExternalLinks` | boolean | false | Follow external links |\n\n### Advanced Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `jsonOptions` | object | AI-powered structured extraction (prompt, response_format) |\n| `authenticate` | object | HTTP basic auth (username, password) |\n| `setExtraHTTPHeaders` | object | Custom headers for requests |\n| `rejectResourceTypes` | array | Skip: image, media, font, stylesheet |\n| `userAgent` | string | Custom user agent string |\n| `cookies` | array | Custom cookies for requests |\n\n## Usage Examples\n\n### Crawl documentation site (most common)\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50\n```\nCrawls up to 50 pages, saves as markdown.\n\n### Crawl with filters\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 100 --include \"\u002Fguides\u002F**,\u002Fapi\u002F**\" --exclude \"\u002Fchangelog\u002F**\"\n```\n\n### Incremental crawl (diff detection)\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50 --since 2026-03-10\n```\nOnly crawls pages modified since the given date. Skipped pages appear with `status=skipped` in results. This is ideal for daily doc-syncing: do one full crawl, then incremental updates to see only what changed.\n\n### Fast crawl without JavaScript rendering\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --no-render --limit 200\n```\nUses static HTML fetch - faster and cheaper but won't capture JS-rendered content.\n\n### Crawl and merge into single file\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50 --merge\n```\nMerges all pages into a single markdown file for easy context loading.\n\n## Argument Parsing\n\nWhen invoked as `\u002Fcf-crawl`, parse the arguments as follows:\n\n- First positional argument: the URL to crawl\n- `--limit N` or `-l N`: max pages (default: 20)\n- `--depth N` or `-d N`: max depth (default: 100000)\n- `--include \"pattern1,pattern2\"`: include URL patterns\n- `--exclude \"pattern1,pattern2\"`: exclude URL patterns\n- `--no-render`: disable JavaScript rendering (faster)\n- `--merge`: combine all output into a single file\n- `--output DIR` or `-o DIR`: output directory (default: `.crawl-output`)\n- `--source sitemaps|links|all`: page discovery method (default: all)\n- `--since DATE`: only crawl pages modified since DATE (ISO date like `2026-03-10` or Unix timestamp). Converts to Unix timestamp for the `modifiedSince` API parameter\n\nIf no URL is provided, ask the user for the target URL.\n\n## Important Notes\n\n- The \u002Fcrawl endpoint respects robots.txt directives including crawl-delay\n- Blocked URLs appear with `\"status\": \"disallowed\"` in results\n- Free plan: 10 minutes of browser time per day\n- Job results are available for 14 days after completion\n- Max job runtime: 7 days\n- Response page size limit: 10 MB per page\n- Use `render: false` for static sites to save browser time\n- Pattern wildcards: `*` matches any character except `\u002F`, `**` matches including `\u002F`\n","# Cloudflare Website Crawler\n\nYou are a web crawling assistant that uses Cloudflare's Browser Rendering \u002Fcrawl REST API to crawl websites and save their content as markdown files for local use.\n\n## Prerequisites\n\nThe user must have:\n1. A Cloudflare account with Browser Rendering enabled\n2. `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` available (see below)\n\n## Workflow\n\nWhen the user asks to crawl a website, follow this exact workflow:\n\n### Step 1: Load Credentials\n\nLook for `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` in this order:\n\n1. **Current environment variables** - Check if already exported in the shell\n2. **Project `.env` file** - Read `.env` in the current working directory and extract the values\n3. **Project `.env.local` file** - Read `.env.local` in the current working directory\n4. **Home directory `.env`** - Read `~\u002F.env` as a last resort\n\nTo load from a `.env` file, parse it line by line looking for `CLOUDFLARE_ACCOUNT_ID=` and `CLOUDFLARE_API_TOKEN=` entries. Use this bash approach:\n\n```bash\n# Load from .env if vars are not already set\nif [ -z \"$CLOUDFLARE_ACCOUNT_ID\" ] || [ -z \"$CLOUDFLARE_API_TOKEN\" ]; then\n  for envfile in .env .env.local \"$HOME\u002F.env\"; do\n    if [ -f \"$envfile\" ]; then\n      eval \"$(grep -E '^CLOUDFLARE_(ACCOUNT_ID|API_TOKEN)=' \"$envfile\" | sed 's\u002F^\u002Fexport \u002F')\"\n    fi\n  done\nfi\n```\n\nIf credentials are still missing after checking all sources, tell the user to add them to their project `.env` file:\n```\nCLOUDFLARE_ACCOUNT_ID=your-account-id\nCLOUDFLARE_API_TOKEN=your-api-token\n```\n\nThe API token needs \"Browser Rendering - Edit\" permission. Create one at [Cloudflare Dashboard > API Tokens](https:\u002F\u002Fdash.cloudflare.com\u002Fprofile\u002Fapi-tokens).\n\n### Step 2: Validate Credentials\n\nVerify both variables are set and non-empty before proceeding.\n\n### Step 3: Initiate Crawl\n\nSend a POST request to start the crawl job. Choose parameters based on user needs:\n\n```bash\ncurl -s -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"url\": \"\u003CTARGET_URL>\",\n    \"limit\": \u003CNUMBER_OF_PAGES>,\n    \"formats\": [\"markdown\"],\n    \"options\": {\n      \"excludePatterns\": [\"**\u002Fchangelog\u002F**\", \"**\u002Fapi-reference\u002F**\"]\n    }\n  }'\n```\n\nFor incremental crawls, add the `modifiedSince` parameter (Unix timestamp in seconds):\n\n```bash\ncurl -s -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"url\": \"\u003CTARGET_URL>\",\n    \"limit\": \u003CNUMBER_OF_PAGES>,\n    \"formats\": [\"markdown\"],\n    \"modifiedSince\": \u003CUNIX_TIMESTAMP>\n  }'\n```\n\nWhen `--since` is provided, convert to Unix timestamp: `date -d \"2026-03-10\" +%s` (Linux) or `date -j -f \"%Y-%m-%d\" \"2026-03-10\" +%s` (macOS).\n\nThe response returns a job ID:\n```json\n{\"success\": true, \"result\": \"job-uuid-here\"}\n```\n\n### Step 4: Poll for Completion\n\nPoll the job status every 5 seconds until it completes:\n\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?limit=1\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | python3 -c \"import sys,json; d=json.load(sys.stdin); print(f'Status: {d[\\\"result\\\"][\\\"status\\\"]} | Finished: {d[\\\"result\\\"][\\\"finished\\\"]}\u002F{d[\\\"result\\\"][\\\"total\\\"]}')\"\n```\n\nPossible job statuses:\n- `running` - Still in progress, keep polling\n- `completed` - All pages processed\n- `cancelled_due_to_timeout` - Exceeded 7-day limit\n- `cancelled_due_to_limits` - Hit account limits\n- `errored` - Something went wrong\n\n### Step 5: Retrieve Results\n\nWhen using `modifiedSince`, check for skipped pages to see what was unchanged:\n\n```bash\n# See which pages were skipped (not modified since the given timestamp)\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=skipped&limit=50\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\nFetch all completed records using pagination (cursor-based):\n\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=completed&limit=50\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\nIf there are more records, use the `cursor` value from the response:\n```bash\ncurl -s -X GET \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F${CLOUDFLARE_ACCOUNT_ID}\u002Fbrowser-rendering\u002Fcrawl\u002F\u003CJOB_ID>?status=completed&limit=50&cursor=\u003CCURSOR>\" \\\n  -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\"\n```\n\n### Step 6: Save Results\n\nSave each page's markdown content to a local directory. Use a script like:\n\n```bash\n# Create output directory\nmkdir -p .crawl-output\n\n# Fetch and save all pages\npython3 -c \"\nimport json, os, re, sys, urllib.request\n\naccount_id = os.environ['CLOUDFLARE_ACCOUNT_ID']\napi_token = os.environ['CLOUDFLARE_API_TOKEN']\njob_id = '\u003CJOB_ID>'\nbase = f'https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F{account_id}\u002Fbrowser-rendering\u002Fcrawl\u002F{job_id}'\noutdir = '.crawl-output'\nos.makedirs(outdir, exist_ok=True)\n\ncursor = None\ntotal_saved = 0\n\nwhile True:\n    url = f'{base}?status=completed&limit=50'\n    if cursor:\n        url += f'&cursor={cursor}'\n\n    req = urllib.request.Request(url, headers={\n        'Authorization': f'Bearer {api_token}'\n    })\n    with urllib.request.urlopen(req) as resp:\n        data = json.load(resp)\n\n    records = data.get('result', {}).get('records', [])\n    if not records:\n        break\n\n    for rec in records:\n        page_url = rec.get('url', '')\n        md = rec.get('markdown', '')\n        if not md:\n            continue\n        # Convert URL to filename\n        name = re.sub(r'https?:\u002F\u002F', '', page_url)\n        name = re.sub(r'[^a-zA-Z0-9]', '_', name).strip('_')[:120]\n        filepath = os.path.join(outdir, f'{name}.md')\n        with open(filepath, 'w') as f:\n            f.write(f'\u003C!-- Source: {page_url} -->\\n\\n')\n            f.write(md)\n        total_saved += 1\n\n    cursor = data.get('result', {}).get('cursor')\n    if cursor is None:\n        break\n\nprint(f'Saved {total_saved} pages to {outdir}\u002F')\n\"\n```\n\n## Parameter Reference\n\n### Core Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `url` | string | (required) | Starting URL to crawl |\n| `limit` | number | 10 | Max pages to crawl (up to 100,000) |\n| `depth` | number | 100,000 | Max link depth from starting URL |\n| `formats` | array | [\"html\"] | Output formats: `html`, `markdown`, `json` |\n| `render` | boolean | true | `true` = headless browser, `false` = fast HTML fetch |\n| `source` | string | \"all\" | Page discovery: `all`, `sitemaps`, `links` |\n| `maxAge` | number | 86400 | Cache validity in seconds (max 604800) |\n| `modifiedSince` | number | - | Unix timestamp; only crawl pages modified after this time |\n\n### Options Object\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `includePatterns` | array | [] | Wildcard patterns to include (`*` and `**`) |\n| `excludePatterns` | array | [] | Wildcard patterns to exclude (higher priority) |\n| `includeSubdomains` | boolean | false | Follow links to subdomains |\n| `includeExternalLinks` | boolean | false | Follow external links |\n\n### Advanced Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `jsonOptions` | object | AI-powered structured extraction (prompt, response_format) |\n| `authenticate` | object | HTTP basic auth (username, password) |\n| `setExtraHTTPHeaders` | object | Custom headers for requests |\n| `rejectResourceTypes` | array | Skip: image, media, font, stylesheet |\n| `userAgent` | string | Custom user agent string |\n| `cookies` | array | Custom cookies for requests |\n\n## Usage Examples\n\n### Crawl documentation site (most common)\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50\n```\nCrawls up to 50 pages, saves as markdown.\n\n### Crawl with filters\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 100 --include \"\u002Fguides\u002F**,\u002Fapi\u002F**\" --exclude \"\u002Fchangelog\u002F**\"\n```\n\n### Incremental crawl (diff detection)\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50 --since 2026-03-10\n```\nOnly crawls pages modified since the given date. Skipped pages appear with `status=skipped` in results. This is ideal for daily doc-syncing: do one full crawl, then incremental updates to see only what changed.\n\n### Fast crawl without JavaScript rendering\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --no-render --limit 200\n```\nUses static HTML fetch - faster and cheaper but won't capture JS-rendered content.\n\n### Crawl and merge into single file\n```\n\u002Fcf-crawl https:\u002F\u002Fdocs.example.com --limit 50 --merge\n```\nMerges all pages into a single markdown file for easy context loading.\n\n## Argument Parsing\n\nWhen invoked as `\u002Fcf-crawl`, parse the arguments as follows:\n\n- First positional argument: the URL to crawl\n- `--limit N` or `-l N`: max pages (default: 20)\n- `--depth N` or `-d N`: max depth (default: 100000)\n- `--include \"pattern1,pattern2\"`: include URL patterns\n- `--exclude \"pattern1,pattern2\"`: exclude URL patterns\n- `--no-render`: disable JavaScript rendering (faster)\n- `--merge`: combine all output into a single file\n- `--output DIR` or `-o DIR`: output directory (default: `.crawl-output`)\n- `--source sitemaps|links|all`: page discovery method (default: all)\n- `--since DATE`: only crawl pages modified since DATE (ISO date like `2026-03-10` or Unix timestamp). Converts to Unix timestamp for the `modifiedSince` API parameter\n\nIf no URL is provided, ask the user for the target URL.\n\n## Important Notes\n\n- The \u002Fcrawl endpoint respects robots.txt directives including crawl-delay\n- Blocked URLs appear with `\"status\": \"disallowed\"` in results\n- Free plan: 10 minutes of browser time per day\n- Job results are available for 14 days after completion\n- Max job runtime: 7 days\n- Response page size limit: 10 MB per page\n- Use `render: false` for static sites to save browser time\n- Pattern wildcards: `*` matches any character except `\u002F`, `**` matches including `\u002F`\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fcf-crawl",3963,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-15 01:32:48",{"source":9,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add davila7\u002Fclaude-code-templates --skill cf-crawl",{"tool":74,"command":75},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill cf-crawl",{"tool":77,"command":78},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill cf-crawl","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fcf-crawl\u002FSKILL.md",true,[],[83,109,134,158,195,222],{"skillNo":84,"name":85,"nameZh":17,"description":86,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":53},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[],[90,91,92,93,94,35,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","use","when","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":110,"name":111,"nameZh":17,"description":112,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":53},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[],[116,117,118,119,120,121,122,123,43,124,125,98,126,127,128,129,130,131,132,133],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":135,"name":136,"nameZh":17,"description":137,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":53},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[],[141,142,143,144,145,146,147,35,148,149,150,151,152,153,154,97,155,156,98,157],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":159,"name":160,"nameZh":161,"description":162,"descriptionZh":163,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":164,"licenseFileUrl":165,"sourceHtmlUrl":166,"categories":167,"keywords":172,"publishedAt":53},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Claude 网页 Artifact 构建","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","用于创建精细的、多组件的 claude.ai HTML artifact 的工具套件，采用现代前端 Web 技术（React、Tailwind CSS、shadcn\u002Fui）。适用于需要状态管理、路由或 shadcn\u002Fui 组件的复杂 artifact —— 不适用于简单的单文件 HTML\u002FJSX artifact。","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[168,169],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":170,"categoryName":171,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[173,34,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,35,194],"artifacts builder","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":196,"name":197,"nameZh":198,"description":199,"descriptionZh":200,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":164,"licenseFileUrl":201,"sourceHtmlUrl":202,"categories":203,"keywords":210,"publishedAt":53},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Playwright Web 应用测试","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","使用 Playwright 与本地 Web 应用进行交互和测试的工具包。支持验证前端功能、调试 UI 行为、捕获浏览器截图以及查看浏览器日志。","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[204,207],{"categoryNo":205,"categoryName":206,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":208,"categoryName":209,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[211,212,213,51,214,34,215,182,183,216,217,218,219,35,220,100,221],"webapp testing","testing","webapp","playwright","applications","debugging","toolkit","logs","screenshots","local","behavior",{"skillNo":223,"name":224,"nameZh":225,"description":226,"descriptionZh":227,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":164,"licenseFileUrl":228,"sourceHtmlUrl":229,"categories":230,"keywords":237,"publishedAt":53},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","回复事实核查追问","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","在你给出用户可能据以行动的实质性答案或草稿之后——建议或推荐、起草的工件（如目标、计划、推介、提案或电子邮件）、估计或预测、数据分析或解读、他们可能依赖的事实声明，或多步骤论证——在最终确定回复之前调用本技能，然后，如适用，附加 2-3 个简短的后续问题，每个问题都与你刚刚产出的具体内容相关，帮助用户核查关键事实、探究推理或假设，并注意到缺失的上下文。每次对话最多执行一次。当用户询问琐碎的操作方法或简单查找、想要纯教育性解释、仅要求根据提供的内容格式化\u002F转换\u002F组装文件、正在编写将要运行的代码、正在进行创意写作或休闲聊天，或已经要求你复核、引用或审查时跳过——技能文件解释了这些边界和确切的输出格式。","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[231,234],{"categoryNo":232,"categoryName":233,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TMSBZZX4V1THHNVC815","回答复核",{"categoryNo":235,"categoryName":236,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",[238,239,240,241,242,243,244,245,175,246,185,126,49,247,248,249,250,153,251,98,252,253,254,255,256,106,257],"discernment nudge","nudge","interpretation","help","run","reasoning","data","writing","lookup","review","conversation","short","up","invoke","you","analysis","claims","argument","assemble","recommendations"]