Communitygithub.com

Varnan-Tech/opendirectory

为任意网站生成和维护符合标准的 llms.txt 文件 —— 通过爬取线上站点或直接读取网站代码库实现。当你需要创建 llms.txt、为网站添加 AI 可发现性、优化 GEO(生成式引擎优化)、让 AI 代理能读取网站、生成 llms-full.txt、检查站点是否已有 llms.txt,或审计站点的 AI 就绪状态时,使用此技能。

opendirectory 是什么?

这是一个专业的 AI 技能,旨在为任何网站生成符合 llms.txt 标准的文件(由 llmstxt.org 倡导)。该文件允许 AI 代理和大型语言模型高效地发现和理解网站内容,从而提升网站在生成式搜索引擎(如 ChatGPT/AI 概览)中的可见性。 该技能支持两种模式:**代码库模式**和**线上站点模式**。在代码库模式下,它会直接扫描网站源代码(如 Next.js、Astro、Nuxt 等项目的目录),提取路由、页面标题、元描述和关键标题,从而生成高度准确的 llms.txt 文件。在线上站点模式下,它会通过 Chrome DevTools MCP 或标准 HTTP 工具爬取目标 URL,读取各个页面内容。 该技能的核心原则是**绝不编造内容**——所有链接、标题和描述必须来自实际抓取的数据。它还会检查是否已存在 llms.txt 文件以避免覆盖,并可选择生成包含完整页面内容的 llms-full.txt 文件。最后,它会根据框架的不同,将文件放置在正确的目录中(如 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 不可用,则回退到标准 Web 获取工具来检索页面内容。如果两者都不可用,则停止并请用户提供 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——如果找到,读取它
  • QA: 这是什么框架?基础 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:)、元描述以及主要标题(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)”
  • QA: 基础 URL 是否已确认?llms.txt 中的所有链接必须使用完整的绝对 URL。

然后跳至步骤 4,使用代码库数据生成文件。


步骤 2B:线上站点模式——获取目标 URL

如果用户尚未提供 URL,请询问:“我应该为哪个网站生成 llms.txt?”

步骤 3:检查是否已存在 llms.txt(仅限线上站点模式)

在爬取之前,检查站点是否已有:

  1. 导航至 [URL]/llms.txt
  2. 如果存在:读取它,记下内容,并计划更新/改进它,而不是盲目替换
  3. 如果不存在:继续进行完全爬取
  • QA: 您是否检查了现有文件?记录其状态(缺失 / 过时 / 存在且良好)。

步骤 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 不可用,则回退到使用标准 Web 工具(curl、fetch)获取页面。如果站点返回 403,请尝试添加浏览器 User-Agent 标头。

  • QA: 您是否成功加载并读取了每个页面?列出您访问了哪些页面,以及哪些返回了 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 中的验证清单
  • QA: 每个 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 以将文件添加到仓库根目录
  • QA: 文件是否已保存?您是否已与用户确认了保存路径?

步骤 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 放置于您的 Web 根目录,以便通过以下地址访问: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 上传到 Web 根目录,或使用重写规则
- 自定义服务器:作为静态文件在 /llms.txt 路径下提供

输出质量标准

优秀的 llms.txt 文件:

  • 具有基于事实的 H1 和清晰简洁的 2-3 句摘要,LLM 可以直接引用
  • 涵盖站点实际拥有的所有主要内容区域
  • 链接描述解释那里有什么,而不是公司希望您怎么想
  • 可在 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.

相关技能