init-project-html/SKILL.md
為項目初始化架構圖。透過 apltk CLI 將功能模塊與子模塊的關係轉化為可渲染的 HTML 架構圖,採用 C4 模型層級(Context → Container → Component → Code)。
npx skillsauth add laitszkin/apollo-toolkit init-project-htmlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
透過 apltk CLI 製作項目架構圖。
幫助用戶理解專案的軟體架構。
本技能的「功能模塊」與「子模塊」對應到 C4 model 的以下層級:
| C4 層級 | 本技能對應 | 說明 | 使用時機 | |---------|-----------|------|---------| | System Context | 整體系統 | 系統與外部 actor、外部系統的關係 | 步驟 1 建立基線認知 | | Container | 功能模塊 | 高階功能邊界(如登入功能、支付功能) | 主要抽象層級 | | Component | 子模塊 | 功能內部的實作單元(如 controller、service、repository) | 主要詳細層級 | | Code | function 行 | 函式層級細節 | 只在特定關鍵路徑需要 |
At load time, check the project state to select the correct mode:
design — No resources/project-architecture/atlas/ directory exists.
Run full C4 initialization. Use --evidence observed for source-confirmed components.
record — Atlas directory exists but is near-empty (< 2 features).
Run quick feature-by-feature recording using apltk architecture scan to discover candidates.
Use --evidence inferred for structurally inferred components.
update — Atlas has substantive content and source code has changed.
Delegate to update-project-html skill for drift measurement and incremental update.
review — An architecture_diff/ overlay directory exists.
Run diff comparison workflow. If no diff found, fallback to update mode.
guard — If you are explicitly instructed to run design/init mode but the atlas directory already exists and is non-empty, pause and ask the user whether to: (a) overwrite the existing atlas, (b) switch to update mode, or (c) abort.
適用模式:design(完整初始化)、record(快速記錄)
在深入程式碼前,先建立系統的宏觀認知:
然後閱讀 sample-demo/ 了解預期的輸出格式與抽象層級。
按照功能模塊定義,全面檢索代碼庫。 將其拆分為單個或多個功能模塊(對應 C4 Container 層級)。 接著,識別功能模塊下的子模塊(對應 C4 Component 層級),並進行深度閱讀。
如果外部環境允許使用 subagents,建議並行調度 subagents,並為每一個功能模塊分配一個 subagent 進行深度閱讀,要求 subagents 完整列出:
每個 subagent 回報的每個宣告都應附上對應的程式碼檔案路徑與行號,作為證據追溯的基礎。
apltk cli 工具協助生成架構圖依照 C4 層級逐步產生:
將前一步獲取的代碼庫知識透過 CLI 工具轉化為清晰的架構圖。 完成後驗證架構圖格式正確且可渲染。
每個透過 CLI 宣告的 component 應附上對應的來源證據:
若因時間或上下文限制無法完整追溯,在 meta.summary 中記錄已掃描範圍與已知遺漏。
references/TEMPLATE_SPEC.md:atlas 欄位、列舉和 CLI 寫入形狀速查表。references/definition.md: 功能模塊和子模塊的詳細定義。assets/architecture-page.template.html: 模板 html。references/architecture.css: 風格模板。sample-demo/:完整示例輸出,用於理解基礎 atlas 的最終形態與 C4 層級對應。apltk architecture --help - cli 工具的指引指令。development
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Guides the agent through creating a new Agent Skill from scratch. Use when the user wants to build a skill, create a new skill, scaffold a skill directory, or author a SKILL.md. Do NOT use for optimising or rewriting existing skills — use 'optimise-skill' for that. Do NOT use for editing files that are already part of a skill. Do NOT use for creating non-skill content like documentation, scripts, or project files.
development
Review a pull request — interactive PR selection via `gh`, 4-dimension code review (hallucinated code, architecture, performance, test validity), then post severity-graded comments with fix suggestions on the PR. Not for spec-based review — use `review` instead.
tools
協助完成自動化版本發佈。同步文檔、更新版本號、推送 tag 並建立 GitHub Release。