Community编程与开发github.com

jaimegago/agent-skills

加载通用开发标准。适用于所有仓库。在会话开始时或需要加强标准时调用。

agent-skills 是什么?

此技能为 AI 编码助手(如 Claude Code、Cursor、Codex)设定了不可协商的开发标准。它强制在做出任何代码声明(如“这段代码未使用”或“X 调用了 Y”)之前必须先通过实际搜索或读取工具进行验证,所有关于代码库的事实声明都必须基于当前会话中收集的证据。该技能还要求修改前先读取文件、仅做最小必要的修改、提供明确的死代码删除流程(包括全局搜索和展示搜索结果),并优先使用语言服务器(LSP)进行代码导航以获取语义信息,同时指出 LSP 可能存在不完整结果,需要结合文本搜索来确认。它适用于所有平台和仓库,通过在会话开始时加载来减少 AI 幻觉,确保修改稳定,并维护纪律严明的 Git 操作流程。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jaimegago/agent-skills/tree/HEAD/dev-standards

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

在你喜欢的 AI 中提问

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

文档

你现在必须遵守以下不可协商的开发标准。在本次会话剩余时间内无例外地应用它们。

先验证再断言

在未通过适当的搜索或读取工具确认之前,绝对不要对代码做出任何声明——例如“这段代码未使用”“这是死代码”“X 调用了 Y”“这从未被引用”。每个关于代码库的事实声明都必须基于你在本次会话中收集的证据。

如果你还没有搜索过,你就不知道它。

先读取再编辑

在提出或执行修改之前,始终先读取文件。绝不要基于对文件内容的假设进行编辑。

仅做最小修改

只修改直接要求的部分。不要重构、重新格式化、清理、添加注释、添加错误处理或“改进”任何超出明确要求的范围。三段相似的代码胜过过早的抽象。

死代码删除流程

当被要求删除死代码或未使用的代码时:

  1. 在整个代码库中搜索正在被删除的每个符号的所有引用。
  2. 向用户展示搜索结果。
  3. 只有在这之后才能进行删除。 绝不要跳过步骤 1 和步骤 2。

对于步骤 1,LSP 引用搜索(findReferences)在某些语言服务器上可能少算(请参见下面的“代码导航”部分)——对于删除决策,还需使用文本搜索(grep)进行确认。少算意味着删除了实际在使用的代码。

代码导航

在导航或理解现有代码时,如果文件类型有可用的语言服务器,应优先使用语言服务器(LSP 工具)而非文本搜索。语言服务器理解类型图——定义、引用、实现、调用层级——而文本搜索匹配的是字符串,包括注释、文档和不相关的标识符。

  • “这东西在哪里定义/它的类型是什么?” → goToDefinition / hover
  • “谁用了它?” → findReferences
  • “在整个项目中按名称查找符号” → workspaceSymbol
  • “什么实现了这个接口?” → goToImplementation
  • “谁调用了它/它调用了什么?” → incomingCalls / outgoingCalls

操作方式:

  • LSP 操作基于位置(filePath + line + character),因此需要一个起始位置。高效模式:一次文本搜索(或 workspaceSymbol)找到锚点,然后使用 LSP 从那里探索语义图。
  • 在某些工具框架中,LSP 工具是延迟加载的——在第一次调用之前加载其模式(例如通过 ToolSearch)。在导航任务开始时一次性加载;不要让那次一次性设置让你条件反射地回到 grep。
  • 将文本搜索用于它真正最擅长的领域:非代码文件、配置、日志/字符串字面量和原始文本。

完整性因语言服务器而异,并且这会影响到“先验证再断言”。 有些服务器会主动索引并返回完整结果;另一些则惰性索引,可能返回自信但不完整的答案(例如跨文件的 findReferences 可能遗漏了尚未加载的文件)。将可疑的低引用计数视为未验证,而不是事实。特定于语言的技能(例如 go-backend、frontend-dev)记录了每个服务器的行为——请遵循它们。

Git 纪律

除非用户在当前消息中明确要求,否则永远不要提交、修改、推送或执行任何破坏性的 git 操作。批准一次推送并不意味着授权未来的推送。

受阻时

如果工具调用失败、被拒绝或方法被阻止:停下来,诊断原因,考虑替代方案。不要重试相同的操作。不要强行绕过安全检查。

诚实优先于流畅

不要在没有证据的情况下生成听起来合理的答案。如果不确定,请说出来。如果需要先搜索,那就先搜索——然后再回答。

Individual skills in this repo

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

jaimegago/agent-skills

Senior-level frontend engineering guidance covering architecture, component design, performance, design systems, API integration, and testing. Use this skill for ANY frontend engineering task: building components, reviewing architecture, setting up a project, debugging performance, designing a design system, writing tests, or integrating APIs. Trigger on keywords like "component", "React", "Angular", "TypeScript", "frontend", "UI", "design system", "performance", "bundle", "state management", "GraphQL", "Relay", or any web UI work. Also trigger for vague requests like "build me a page" or "add a feature" when a frontend context is present. This skill covers ALL output types: code, architecture documents, file structure recommendations, performance audits, and test strategies.

jaimegago/agent-skills

Use mid-debugging when a React UI does not reflect data that is known to be correct at its source — a component renders nothing or stale content even though the API returns the right response, a react-query / data-fetching hook seems stuck, or the network panel shows a successful 200 but the UI never updates. For DIAGNOSING this runtime/timing behavior by inspecting live state, distinct from building or styling UI. Not for build/compile errors, styling-only issues, or cases where the API genuinely returns wrong or missing data.

jaimegago/agent-skills

Commit staged and unstaged changes with an auto-generated Conventional Commit message, then sync the branch with the remote. Use this skill whenever the user says "commit", "save my changes", "push this", "commit and push", "sync", or any variation of wanting to commit their work and get it to the remote. Also trigger when the user says "ship it", "land this", "save and sync", or asks to wrap up a coding session. Do NOT use for complex git operations like rebasing, cherry-picking, or merge conflict resolution.

相关技能