Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/huifer/claude-code-seo/robots-txtgit clone --depth 1 https://github.com/huifer/claude-code-seoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/huifer/claude-code-seo/robots-txt)<a href="https://agentmods.dev/commands/huifer/claude-code-seo/robots-txt"><img src="https://agentmods.dev/badge/commands/huifer/claude-code-seo/robots-txt.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00006 | $0.03938 |
| Opus 5 | $0.00003 | $0.01969 |
| Sonnet 5 | $0.00001 | $0.00788 |
| Haiku 4.5 | $0.00001 | $0.00394 |
Grade A, and why
robots-txt scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl http://localhost:3000/robots.txt How it starts
The opening of the file, as written. The whole thing — 729 lines — stays where its author put it; the contents beside it link to each section on GitHub.
为 Next.js 项目生成 SEO 友好的 robots.txt 文件。包含基本的爬虫规则、Sitemap 引用和常见目录的禁止规则。
功能
- ✅ 生成标准的 robots.txt 文件
- ✅ 自动包含 Sitemap 引用
- ✅ 禁止敏感目录和文件
- ✅ 允许所有主要爬虫
- ✅ 支持爬虫延迟设置
- ✅ 适配 Next.js 项目结构
参数
$1或$ARGUMENTS: 网站域名(可选)- 用于生成 Sitemap URL
- 示例:
https://yourdomain.com - 如果不提供,Sitemap 行会被注释或省略
使用示例
示例 1:基本用法
/robots-txt
输出:
# robots.txt 文件
为你的 Next.js 项目生成的 robots.txt 文件:
```txt
# Allow all crawlers
User-agent: *
Allow: /
# Disallow common Next.js and private directories
Disallow: /api/
Disallow: /_next/
Disallow: /static/
Disallow: /.well-known/
# Disallow admin and private areas (if applicable)
# Disallow: /admin/
# Disallow: /private/
# Disallow: /dashboard/
# Sitemap (uncomment and update with your domain)
# Sitemap: https://yourdomain.com/sitemap.xml
文件位置
将此文件放置在项目根目录的 public/ 文件夹中:
路径: public/robots.txt
复制上面的内容到 public/robots.txt 文件。
验证
创建后,访问 https://yourdomain.com/robots.txt 验证文件可访问。
Next.js 自动生成
如果你使用 Next.js 13.3+,也可以使用 generateRobotTxt 函数自动生成:
app/robots.ts (推荐):
import { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/_next/', '/static/'],
},
],
sitemap: 'https://yourdomain.com/sitemap.xml',
}
}
这会自动生成 /robots.txt 路由。
### 示例 2:指定域名
```bash
/robots-txt https://yourdomain.com
输出:
# robots.txt 文件(包含 Sitemap)
```txt
# Allow all crawlers
User-agent: *
Allow: /
# Disallow common Next.js directories
Disallow: /api/
Disallow: /_next/
Disallow: /static/
# Disallow private areas
Disallow: /admin/
Disallow: /_next/image/
Disallow: /private/
# Crawl delay (optional)
# Crawl-delay: 1
# Sitemap
Sitemap: https://yourdomain.com/sitemap.xml
部署
将上述内容保存到 public/robots.txt,部署后可通过以下 URL 访问:
https://yourdomain.com/robots.txt
注意事项
- robots.txt 文件必须位于网站根目录
- 文件名必须小写:
robots.txt - 文件更新后可能需要几天才能被搜索引擎重新抓取
- 使用 Google Search Console 的 robots.txt 测试工具验证
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 729 lines · 6 tokens per session scan A 2d1b23015c68
robots-txt is a command published in the GitHub repository huifer/claude-code-seo (110 stars, last pushed 8mo ago), licensed MIT. It adds 6 tokens to every session and 3,938 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.