360 Secure SkillHub
360 安全技能中心

llms-txt-sniffer

核心功能:针对用户提供的文档URL,分两阶段查找llms.txt等AI友好的高密度索引文件,若未找到则 fallback 到sitemap.xml,获取后优先用其链接减少token消耗、快速映射站点结构。典型场景:用户提供含/docs/、/api-reference/等的文档URL时调用,输入为文档URL,输出为索引结构概述。

jdchi
jdchi
热度 44.70
最近更新 2026-05-11 17:37:38
分类:效率依赖:代码执行 / 读写文件应用场景:摘要总结

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add llms-txt-sniffer
Metadata
name
llms-txt-sniffer
description
Locate and utilize AI-friendly documentation index files (llms.txt, llms-full.txt) or sitemap.xml. Use when encountering documentation URLs (containing /docs/, /api-reference/, /guides/, or platform subdomains) to instantly map sites and reduce token burn.
metadata
{"openclaw":{"requires":{"bins":["python3","curl"]},"version":"1.3.1"}}
argument-hint
["url"]
allowed-tools
Bash, Read

llms-txt-sniffer: The Smart Document Radar

This skill streamlines documentation ingestion by locating the most AI-optimized version of a site's content.

🧠 Why llms.txt?

It provides a high-density, Markdown-based index designed for LLMs to map entire sites instantly and save tokens.

🚀 Discovery Strategy (Two-Stage)

Stage 1: Quick Jump Probes (Instructional)

  1. URL + /llms.txt: Probe {input_url}/llms.txt using curl -I.
  2. Domain Root: Probe https://{domain}/llms.txt using curl -I.

Stage 2: Advanced Sniffing (Tool-based)

If Stage 1 fails, run the companion sniffer script located in this skill's directory: python3 sniffer.py $ARGUMENTS

📜 Behavioral Rules

  • User-Initiated Only: Only invoke this skill when the user explicitly provides a documentation URL. Do not autonomously scan domains.
  • Switch to High-Speed Mode: Once an index is found, prioritize its links over manual scraping.
  • Index Summary: Always present a brief structure overview.
  • Fallback: Use sitemap.xml parser results if llms.txt is missing.