Community编程与开发github.com

tderoussel/通宵构建

针对需要在无人值守情况下长时间运行的构建任务,自动生成一个可自主恢复的 Claude Code 构建提示词(prompt)。当用户提到“通宵构建”、“自动构建”、“让我睡觉时构建”、“无人值守会话”或任何他们不会监控的长时间构建时,使用此技能。

通宵构建 是什么?

本技能用于生成一个可复制、可自恢复的构建提示词,适合需要长时间运行(如通宵)且无人监控的场景。它通过 `BUILD_LOG.md` 进行检查点记录,使得 Claude Code 在遇到使用额度重置后能够自动从上次断点继续,避免从头开始。该技能支持多种启动方式(操作系统调度器、bash 循环、定时任务 MCP)并会询问用户偏好一次。生成的提示词必须包含“规则 8(应对使用额度重置)”和“启动器”部分,以确保构建的可恢复性。此外,技能还内置了安全护栏,禁止在无人状态下执行数据库迁移、schema 推送、生产部署、购买/发布资源或发送真实消息等高风险操作。最终输出要求构建过程在完成时打印 `BUILD_COMPLETE`,以便启动器判断退出时机。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/tderoussel/agent-skills/tree/main/skills/overnight-build

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

在你喜欢的 AI 中提问

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

文档

通宵构建提示词

完整模板位于 references/overnight-build-template.md。在组合之前请先阅读它。 不要凭记忆重新推导规则结构——根据用户的具体情况填写其 [括号] 部分,并保留他们对自身副本所做的任何编辑。

不可妥协的条件

每个输出必须包含规则 8(应对使用额度重置)和启动器部分。它们是使构建可重新启动的关键;缺少它们的提示词会在第一次使用额度重置后默默地从零开始,从而浪费一夜。

组合步骤

  1. 阅读模板。 如果用户保留了一份编辑过的副本,则以他们的版本为准——保留他们的更改。
  2. 填写规格说明——构建什么、上下文、设计要求、技术要求、按优先级排序的功能、种子数据、部署、成功标准。这里的详细程度决定了整个夜晚的质量;模糊的规格会带来模糊的一夜。
  3. 设置阶段——4 到 8 个阶段,每个阶段可独立完成并可验证,且时间分配要总和等于预算。
  4. 填写 pivot 应对手册,在模板已有条目基础上添加项目特定的阻塞项。
  5. 询问一次他们想要哪种启动器(A:操作系统调度器 · B:bash 循环 · C:定时任务 MCP),如果请求中没有说明。询问一次——然后继续。
  6. 输出为一个可复制的代码块,并提醒他们在启动之前将其保存到项目根目录下的 overnight-build-prompt.txt。

完成信号

提示词必须指示构建在其最后一行输出 BUILD_COMPLETE——bash 循环启动器会 grep 该字符串以决定是否退出。在提示词中明确指出:当任何 P0(最高优先级)标准确实未被满足时,不输出 BUILD_COMPLETE 是正确的做法。一个在未完成构建时就退出的启动器比一个持续运行的要糟糕。

安全护栏

一个无人值守的代理没有可以询问的人,因此提示词必须自带边界。

如果目标是现有的生产代码库,则首先推导出文件所有权和禁止修改列表(fleet-brief 技能可同时提供这两者),并将项目的验证检查纳入测试阶段,以便“完成”意味着经过验证,而不仅仅是合并。

永远不要让通宵提示词授权执行数据库迁移、推送 schema、通过托管 CLI 部署、购买或发布电话号码或域名,或向真实联系人发送出站消息。这些操作需要有人在清醒状态下进行。将项目自身的不可逆操作也添加到该列表中。

构建必须生成的交付物

  • BUILD_LOG.md——包含阶段条目、决策、pivot 应对、已知问题,以及带有确切下一步骤的 ## CHECKPOINT — <ISO> 代码块
  • RESEARCH_NOTES.md——实施开始前的研究发现

在恢复时,构建的第一个操作就是从头到尾读取 BUILD_LOG.md,并从最新的检查点继续——绝不要重新研究、重新搭建或重新开始。

Individual skills in this repo

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

tderoussel/codebase-audit

Runs a ranked, evidence-backed audit of a product, codebase, or subsystem, ending in a verify list that separates proven findings from inferred ones. Use when the user asks for an audit, a gap analysis, a deep read, a bug hunt, a readiness check, a re-audit, a state reconciliation, or asks what they are not seeing. Trigger phrases include "audit", "gap analysis", "what am I missing", "deep audit", "readiness", "bug hunt", "review the whole thing". Produces findings and a verify list; does not fix.

tderoussel/competitive-teardown

Researches a competing product against your own and produces a ranked build-or-ignore verdict, plus optional comparison-page copy. Use when the user names a competitor or asks how their product stacks up against one. Trigger phrases include "vs us", "competitor", "what does X have", "should we copy", "competitive gap", "teardown", "are we behind". Produces a ranked verdict with effort estimates and an explicit not-worth-copying list.

tderoussel/decision-council

Run a structured multi-perspective review of a decision instead of getting one agreeable answer. Use when the user says run a council, get me perspectives on this, should I do X, stress-test this decision, or is this a good idea.

tderoussel/fleet-brief

Authors a workstream brief for dispatching multiple parallel build agents across one codebase, with per-lane file ownership, shared-ground warnings, and a derived DO-NOT list. Use whenever work is about to be split across concurrent agents, workers, lanes, or waves — even if the user does not say "write a brief". Trigger phrases include "fan out", "parallel agents", "orchestrate this", "split into lanes", "workstreams", "run these in parallel", "review-gated build". Produces the brief; does not dispatch.

tderoussel/inbox-triage

Triage an email inbox — sort what needs a reply, draft the replies, flag what needs a decision, and surface what can be ignored or unsubscribed. Use when the user says triage my inbox, do my email, what's in my inbox, or clean up my email.

tderoussel/session-log

Write a durable record of a work session — what was built, root-caused, or shipped — into the project's notes. Use when the user says log this session, write a session log, record this, or when a substantial piece of work has just finished and needs to be handed off to a future session.

tderoussel/ship-gate

Verification gate for a Next.js-on-Vercel + Supabase + GitHub Actions stack, to run before claiming anything is shipped, deployed, live, merged, passing, or done. Use before saying a change is in production, before merging a PR, before reporting CI green, and before writing any status into a document — even if the user does not ask for verification. Trigger phrases include "is it live", "did it deploy", "ship it", "merge it", "is CI green", "confirm prod", "did that work". Encodes traps where the obvious check returns a false pass.

tderoussel/vault-doctor

Audits and repairs an Obsidian vault's structural health — broken [[wikilinks]], ambiguous duplicate filenames, missing or malformed frontmatter, stale status markers, and hub notes whose state sections have gone cold. Use when the user asks about vault health, broken links, vault cleanup, dead links, orphan notes, tag consistency, or says the vault feels messy or out of date. Trigger phrases include "vault health", "broken links", "clean up the vault", "audit the vault", "is the vault current". Read-only by default; every repair is proposed before it is made.

相关技能