Communitygithub.com

gener8v/gener8v.claude-skills.engineering

尋找並執行專案的測試、lint、類型檢查、建置和開發伺服器指令,正確解讀結果,並在 UI 工作需要真實資料時建立可拋棄的資料庫。絕不植入專案的正式或預設資料庫。

gener8v.claude-skills.engineering 是什麼?

此技能為 AI 代理(如 Claude Code、Cursor、Codex)提供一個系統化流程,用於處理開發指令(測試、lint、建置、開發伺服器)。它指導代理遵循明確的搜尋順序來尋找指令:先查閱儲存庫說明文件(CLAUDE.md、CONTRIBUTING.md、README.md),再檢查任務執行器(Makefile、package.json 等),然後是 CI 工作流程,最後是生態系統預設值。執行指令時,它強調從較小的範圍開始、避免使用監看模式、正確處理退出碼,以及將開發伺服器在背景啟動。結果解讀嚴格基於退出碼,要求代理報告通過、失敗和跳過的計數,並辨識不穩定的測試。關鍵的防護措施是:絕不植入專案的正式或共用資料庫。此技能支援基於容器的環境,建議在容器內執行指令,並提供詳細的報告格式,包括指令、退出碼和第一個錯誤。

相容平台✓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 pipeline 儲存庫中,.gener8v/context.md 會列出每個儲存庫的驗證指令。
  2. 任務執行器: Makefile、justfile、Taskfile.yml、package.json 中的 scripts、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).

相關技能