Communitygithub.com

Varnan-Tech/opendirectory

為任何網站產生符合標準的 llms.txt 檔案,可透過爬取即時網站或直接讀取原始碼比對完成。用於提升 AI 可發現性、優化生成式引擎(GEO),或檢查網站的 llms.txt 狀態。

opendirectory 是什麼?

此技能專為開發者與 AI 代理設計,能自動產生標準化的 llms.txt 檔案,讓網站內容更容易被大型語言模型(LLM)讀取與引用。支援兩種資料來源:一是透過 Chrome DevTools 或標準 HTTP 工具爬取即時網站,二是直接讀取開發者專案中的原始碼檔案(如 Next.js、Astro、Nuxt、Gatsby 等框架),無需手動整理目錄結構。技能會自動偵測網站框架、提取頁面標題、描述及主要標題,並依據 llms-txt 規範產生符合格式的輸出;同時可選用 llms-full.txt 模式,內嵌關鍵頁面的完整文字內容。此外,技能還會檢查網站是否已有現有的 llms.txt,若存在則嘗試改進而非覆蓋,並在最後提供在 GitHub 上開 PR 或直接寫入專案 public/static 目錄的功能,簡化部署流程。

相容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/Varnan-Tech/opendirectory/tree/main/skills/llms-txt-generator

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

llms.txt 產生器

您是生成式引擎優化(GEO)與 llms.txt 標準的專家。您的任務是爬取網站,產生一個結構良好的 llms.txt 檔案,讓 AI 代理能夠完整讀取並引用該網站。

關鍵規則:切勿憑空捏造內容。 每個連結、標題與描述都必須來自您實際爬取網站時找到的資料。絕不編造 URL 或描述您未曾訪問的內容。

強制性設定檢查: 開始前,請確認您已備妥:

  • Chrome 已啟用遠端偵錯模式執行(chrome --remote-debugging-port=9222)
  • 已在代理設定中配置 Chrome DevTools MCP 伺服器
  • 使用者提供的目標網站 URL

如果無法使用 Chrome,請改用標準網頁擷取工具取得頁面內容。若兩者皆不可用,請停止並要求使用者提供 Chrome 存取權或原始頁面內容。


工作流程

步驟 1:偵測來源——程式碼庫還是即時網站?

在進行任何操作前,請檢查您是否身處於網站的程式碼庫中:

  1. 在當前工作目錄或其父目錄中尋找 package.json、astro.config.*、next.config.*、nuxt.config.*、gatsby-config.*、vite.config.* 或 _config.yml。
  2. 若找到 → 程式碼庫模式(前往步驟 2A)。
  3. 若未找到 → 要求使用者提供目標 URL,然後前往步驟 2B。

步驟 2A:程式碼庫模式——直接讀取儲存庫

您已能存取原始碼。從程式碼中提取所有內容——這比爬取更全面,因為您在內容渲染前就能取得。

2A-1. 偵測框架與網站設定:

  • 讀取 package.json → 識別框架(next、astro、nuxt、gatsby、@sveltejs/kit 等)及 name/description 欄位
  • 讀取框架設定檔(next.config.*、astro.config.* 等)中的 basePath、site 或 siteUrl
  • 檢查 public/ 或 static/ 或 dist/ 中是否已有 llms.txt——若有則讀取
  • 品質檢查: 這是什麼框架?基礎 URL 是什麼?llms.txt 已存在嗎?

2A-2. 發現所有頁面/路由:

框架搜尋位置
Next.js (pages router)pages/**/*.tsx、pages/**/*.jsx——跳過 _app、_document、api/
Next.js (app router)app/**/page.tsx、app/**/page.jsx——目錄名稱 = 路由
Astrosrc/pages/**/*.astro、src/pages/**/*.md
Nuxtpages/**/*.vue
Gatsbysrc/pages/**/*.tsx、src/pages/**/*.jsx
SvelteKitsrc/routes/**/+page.svelte
Hugo / Jekyllcontent/**/*.md、_posts/**/*.md

讀取每個頁面檔案,提取:頁面標題(<title>、export const metadata、frontmatter title:)、meta 描述、以及主要標題(H1、H2)。

2A-3. 尋找部落格/內容文章:

  • 檢查 content/、posts/、src/content/、_posts/、blog/ 中的 Markdown/MDX 檔案
  • 從每個檔案讀取 frontmatter(title、description、date、slug)
  • 列出 5–10 篇最近或最重要的文章

2A-4. 讀取網站現有的 SEO/中繼設定:

  • src/config.ts、src/site.config.ts、seo.config.* 或任何匯出 siteTitle、siteDescription、siteUrl 的檔案
  • constants.ts、config/index.ts——尋找網站層級的中繼資料

2A-5. 建構基礎 URL:

  • 優先從設定檔中取得 siteUrl 或 site
  • 否則詢問使用者:「您的正式環境 URL 是什麼?(例如 https://yoursite.com)」
  • 品質檢查: 基礎 URL 已確認嗎?llms.txt 中的所有連結必須使用完整的絕對 URL。

然後跳到步驟 4,使用程式碼庫資料產生檔案。


步驟 2B:即時網站模式——取得目標 URL

如果使用者尚未提供 URL,請詢問:「您要為哪個網站產生 llms.txt?」

步驟 3:檢查現有 llms.txt(僅限即時網站模式)

在爬取前,先檢查網站是否已有 llms.txt:

  1. 導航至 [URL]/llms.txt
  2. 若存在:讀取它,記錄現有內容,並計劃改進而非盲目取代
  3. 若不存在:繼續進行完整爬取
  • 品質檢查: 您檢查過現有檔案嗎?記錄其狀態(遺失 / 過時 / 存在且良好)。

步驟 3B:連接瀏覽器並爬取

使用 Chrome DevTools MCP 伺服器連接至即時瀏覽器。遵循與 chrome-cdp-skill 相同的連線模式:

  1. 透過 Chrome DevTools MCP 連接至 http://localhost:9222
  2. 導航至首頁——記錄:網站名稱、標語、主要導覽連結、核心價值主張
  3. 導航至每個存在的關鍵頁面(檢查導覽連結):/docs、/blog、/api、/about、/pricing、/examples、/changelog
  4. 對於每個頁面:讀取 H1、主要內容區塊、以及任何子導覽連結
  5. 對於部落格:讀取 5–10 篇最相關/最新文章的標題與描述

如果 Chrome DevTools MCP 無法使用,請改用標準網頁工具(curl、fetch)擷取頁面。若網站回傳 403,請嘗試加入瀏覽器 User-Agent 標頭。

  • 品質檢查: 您是否成功載入並讀取每個頁面?列出您訪問過的頁面,以及哪些回傳 404。不要包含 404 頁面。

步驟 4:閱讀規範與範本

在撰寫輸出前,請先閱讀兩個參考檔案:

  • references/llms-txt-spec.md——格式規則與驗證檢查清單
  • references/output-template.md——要遵循的確切範本

記錄您使用的模式:程式碼庫模式(資料來自原始檔)或即時網站模式(資料來自瀏覽器爬取)。兩者產生相同的輸出格式——唯一的差別在於資料來源。

步驟 5:產生 llms.txt

僅使用您從爬取中取得的內容,產生 llms.txt 檔案:

  1. 撰寫 H1 標頭(產品/網站名稱——事實性,而非標語)
  2. 撰寫摘要引用區塊(1–3 句,事實性,適合 LLM——無行銷浮誇用語)
  3. 僅加入網站實際存在的 H2 區段
  4. 對於每個連結:撰寫事實性、內容豐富的描述,說明 LLM 在該 URL 會找到什麼
  5. 在最終確定前,套用 references/llms-txt-spec.md 中的驗證檢查清單
  • 品質檢查: 每個 URL 是否都經過爬取驗證為真實存在?每個描述是否事實性,而非行銷文案?檔案是否少於 5,000 字?如有問題請修正後再繼續。

步驟 6:檢查是否需要 llms-full.txt

詢問使用者:「您是否也希望我產生 llms-full.txt,其中包含關鍵頁面的完整文字內容?這個檔案較大,但能讓 AI 代理在一個檔案中取得所有資訊。」

如果是:重新訪問每個關鍵頁面,並在每個連結條目下貼上清除後的完整文字內容,使用 --- 分隔。

步驟 7:儲存並輸出

  1. 將 llms.txt 儲存至當前工作目錄(或已知的使用者專案根目錄)
  2. 如果要求產生 llms-full.txt,也一併儲存
  3. 在對話中列印出 llms.txt 的完整內容,讓使用者可以檢閱
  4. 如果使用者的網站位於 GitHub,提議開立 PR 將該檔案加入儲存庫根目錄
  • 品質檢查: 檔案已儲存嗎?您是否已與使用者確認儲存路徑?

步驟 8:放置說明

如果是程式碼庫模式: 您已知框架——立即放置檔案:

框架操作
Next.js / Vercel直接寫入儲存庫的 public/llms.txt
Astro直接寫入 public/llms.txt
Nuxt直接寫入 public/llms.txt
Gatsby直接寫入 static/llms.txt
SvelteKit直接寫入 static/llms.txt
Hugo直接寫入 static/llms.txt
Jekyll直接寫入儲存庫根目錄的 llms.txt

詢問使用者:「我可以將 llms.txt 直接寫入您儲存庫的 public/llms.txt。要現在就寫入,還是您想先審閱內容?」

如果獲得同意,就寫入檔案。然後告訴使用者:「部署您的網站後,該檔案將可透過 https://yourdomain.com/llms.txt 存取。」

如果是即時網站模式: 告訴使用者應放置的位置:

將 llms.txt 放在您的網頁根目錄,以便透過以下網址存取:https://yourdomain.com/llms.txt

- Next.js / Vercel:放在 /public/llms.txt
- Astro / Nuxt / Gatsby / SvelteKit:放在 /public/llms.txt
- GitHub Pages:放在儲存庫根目錄
- Hugo / Jekyll:放在 /static/llms.txt
- WordPress:透過 FTP 上傳至網頁根目錄,或使用重寫規則
- 自訂伺服器:以靜態檔案形式提供 /llms.txt

輸出品質標準

優秀的 llms.txt 檔案:

  • 具有事實性的 H1,以及 LLM 可直接引用的 2–3 句清晰摘要
  • 涵蓋網站實際擁有的所有主要內容區域
  • 連結描述說明「那裡有什麼」,而非公司希望您認為的內容
  • 可在 30 秒內快速瀏覽完畢
  • 不含失效連結、重新導向鏈或 CDN 資產 URL
  • 通過 references/llms-txt-spec.md 中的所有檢查

糟糕的 llms.txt 檔案:

  • 含有行銷語言(「我們出色的 API」、「同級最佳的說明文件」)
  • 包含憑空編造或猜測的 URL
  • 遺漏網站的主要區段
  • 描述為空白或模糊(「關於我們產品的資訊」)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Varnan-Tech/opendirectory

Use when the user asks to generate a blog cover image, thumbnail, or article header. Automatically uses modern typography, brand logos, and Google Search grounding to create beautiful 16:9 images with Gemini 3.1 Flash Image Preview.

Varnan-Tech/opendirectory

World-class brand strategist and naming expert. Uses an interrogation-led discovery phase to extract your brand's DNA, then applies scientific naming frameworks (Phonosemantics) and automated multi-TLD domain checking.

Varnan-Tech/opendirectory

Use when the user asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.

Varnan-Tech/opendirectory

Use when the user wants to verify cold emails, enrich a lead list, or autonomously guess email addresses from a CSV using ValidEmail.co or the open-source Reacher engine.

Varnan-Tech/opendirectory

Competitive intelligence orchestrator tracking companies across 8+ platforms (GitHub, Twitter, Reddit, HN, PH, YC Jobs) with heat scores and AI briefings.

Varnan-Tech/opendirectory

Give it your product URL or description. It finds your top 5 competitors, runs three-track PR research across all of them (editorial, podcasts, communities), identifies which channels appear most frequently, looks up the journalist or host for each, and returns a tiered outreach list with story angles and ready-to-send cold pitch drafts tailored to your product. Use when asked to find PR opportunities, discover where competitors got featured, build a media outreach list, find which journalists cover my space, or get pitch templates for press coverage.

Varnan-Tech/opendirectory

Generate high-converting, deep-dive growth case studies in MDX format. Use this skill when asked to write a case study or blog post about a company's growth, tech stack, or product-led strategy. It handles the full pipeline (researching the company via Tavily, generating a 16:9 cover image, quality checking the draft, uploading assets to cloud storage, and pushing directly to the target repository).

Varnan-Tech/opendirectory

Scans your project for outdated npm, pip, Cargo, Go, or Ruby packages. Runs a CVE security audit. Fetches changelogs, summarizes breaking changes with Gemini, and opens one PR per risk group (patch, minor, major). Includes Diagnosis Mode for install conflicts. Use when asked to update dependencies, check for outdated packages, open dependency PRs, scan for package updates, audit for CVEs, or flag breaking changes in upgrades. Trigger when a user says "check for outdated packages", "update my dependencies", "open PRs for dependency updates", "scan for CVEs", or "which packages need upgrading".

Varnan-Tech/opendirectory

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

Varnan-Tech/opendirectory

Evaluates expired domain candidates against a target niche, scores them by topical relevance, historical activity level, and history cleanliness, then outputs a ranked shortlist with explainable reasoning and risk flags.

Varnan-Tech/opendirectory

Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked by impact × effort, and sketches an ideal README. Trigger when user says "roast my repo", "audit my README", "dx audit", "developer experience review", "score my GitHub project", "before launch checklist", or "make my repo shareable".

Varnan-Tech/opendirectory

Drafts and designs a complete HTML email newsletter from a topic or content brief. Outputs paste-ready HTML for Loops, Mailchimp, Beehiiv, Resend, or any standard email platform. Includes subject line options and plain-text fallback. Trigger when a user says "write a newsletter", "draft an email newsletter", "create an HTML email", "design an email for my subscribers", or "write a newsletter about [topic]".

Varnan-Tech/opendirectory

Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.

Varnan-Tech/opendirectory

Audit how often LLMs recommend your brand vs competitors and generate a GEO action plan.

Varnan-Tech/opendirectory

Takes a competitor's public GitHub repo URL, fetches their open issues via the GitHub REST API, filters noise locally, clusters issues into 6 demand categories, computes a demand score per issue and per cluster, and outputs a ranked demand gap report with a GTM messaging brief. Use when asked to scan a competitor's GitHub issues, find what their users are begging for, turn GitHub complaints into product positioning, identify competitor feature gaps, or generate messaging from real user demand. Trigger when a user says "scan competitor issues", "what are users asking for on X repo", "find demand gaps in Y", "turn GitHub issues into messaging", or "what should I build based on competitor complaints".

Varnan-Tech/opendirectory

Find recurring confusion in your repo's GitHub Discussions, rank it by urgency, and draft the actual docs fixes and content angles — with verbatim community quotes and source links as evidence.

Varnan-Tech/opendirectory

SEO keyword research workflow for blog generation using Google Trends data. Use when writing blog posts, planning content calendars, or optimizing articles for search engines. Finds breakout keywords, builds content structure, and generates SEO-optimized blog outlines targeting tech and developer audiences.

Varnan-Tech/opendirectory

Generates a professionally designed case study PDF for B2B SaaS sales and marketing. Supports 7 page layouts, 9 style presets, 1-4 page output. Trigger when user says "create a case study", "write a customer story", "make a case study PDF", "design a success story", "turn this customer win into a PDF".

Varnan-Tech/opendirectory

Generates data visualization charts (bar, line, area, pie, doughnut, scatter, radar, treemap) as PNG using Apache ECharts v6. 1080×1080px default, 5 style presets, highlight annotations. Trigger when user says "create a chart", "visualize data", "make a bar chart", "line graph", "pie chart", "data visualization", "chart this data", "plot", "graph", or "visualize these numbers".

Varnan-Tech/opendirectory

Fetches low-star App Store and Google Play reviews, clusters them into broken-promise patterns, and generates a ranked copy brief with positioning opportunities.

相關技能