Communitygithub.com

通过 llms.txt 发现文档

利用 llms.txt (context7.com) 搜索库或框架的文档,适用于 API 文档查阅、GitHub 仓库分析、技术文档查找以及了解最新库特性。

通过 llms.txt 发现文档 是什么?

该技能提供了一套脚本驱动的文档发现工作流,基于 llms.txt 标准,自动检索并分析技术文档。用户首先通过 `detect-topic.js` 脚本判断查询是针对特定主题还是通用库,接着使用 `fetch-docs.js` 自动构造 context7.com 的 URL 并获取文档内容(支持主题→通用→错误的降级链),最后通过 `analyze-llms-txt.js` 将获取到的 URL 分类(关键、重要、补充)并推荐多 Agent 并行策略(如 1、3、7 个 Agent 或分阶段执行)。整个过程无需手动拼写 URL,脚本在零 Token 开销下运行。该技能兼容 Claude Code、Codex 等支持 llms.txt 交互的 AI Agent 平台,并能通过渐进式加载工作流与引用文档来应对版本控制、多语言等边缘场景。

兼容平台✓Claude Code~Codex CLI~Cursor✓OpenCode
npx skills add https://github.com/majiayu000/claude-skill-registry/tree/HEAD/skills/analysis/docs-seeker-hoanghd218-landing-page-ai-kien

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

通过脚本进行文档发现

概述

脚本优先的文档发现方法,基于 llms.txt 标准。

直接执行脚本来处理整个工作流——无需手动构造 URL。

主要工作流

始终按此顺序执行脚本:

# 1. 检测查询类型(特定主题 vs 通用)
node scripts/detect-topic.js "<用户查询>"

# 2. 使用脚本输出获取文档
node scripts/fetch-docs.js "<用户查询>"

# 3. 分析结果(如果返回多个 URL)
cat llms.txt | node scripts/analyze-llms-txt.js -

脚本会自动处理 URL 构造、降级链和错误处理。

脚本

detect-topic.js — 分类查询类型

  • 识别是特定主题查询还是通用查询
  • 提取库名称 + 主题关键词
  • 返回 JSON:{topic, library, isTopicSpecific}
  • 零 Token 执行

fetch-docs.js — 检索文档

  • 自动构造 context7.com 的 URL
  • 处理降级:主题 → 通用 → 错误
  • 输出 llms.txt 内容或错误信息
  • 零 Token 执行

analyze-llms-txt.js — 处理 llms.txt

  • 对 URL 进行分类(关键/重要/补充)
  • 推荐 Agent 分布(1 个 Agent、3 个 Agent、7 个 Agent、分阶段)
  • 返回包含策略的 JSON
  • 零 Token 执行

工作流参考

特定主题搜索 — 最快路径(10-15 秒)

通用库搜索 — 全面覆盖(30-60 秒)

仓库分析 — 降级策略

参考文档

context7-patterns.md — URL 模式、已知仓库

errors.md — 错误处理、降级策略

advanced.md — 边缘情况、版本管理、多语言

执行原则

  1. 脚本优先 — 执行脚本,不要手动构造 URL
  2. 零 Token 开销 — 脚本运行时无需加载上下文
  3. 自动降级 — 脚本处理主题 → 通用 → 错误链
  4. 渐进式披露 — 仅在需要时加载工作流/参考文档
  5. Agent 分布 — 脚本推荐并行 Agent 策略

快速上手

主题查询: “如何在 shadcn 中使用日期选择器?”

node scripts/detect-topic.js "<查询>"  # → {topic, library, isTopicSpecific}
node scripts/fetch-docs.js "<查询>"    # → 2-3 个 URL
# 使用 WebFetch 读取 URL

通用查询: “Next.js 的文档”

node scripts/detect-topic.js "<查询>"         # → {isTopicSpecific: false}
node scripts/fetch-docs.js "<查询>"           # → 8+ 个 URL
cat llms.txt | node scripts/analyze-llms-txt.js -  # → {totalUrls, distribution}
# 根据推荐部署 Agent

环境配置

脚本会加载 .env:process.env > .opencode/skills/docs-seeker/.env > .opencode/skills/.env > .opencode/.env

详见 .env.example 了解配置选项。

Individual skills in this repo

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

majiayu000/claude-skill-registry

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry

BlockRun works with Claude Code and Google Antigravity.

majiayu000/claude-skill-registry

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry

CRITICAL: Use for MolyKit AI chat toolkit. Triggers on: BotClient, OpenAI, SSE streaming, AI chat, molykit, PlatformSend, spawn(), ThreadToken, cross-platform async, Chat widget, Messages, PromptInput, Avatar, LLM

majiayu000/claude-skill-registry

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相关技能