Communitygithub.com

gener8v/gener8v.claude-skills.engineering

查找并运行项目的测试、代码检查、类型检查、构建和开发服务器命令,正确读取结果,并在UI工作需要真实数据时填充临时数据库。永远不会填充项目真正的或默认数据库。

gener8v.claude-skills.engineering 是什么?

该技能(Engineering Commands)旨在帮助AI助手在开发工作流中自动查找并执行项目测试、代码检查、类型检查、构建和开发服务器命令。它通过扫描仓库说明文件(如 CLAUDE.md、CONTRIBUTING.md、README.md)、任务运行器配置文件(如 Makefile、package.json)、CI 工作流(如 .github/workflows/*.yml)以及生态默认值(resources/ecosystems.md)来确定应运行的命令。技能强调在容器内执行命令(如果项目使用容器),并指导如何正确读取结果:依赖退出码、报告通过/失败/跳过计数、处理不稳定的测试,以及将预存失败与自身引入的失败区分开。对于UI工作,技能提供了安全填充临时数据库的原则——仅填充为此目的创建的数据库,绝不触及项目的真实、默认或共享数据库。此技能适用于 Claude Code、Coder 等AI代理工具,作为开发流程中的基础步骤,在运行测试或声称变更生效前使用。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/gener8v/gener8v.claude-skills.engineering/tree/HEAD/skills/development-commands

在你喜欢的 AI 中提问

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

文档

开发命令

1. 查找命令

使用第一个能给出答案的源。在运行之前说明该命令。

  1. 仓库说明: CLAUDE.md、CONTRIBUTING.md、README.md。在 gener8v 流程仓库中,.gener8v/context.md 列出了每个仓库的验证命令。
  2. 任务运行器: Makefile、justfile、Taskfile.yml、package.json 脚本、pyproject.toml 工具部分、tox.ini、noxfile.py。
  3. CI 工作流: .github/workflows/*.yml。CI 运行的内容定义了“测试通过”。
  4. 生态默认值: resources/ecosystems.md。

如果项目在容器中运行(compose.yaml、docker-compose.yml、开发容器),请按项目文档所述在容器内运行命令。参见 resources/ecosystems.md。

2. 运行

  • 从窄范围开始:一个测试文件或一个包。然后运行完整套件后再报告。
  • 不要启动监视模式。许多测试运行器默认会监视。使用“运行一次”的形式(resources/ecosystems.md)。
  • 缩短输出时保留退出码:
    set -o pipefail
    <command> 2>&1 | tail -n 60
    echo "exit=$?"
    
  • 在后台启动开发服务器。等待其 URL 响应。完成后停止它。

3. 读取结果

  • 退出码决定一切。 诸如“完成”之类的文本并不代表成功。
  • 计数。 报告通过、失败和跳过的数量。跳过、预期失败和“未收集到测试”不算通过。
  • 不稳定的测试。 再次单独运行一次失败的测试。如果通过,将其报告为不稳定。不要隐藏它。
  • 之前就存在的失败。 检查基分支:最新的 CI 运行(gh run list --branch <base> --limit 3)或独立工作树中的一次运行。将这些失败报告为“在 <base> 分支上已失败”。不要用它们来为自己引入的失败开脱。
  • 不要为了使其通过而削弱测试。 如果测试是错误的,说明原因并在单独、可见的提交中进行更改。

4. UI 工作的数据

当 UI 需要真实数据时,遵循 resources/throwaway-data.md。简要规则是:仅填充你为此目的创建的数据库。绝不填充项目的真实、默认或共享数据库。

5. 报告

给出命令、退出码、计数以及每个失败的第一个真正错误。如果你没有运行某些内容(例如,需要凭据的端到端测试),请说明原因。

相关技能

  • engineering:github-pr-merge 和 engineering:github-issue-workflow 在 PR 之前会调用此技能。
  • engineering:documentation-bootstrap 使用它来查找文档必须列出的命令。

Individual skills in this repo

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

gener8v/gener8v.claude-skills.engineering

Create or top up a project's documentation set: list what exists, let the user choose which document types to add, collect one shared fact sheet from the code, write the documents (in parallel when there are several), then check them against each other and against the code. Use when asked to 'bootstrap the docs', 'start the documentation', 'we have no README or ARCHITECTURE', or 'fill in the missing docs'. Not for the per-commit update of existing documents (documentation-sync), and not for gener8v pipeline documents (gener8v:brownfield and gener8v:planning make those).

gener8v/gener8v.claude-skills.engineering

Before a commit, find every document that describes what the change touched and update it in the same commit, or confirm in one line that no document needs a change. Catches stale text, missing documentation and facts kept in two places. Use before any commit or PR, and when asked 'are the docs up to date', 'update the docs for this change' or 'did I miss a README change'. Not for creating a documentation set or filling large gaps (documentation-bootstrap), and not for gener8v pipeline documents under .gener8v/, which the pipeline skills own.

gener8v/gener8v.claude-skills.engineering

Put work on the correct branch before the first edit. Finds the base branch, starts a well-named branch from the current remote tip, and sets up one worktree per agent for parallel work. Use at the start of any change to a tracked file, such as 'start on issue 42', 'fix this typo', 'set up branches for these three tickets', or before you start sub-agents that edit code. Not for opening or merging a PR (github-pr-merge) or for history rewrites and other risky git commands (git-safety).

gener8v/gener8v.claude-skills.engineering

Approval gate for git commands that destroy work or skip checks: force-push, --no-verify, signing bypass, reset --hard, clean -f, discarding uncommitted edits, branch or tag deletion, rewriting pushed commits and push --mirror. Each one needs the user's explicit approval at that moment; an earlier approval never carries over. Also covers a secrets check before a commit and what to do when a secret is already committed. Use before any of these commands, or when asked to 'force push', 'skip the hooks', 'throw away my changes' or 'delete that branch'. Not for normal branching (git-branching) or the PR flow (github-pr-merge).

相关技能