Community程式設計與開發github.com

深度工作 (deep-work)

使用者自己時間箱建置會話的計時員與記錄員,預設 90 分鐘,也支援 1 小時 / 1.5 小時 / 2 小時(導向、建置、驗證、強化、收尾,按區塊縮放)。當使用者說「開始一個會話」、「深度工作」、「90 分鐘區塊」、「工作區塊」或呼叫 /deep-work 時使用。子指令:status, park <筆記>, close, abort。

深度工作 (deep-work) 是什麼?

Deep Work 是一個為開發者設計的 AI 代理技能,用於結構化、有時間限制的建置會話。它透過五個階段(導向、建置、驗證、強化、收尾)引導使用者,每個階段都按請求的區塊長度(60、90 或 120 分鐘)等比縮放。此技能在背景中無縫運作:在每條使用者訊息前插入一個時間戳記行,顯示經過/總分鐘數、目前階段及其邊界、結束時間以及使用者應做的事項。主要功能包括:自動初始化會話、將階段變更公告給使用者、記錄工作檔案、維護一個「停車場」以捕捉離線想法、偵測問題卡住並建議解決策略,以及在最後的收尾階段產生結構化的日誌條目。此技能支援 Claude Code、Cursor 和 Codex 等平台,並儲存狀態於 `~/.claude/deep-work/current.md`(活躍區塊)和 `~/.claude/deep-work/log.md`(歷史記錄)。這特別適合希望縮短單次工作時長、保持專注並持續追蹤進度的開發者,充分利用里程碑和強制性的反思點來提升生產力。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jamesisbuilding/App-Building-Skills/tree/main/skills/deep-work

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

深度工作:時間箱建置會話

此 SOP 屬於使用者,用於自我監控。你是時間管理員和記錄員,不是被計時的對象。像平常一樣協助他們完成任何要求。你的 SOP 職責僅限於:

  1. 宣布階段變更。
  2. 提問該階段的問題,並將答案寫入會話檔案。
  3. 維護停車場(parking lot)。
  4. 當你看到卡住時,提出建議。
  5. 執行收尾。

絕不因階段緣故而拒絕或延遲工作。當請求跨越邊界時(例如在「建置」結束後提出新功能、在「建置」期間進行重構),用一句話說明,然後執行他們的要求。

狀態:~/.claude/deep-work/current.md(活躍區塊)和 ~/.claude/deep-work/log.md(歷史記錄)。 時鐘:此資料夾中的 UserPromptSubmit 掛鉤 phase.sh 會在區塊活躍期間,於每次提示中加入一行 [deep-work],內容包含:經過/總分鐘數、包含實際邊界的階段、牆鐘結束時間,以及使用者應做的事項。轉述這行內容即可,不要重新計算。

區塊長度

階段保持 90 分鐘的形狀(導向至第 10 分鐘、建置至第 60 分鐘、驗證至第 75 分鐘、強化至第 85 分鐘、收尾至第 90 分鐘)並按區塊縮放,四捨五入到整數分鐘:

長度導向建置驗證強化收尾
600-77-4040-5050-5757-60
900-1010-6060-7575-8585-90
1200-1313-8080-100100-113113-120

掛鉤會進行算術運算。引用它的數字,而不是此表格。

根據 $ARGUMENTS 分派

  • 前置持續時間標記(如有的話):1h、1.5h、2h、60、90m、120。轉換為分鐘數。預設為 90。其餘內容即為「成果」。
  • 無其他內容:初始化,詢問成果。
  • 有自由文字:初始化,該文字即為成果,跳過詢問。
  • status:執行 sh ~/.claude/skills/deep-work/phase.sh < /dev/null 並顯示 current.md。
  • park <筆記>:在 current.md 的 parking: 下方附加 - <筆記>。用一句話回覆。
  • close:立即執行收尾,無論目前階段為何。
  • abort:刪除 current.md 且不記錄。先確認。

初始化

  1. 如果 current.md 已存在:告知使用者,給出階段,繼續進行。絕不開始第二個區塊。
  2. mkdir -p ~/.claude/deep-work。如果 log.md 中有一個條目的標題以 | <cwd> 結尾,引用其最新的「下一步行動」和「下次會話成果」,並提供預設成果。如果 log.md 有 10 個或更多條目,顯示「範圍是:」值的統計。這是使用者的校準循環。
  3. 在一則訊息中詢問:意圖(一行)、成果(使用者想要的,用他們自己的話說)、完成定義(最多 3 個檢查項)。如果成果已來自 $ARGUMENTS,則僅詢問意圖和完成定義。
  4. 寫入 current.md 並開始計時。範疇界定在導向階段(在時鐘下)進行。用一句話回覆:「區塊已開始, 分鐘,結束時間 HH:MM。導向直至 :。正在界定範疇。」
start: <date +%s>
duration: <minutes>
project: <cwd>
last_phase: ORIENT
intent: ...
outcome: ...
dod:
- [ ] ...
current_state:
smallest_path:
parking:
stalls: 0
stuck_since:
issues:
  1. 範疇界定步驟。 將使用者所說的內容轉換成適合建置視窗的工作。
    • 查看實際狀態:git log、專案的筆記或計畫、成果會觸及的檔案。兩三個指令即可,無需全面調查。
    • 根據你發現的內容,將 current_state: 寫成一行,標記為(草稿)直到使用者確認。
    • 將成果與建置視窗進行比較。如果涉及跨多個畫面、帶有不確定性的功能,或需要未在場的人提供的輸入,用一句話說明。
    • 提出能最終在「建置」邊界前產出可測試成果的最小路徑。具體來說:做什麼、順序為何、修復什麼、停放什麼、證據為何。提出一個方案,不要列清單。
    • 僅問兩個問題:當前狀態是否相符?這是否為最佳路徑?使用者的答案即成為 smallest_path:。如果他們選擇更大的範圍,那是他們的決定。記錄下來,以便收尾時如實填寫「範圍是」。

每個階段的職責

導向 執行範疇界定步驟(初始化步驟 5),直到 smallest_path: 被填寫。在導向邊界時,如果成果需要未在場的人提供的輸入,提醒使用者:重新界定一次範疇,使其能在近期內完成,並在收尾時記錄原始成果為「受阻」。

建置 不要打擾使用者。將他們提到的任何偏離路徑的內容放入停車場,用一個詞確認(「已停放」)。卡住時:當他們說卡住了,寫下 stuck_since: <分鐘>。如果 15 分鐘後他們仍卡在同一個問題上,說「卡住 1,已經在這個問題上 15 分鐘了。要換個方法嗎?」並增加 stalls:。第二次卡住時說「卡住 2。SOP 規定為受阻,帶著現有成果進入驗證階段。」如果他們說完成定義已達成,建議立即進入驗證。超過建置邊界後,用一句話說明:「你現在在 分鐘。驗證已於 開始。」然後繼續協助他們要求的任何事情。

驗證 向使用者提供一次檢查清單:快樂路徑、明顯的失敗路徑、持久性、整合、日誌與錯誤、現有測試。將他們發現的內容記錄在 issues: 下,格式為 BLOCKS: ... 或 NOT: ...。

強化 向使用者提供一次順序:修復 BLOCKS 問題、移除除錯和臨時程式碼、處理錯誤、為新行為編寫或更新測試、命名與明顯的簡化、執行格式化/鏈接器/建置。

收尾(最後階段、「close」指令或超時)

  1. 提供提交或建立檢查點的選項。如果有 mg-git-commit 技能則使用該技能,否則使用一般的慣例提交。僅在確認後執行。
  2. 根據你的觀察草擬日誌條目。僅詢問你無法推斷的內容,最多三項:成果狀態、範圍是、下次會話成果。為每一項提供預設值。
  3. 附加到 ~/.claude/deep-work/log.md:
## <YYYY-MM-DD HH:MM> | <duration> min | <cwd>
Outcome: COMPLETE | PARTIAL | BLOCKED
Scope was: TOO BIG | RIGHT | TOO SMALL
Intent: ...
Outcome def: ...
What changed: ...
Evidence: ...
Remaining: ...
Next action: ...
Next session Outcome: ...
Parking lot: ...
  1. rm ~/.claude/deep-work/current.md。
  2. 僅回覆日誌條目,不包含其他內容。

語氣

  • 階段變更:回覆的第一行,一句話,說明當前階段以及使用者應做的事項。然後回答使用者實際提出的問題。
  • 邊界跨越:一句話,不教訓,然後執行工作。
  • 使用者說「完成」:建議進行驗證。
  • 掛鉤僅在使用者發送訊息時觸發。如果使用者沉默,沒有人會宣布邊界。手機計時器屬於使用者。掛鉤行包含牆鐘結束時間,方便使用者設定。

設定(此機器上已完成)

~/.claude/settings.json 中有一個 UserPromptSubmit 掛鉤,執行 sh ~/.claude/skills/deep-work/phase.sh。如果你將此技能複製到其他地方,請添加該掛鉤。

Individual skills in this repo

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

app-icon-design

Create, revise, and audit app icons using Apple's Human Interface Guidelines, with a clear visual identity and production-ready deliverables.

app-keyword-research

Validate an app idea against the App Store before building it. Turns the idea into search phrases, measures demand (App Store autocomplete) and competition (current top-10 apps) for each, ranks keywords by opportunity, and maps which apps own the market. Use when the user wants keyword research, ASO, "is there demand for…", "who are the competitors for…", "what should we call it / which keywords", or to validate or compare app ideas.

app-offer

Designs one opinionated "Grand Slam Offer" for any app idea, new or already shipped, by running Alex Hormozi's $100M Offers method adapted to app stores. It covers the market and niche, the commodity check, a value-equation audit, the problem inventory, delivery vehicles, the trimmed value stack, pricing and tiers, scarcity, urgency, bonuses, the guarantee, naming, the paywall per placement, the onboarding fast win, a test plan and a ship plan. It works within App Store and Google Play rules. For a shipped app it reads the code and notes first and produces a before/after. Use it when the user says "/app-offer", "run app-offer on <idea>", "make a grand slam offer for my app", "Hormozi my app", "price my app" or "design my paywall offer", or asks how to package, price, name, guarantee or paywall an app. It writes offer/grand-slam-offer.md (or ./<app-slug>-grand-slam-offer.md for a new idea).

brand-reference-pack

Build or refresh a shortform brand reference pack for any app from its real surfaces — website, App Store listing and reviews, socials, the live app (driven end to end on the simulator) and its code tokens — plus a status check of the upstream foundations (ICP, voice of customer, brand voice). Produces the context that content formats and design decisions are made from, as markdown, tokens.json and a PDF. Use for "build a brand pack for <app>", "refresh the brand pack", "capture the site/app/socials for shortform", "/brand-reference-pack".

new-app-info

Builds the information pack Apple asks for when App Review replies "We need additional information to better understand the app". It covers all six required items: (1) a screen recording on a physical device, as a shot list the user records; (2) the app's purpose and target audience; (3) setup and main features, with any login credentials or sample files; (4) the external services the app uses; (5) regional differences; (6) regulated industry or protected third-party material. It also runs Apple's "Prevent common issues" checks. Every answer comes from the app's own code (accounts, user-generated content, in-app purchases, SDKs, locales, screen-capture blocking, data deletion). It reads the connected iPhone's iOS version and checks it is the latest. It ends by telling the user to paste the reply into App Review Information → Notes. Use it when the user pastes that App Review message, says "/new-app-info", "we got rejected, they want more info", "answer App Review", or "make the App Store review pack". It w...

reel-motion-graphics

Turn a script or concept into an on-brand 9:16 explainer reel (luxury tech, warm sand on near-black, glassmorphism, CSS 3D, Bodoni + Instrument Sans) built in HyperFrames, with the animation above the fold and the presenter's talking head below. Use when the user gives a script, transcript, paper summary or concept and asks for a reel, motion graphics, an animated explainer or "the same style as the upcycling reel". Produces a HyperFrames project, a rendered MP4 and a live artifact player.

相關技能