Community编程与开发github.com

getpaidskills/agents-md-starter

创建或升级代码仓库中的 AGENTS.md 文件(供 Codex、Cursor 等智能体读取),并生成引用它的 CLAUDE.md,使 Claude Code、Codex、Cursor 和 Gemini CLI 共享同一套项目规则。扫描仓库以检测语言、包管理器、真实的构建/测试/检查命令、框架、目录结构以及现有的规则文件,然后编写简洁、经过验证的规则文件。

agents-md-starter 是什么?

该技能是一个专为 AI 智能体工作流设计的项目规则文件初始化与迁移工具。它能自动扫描仓库,检测编程语言分布、包管理器类型(如 npm、pnpm、pip、cargo 等)、真实的构建/测试/检查命令(通过分析 package.json、Makefile、pyproject.toml 等文件)、使用的框架(如 Next.js、Astro、Django、FastAPI 等)、目录结构以及已有的智能体规则文件(如 .cursorrules、CLAUDE.md、copilot-instructions 等)。基于扫描结果,它会生成一份简洁、可验证的 AGENTS.md 文件(作为规则唯一真相源),并为 Claude Code 额外创建一份引用 AGENTS.md 的 CLAUDE.md。该技能会自动执行从草案中提取的命令来验证其是否有效,确保写入的规则都是经过实践检验的。此外,它还能将旧式 .cursorrules 文件的内容合并到 AGENTS.md 中,并询问用户是否删除已弃用的 .cursorrules。通过 symlink 或设置文件的配置,它也能适配 Gemini CLI。此技能适用于需要统一不同 AI 智能体(Claude Code、Codex、Cursor、Gemini CLI)项目管理行为的场景,如初次将智能体接入仓库、从 .cursorrules 迁移等项目。

兼容平台✓Claude Code✓Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/getpaidskills/skills/tree/HEAD/skills/agents-md-starter

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

文档

agents-md-starter 是做什么的?

输出:在仓库根目录下生成 AGENTS.md 作为单一事实来源,并生成一个包含 @AGENTS.md 的 CLAUDE.md(Claude Code 会读取 CLAUDE.md 并支持 @path 导入)。文件中的每个命令都必须已成功运行或明确标记为未验证。

步骤 1 — 扫描

python3 scripts/scan_repo.py /path/to/repo            # 人类可读的摘要
python3 scripts/scan_repo.py /path/to/repo --json     # 以 JSON 格式输出事实
python3 scripts/scan_repo.py /path/to/repo --draft > AGENTS.draft.md   # 填充模板

它会检测:基于文件数量的编程语言、基于锁定文件的包管理器、package.json 中的脚本、Makefile 目标、pyproject.toml 中的工具(如 pytest、ruff、mypy、uv/poetry)、Go/Rust/Java 的构建文件、框架(如 Next.js、Astro、Vite、Django、FastAPI、Rails……)、单体仓库工作区、CI 工作流、环境变量示例文件以及现有的智能体规则文件。它绝不执行仓库代码。

步骤 2 — 在写入之前先阅读

  • 阅读它找到的每一个现有规则文件(CLAUDE.md、.cursorrules、.cursor/rules/*.mdc、.github/copilot-instructions.md、GEMINI.md、CONTRIBUTING.md)。保留其中真实的规则;合并、去重、删除通用规则(如“编写干净的代码”)。
  • 阅读 CI 工作流:CI 运行的命令是“测试通过”的最可靠定义。
  • 浏览 2-3 个有代表性的源文件,以捕捉实际的约定(如命名、错误处理、导入风格)——不要凭空发明代码中未遵循的约定。

步骤 3 — 验证命令

执行草案中的安装/构建/测试/检查命令(确保安全:不要执行部署、不要针对真实数据库执行迁移、不要发布)。对于每个命令:如果它能工作则保留;如果正确的变体显而易见则修复;否则标记为 (unverified) 并告知用户。如果测试套件速度较慢,则记录其耗时。

步骤 4 — 写入 AGENTS.md

从 assets/AGENTS.template.md 开始。优质内容的规则:

  • 简短。 力求低于约 150 行。智能体在每次任务时都会读取此文件;每一行都消耗上下文。
  • 具体且可检查:“提交前运行 pnpm test --filter web”比“测试你的代码”更好。
  • 将命令放在前面。然后是布局、约定、注意事项以及“不要”规则。
  • 记录不明显的内容:不应编辑的生成文件、测试所需的环境变量、需要在本地跳过的单个慢速测试、绝不能存放机密的地方。
  • 对于单体仓库:在根目录的 AGENTS.md 中放置共享规则,在 packages/x/AGENTS.md 中放置包特定的命令(支持此功能的智能体会读取最近的规则文件)。

步骤 5 — 与其他工具集成

  • Claude Code:从 assets/CLAUDE.template.md 创建 CLAUDE.md(它包含 @AGENTS.md)。如果 CLAUDE.md 已存在,则将其规则移至 AGENTS.md,并在导入指令之后保留仅适用于 Claude 的备注。
  • Codex:原生读取 AGENTS.md —— 无需其他操作。
  • Cursor:读取根目录的 AGENTS.md;将 .cursorrules 的内容迁移到 AGENTS.md 中,并在用户同意后删除 .cursorrules(已弃用)。仅将 .cursor/rules/*.mdc 保留给基于 glob 的规则。
  • Gemini CLI:默认读取 GEMINI.md;在 .gemini/settings.json 中设置 "context": {"fileName": ["AGENTS.md", "GEMINI.md"]},或创建一个指向 AGENTS.md 的单行 GEMINI.md。如果此键已更改,请查阅已安装版本的文档。
  • 符号链接(ln -s AGENTS.md CLAUDE.md)也可以工作,但在未启用 core.symlinks 的 Windows 系统上会出问题;导入方法更安全。

有关每个工具读取的文件,请参阅 references/tool-support.md。

步骤 6 — 报告

列出:创建/修改的文件、已验证的命令(含结果)、标记为未验证的命令、作为重复或通用规则被删除的规则,以及任何需要用户决定的事项(例如,是否删除 .cursorrules?)。除非用户要求,否则不要提交。

Individual skills in this repo

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

getpaidskills/directory-launch-kit

Prepares a product for submission to launch platforms and directories (Product Hunt, Show HN, BetaList, Uneed, Fazier, SaaSHub, TinyLaunch, AI tool directories, agent-skill marketplaces, Reddit, V2EX and more) without submitting anything itself. Picks only the directories the product fits, writes the copy for each form within its field limits from one product.json, resizes screenshots to each platform's sizes (Product Hunt 1270x760 gallery and 240x240 thumbnail, 1200x630 OG), builds a tracker CSV, re-checks prices and rules on the live pages, and later verifies which listings went live and whether their backlinks are follow or nofollow. Use when the user asks where to launch, how to submit to Product Hunt or AI directories, wants launch copy, a directory list, backlinks, or a launch tracker.

getpaidskills/launch-checklist

Pre-launch audit for a website or SaaS - checks SEO tags (title, description, canonical, lang, Open Graph), robots.txt, sitemap.xml, favicon and apple-touch-icon, real 404 status, HTTPS redirect, legal pages (privacy, terms, refund), image alt text, page weight and response time, plus a payment self-check (webhook signature, raw body, idempotency, refunds, secrets, success-page grants), then lists the problems and fixes them in the codebase. Ships a no-dependency crawler script (audit_site.py) that produces a pass/warn/fail report. Use when the user says they are about to launch, ship, go live, submit to Product Hunt or AI directories, or asks "is my site ready", "SEO check", "why is my site not indexed", or wants a launch checklist, or asks whether their payment or webhook setup is safe.

getpaidskills/legal-pages

Drafts a Privacy Policy, Terms of Service and Refund Policy for a SaaS, digital product or website from a short questionnaire, adapted to the payment provider (Creem, Paddle, Lemon Squeezy as Merchant of Record, or Stripe/direct) and to where users are (EU/UK GDPR, California CCPA/CPRA, China PIPL notes), then renders them as Markdown, HTML or Next.js pages and links them in the footer. Output is a starting template, NOT legal advice - the user must review it and have it checked by a qualified lawyer. Use when the user needs privacy policy, terms, refund policy, legal pages, or a payment provider (Paddle/Creem/Lemon Squeezy/Stripe) review asks for them.

getpaidskills/og-image-kit

Generates Open Graph / Twitter (X) share images for every page of a website and wires up the og:* and twitter:* meta tags, then verifies the social preview. Supports Next.js App Router (opengraph-image.tsx with next/og ImageResponse), Astro (build-time PNGs via satori + resvg) and any static site (Pillow script). Use when the user asks for OG images, social share cards, link previews, "my link looks bad on X/Slack/LinkedIn/WeChat", twitter:card, or before launching a site.

相关技能