Communitygithub.com

SamuelChien/mega-skills-collection

当用户要求“创建 AGENTS.md”、“更新 AGENTS.md”、“维护代理文档”、“设置 CLAUDE.md”或需要保持代理指令简洁时,应使用此技能。它强制执行基于研究的最佳实践,以确保代理文档简洁高效。

mega-skills-collection 是什么?

该技能专注于生成和维护极简、高信号量的代理文档(AGENTS.md 或 CLAUDE.md)。其核心理念是:代理本身能力强,无需过多指导,因此文档应保持简短(目标60行以内,不超过100行),以避免指令遵循质量的下降。技能会指导用户分析项目(如包管理器、linter、CI命令、monorepo结构等),然后按照严格的规则编写文档,包括不嵌入、不重复、无废话、信任代理能力、使用文件级命令而非全量构建等。它还要求包含特定的必要章节(如包管理器和代码归因)和可选章节,并明确指出了应避免的反模式。该技能支持 Claude Code、Cursor、Codex 等主流代理平台。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/agents-md

在你喜欢的 AI 中提问

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

文档

维护 AGENTS.md

AGENTS.md 是面向代理的规范文档。保持简洁——代理有能力,不需要手把手的指导。目标不超过60行;切勿超过100行。文档越长,指令遵循质量越差。

何时使用

  • 用户要求创建、更新或审计 AGENTS.md 或 CLAUDE.md。
  • 项目需要基于实际工具链和仓库布局的简洁、高信号量的代理指令。
  • 现有代理文档过长、冗余或偏离实际项目约定。

文件设置

  1. 在项目根目录创建 AGENTS.md
  2. 创建符号链接:ln -s AGENTS.md CLAUDE.md

编写前

分析项目以了解哪些内容应包含在文件中:

  1. 包管理器 — 检查锁定文件(pnpm-lock.yaml、yarn.lock、package-lock.json、uv.lock、poetry.lock)
  2. Linter/格式化配置 — 查找 .eslintrc、biome.json、ruff.toml、.prettierrc 等(不要在 AGENTS.md 中重复这些内容)
  3. CI/构建命令 — 检查 Makefile、package.json 脚本、CI 配置以获取规范命令
  4. Monorepo 指示 — 检查 pnpm-workspace.yaml、nx.json、Cargo workspace 或子目录中的 package.json 文件
  5. 现有约定 — 检查现有的 CONTRIBUTING.md、docs/ 或 README 模式

编写规则

  • 标题 + 列表项 — 不使用段落
  • 代码块 — 用于命令和模板
  • 引用,不嵌入 — 指向现有文档:"参见 CONTRIBUTING.md 了解设置" 或 "遵循 src/api/routes/ 中的模式"
  • 无填充内容 — 没有引言、结论或客套话
  • 信任能力 — 省略显而易见的上下文
  • 优先使用文件级命令 — 针对单个文件的测试/检查/类型检查命令,而不是全量构建
  • 不重复 linter — 代码风格存在于 linter 配置中,而不是 AGENTS.md 中

必要章节

包管理器

仅指明使用的工具和关键命令:

## 包管理器
使用 **pnpm**:`pnpm install`、`pnpm dev`、`pnpm test`

文件级命令

文件级命令比全量构建更快且成本更低。可用时始终包含:

## 文件级命令
| 任务 | 命令 |
|------|------|
| 类型检查 | `pnpm tsc --noEmit path/to/file.ts` |
| 检查 | `pnpm eslint path/to/file.ts` |
| 测试 | `pnpm jest path/to/file.test.ts` |

提交归属

始终包含此章节。代理应使用其自身的身份:

## 提交归属
AI 提交必须包含:

Co-Authored-By: (代理模型的名称和归属署名)

示例:`Co-Authored-By: Claude Sonnet 4 <[email protected]>`

关键约定

代理必须遵循的项目特定模式。保持简洁。

可选章节

仅在确实需要时添加:

  • API 路由模式(展示模板,而非解释)
  • CLI 命令(表格格式)
  • 文件命名约定
  • 项目结构提示(指向关键文件,标记要避免的遗留代码)
  • Monorepo 覆盖(子目录中的 AGENTS.md 文件覆盖根目录)

反模式

省略以下内容:

  • “欢迎使用…”或“本文档解释…”
  • “你应该…”或“记住要…”
  • 已在配置文件(.eslintrc、biome.json、ruff.toml)中的 linter/格式化规则
  • 列出已安装的技能或插件(代理自动发现这些)
  • 存在文件级替代方案时的全量构建命令
  • 显而易见的指令(“运行测试”、“编写干净代码”)
  • 原因解释(只说做什么)
  • 长篇散文段落

结构示例

# 代理指令

## 包管理器
使用 **pnpm**:`pnpm install`、`pnpm dev`

## 提交归属
AI 提交必须包含:

Co-Authored-By: (代理模型的名称和归属署名)


## 文件级命令
| 任务 | 命令 |
|------|------|
| 类型检查 | `pnpm tsc --noEmit path/to/file.ts` |
| 检查 | `pnpm eslint path/to/file.ts` |
| 测试 | `pnpm jest path/to/file.test.ts` |

## API 路由
[模板代码块]

## CLI
| 命令 | 描述 |
|------|------|
| `pnpm cli sync` | 同步数据 |

限制

  • 仅当任务明确匹配上述描述的范围时使用此技能。
  • 不要将输出视为环境特定验证、测试或专家审查的替代品。
  • 如果缺少必需的输入、权限、安全边界或成功标准,请停下来要求澄清。

Individual skills in this repo

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

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

2D game development principles. Sprites, tilemaps, physics, camera.

SamuelChien/mega-skills-collection

3D game development principles. Rendering, shaders, physics, cameras.

SamuelChien/mega-skills-collection

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

SamuelChien/mega-skills-collection

Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

相关技能