Communitygithub.com

cdcoonce/Portfolio_Website

生成或更新 `.claude/docs/project.md` 檔案,為 Claude 提供專案特定背景資訊。當使用者要求建立、更新、重新產生或重新整理專案背景,或提及「更新 project.md」、「產生專案背景」、「這個儲存庫需要一個 project.md」或「Claude 不瞭解這個專案」時使用。也適用於首次將 Claude 導入新儲存庫時。

Portfolio_Website 是什麼?

這個名為「Project Context Generator」的技能會自動建立或更新 `.claude/docs/project.md` 檔案,這是一個為 Claude 設計的專案參考文件。不同於為人類撰寫的 README,`project.md` 要求精簡、事實性強且無行銷用語。該技能會透過三個階段的結構化分析(專案元數據、架構掃描、資料來源與基礎設施)來掃描程式碼庫,並使用信心等級標籤([confirmed]、[inferred-high]、[inferred-low]、[unknown])標記每個事實。分析後,它會針對低信心或未知項目向使用者提出聚焦的澄清問題,然後根據指定的輸出結構(包含技術棧、專案佈局、資料流程、測試標記和架構模式)生成 `project.md`。該技能支援任何可以放置 `.claude/docs/project.md` 的平台(例如 Claude Code),並確保檔案不超過 100 行,必要時連結到更詳細的文件。最終輸出的檔案會儲存在 `.claude/docs/project.md`,如果檔案已存在,會在使用者確認前顯示差異摘要。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cdcoonce/Portfolio_Website/tree/HEAD/.claude/skills/project-context

在你喜歡的 AI 中提問

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

說明文件

專案背景產生器

建立或更新 .claude/docs/project.md — 這是每次對話中 Claude 都會載入的精簡專案參考文件。與為人類撰寫的 README 不同,project.md 是為 Claude 撰寫的:內容密集、事實性強、無行銷用語。

為何需要此技能

.claude/docs/project.md 會透過 CLAUDE.md 自動載入每一次 Claude 對話中。當檔案遺失或過時時,Claude 會浪費多次對話來重新發現技術棧、測試指令和架構。此技能自動化此發現過程,並產生一個緊湊且準確的參考檔案。

工作流程

步驟 1:分析程式碼庫

執行結構化的三階段分析以收集專案事實。每個事實都標記一個信心等級:[confirmed](從原始碼讀取)、[inferred-high](強力證據)、[inferred-low](部分證據)或 [unknown]。

有關詳細的工具動作、glob/grep 模式和記錄範本,請參閱 references/analysis-methodology.md。

第一階段 — 專案元數據: 使用 glob 搜尋套件管理器檔案、環境變數範本、CI 配置和工具鏈檔案。提取:專案名稱、語言、Python 版本、相依套件(附用途)、指令碼/命令、環境變數、CI 階段、測試標記。

第二階段 — 架構掃描: 使用 glob 搜尋所有原始碼檔案。識別入口點、建立匯入圖、分類模組(核心/葉子/協調器),並識別架構模式。讀取原始碼引用的配置檔案。

第三階段 — 資料來源與基礎設施: 識別外部資料來源(資料庫、API、檔案)、輸出目標(檔案、上傳、API)、測試結構和自訂例外層級。

步驟 2:提出澄清問題

分析後,針對 [inferred-low] 和 [unknown] 的項目向使用者提問。保持專注 — 不要問你已經知道的事情。常見缺口:

  • 專案目的:這個專案解決什麼問題?(如果程式碼無法清楚表達)
  • 資料來源:哪些系統提供資料?哪些系統接收輸出?
  • 部署:這個專案如何在何處執行?(本機、排程、雲端)

如果程式碼庫很簡單,你可能只需要問 1-2 個問題 — 或甚至不需要。

步驟 3:產生 project.md

使用以下結構撰寫檔案。如果 .claude/docs/project.md 已存在,覆寫前需先取得使用者確認。


輸出結構

產生的 project.md 必須遵循此結構。根據專案規模調整深度 — 小型專案可以略過部分章節,複雜的專案可以新增小節。

# {專案名稱} — 專案背景

{一句話描述:它是什麼、做什麼、關鍵技術。}

## 技術棧

- **{語言/執行環境}** — {已知的版本限制}
- **{框架}** — {用途}
- **{關鍵套件}** — {用途}
- ...項目符號列表,工具名稱加粗,註明用途

## 專案佈局

```text
{帶說明的目錄樹 — 每個條目一句短語}
```

資料流程

{顯示來源 → 轉換 → 輸出管線的 ASCII 圖表}

資料來源

  • {來源名稱} — {提供的內容}
  • ...針對資料庫、API、本機檔案等

測試標記

  • {測試指令} — {執行的內容}
  • {標記名稱} — {控制的內容}

關鍵架構模式

  • {模式名稱}({檔案}):{一句話解釋}
  • ...僅列出值得說明的非顯而易見的模式

撰寫指南

  • 密集勝於冗長。 每行都應有存在的價值。Claude 不需要動機或背景設定 — 只需要事實。
  • 具體勝於籠統。 「執行 uv run pytest -m 'not snowflake'」優於「執行排除外部相依的測試」。
  • 每個模式一句話。 架構模式應一行說明 — 名稱、檔案、解釋。
  • 真實指令。 從 pyproject.toml 或 CI 配置複製測試指令,而非改寫版本。
  • 標註相依套件。 不要只列出 polars — 要寫 polars — 高效能 DataFrame。
  • 資料來源至關重要。 Claude 需要知道有哪些外部系統。列出每個資料庫、API 和檔案來源。
  • 保持在 100 行以內。 如果 project.md 內容超過約 100 行,表示太詳細了 — 將具體細節移至專用文件並提供連結。

輸出

將檔案儲存為 .claude/docs/project.md(必要時建立目錄)。如果檔案已存在,覆寫前向使用者顯示差異摘要。

產生 project.md 後,檢查 CLAUDE.md 是否有引用它。如果沒有,建議加入類似以下的行:

有關專案特定詳細資訊(技術棧、架構、測試標記),請參閱 [.claude/docs/project.md](.claude/docs/project.md)。

Individual skills in this repo

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

cdcoonce/Portfolio_Website

Git commit workflow with enforced conventional commit style. Use when Claude needs to stage and commit changes, craft commit messages, or the user asks to commit, make a commit, or save their work. Ensures consistent commit message format, proper scoping, and atomic commits across the project.

cdcoonce/Portfolio_Website

AI-powered code quality analysis for Python, Markdown, and Mermaid diagrams. Use this skill when: (1) reviewing code for quality issues, (2) checking Python files for PEP8 violations, unused code, missing type hints, docstring problems, complexity issues, or potential runtime errors, (3) validating Markdown documentation for broken links, heading structure, or formatting issues, (4) validating Mermaid diagram syntax, (5) the user asks for a "code review" or "quality check", (6) analyzing code snippets pasted in conversation, or (7) suggesting and applying fixes for code quality issues.

cdcoonce/Portfolio_Website

Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.

cdcoonce/Portfolio_Website

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

cdcoonce/Portfolio_Website

Orchestrate the full GitHub-issues-driven development lifecycle. 7-phase pipeline from brainstorm through PR with state tracking and cross-conversation resume. Use when user says "dev cycle", "development workflow", "full development pipeline", or invokes /dev-cycle.

cdcoonce/Portfolio_Website

Production Python coding standards with automatic version detection (3.10-3.13). Use when writing, reviewing, or refactoring Python to ensure adherence to modern type syntax, LBYL exception handling, pathlib operations, ABC-based interfaces, and production-tested patterns. Not Dagster-specific - applies to any Python project.

cdcoonce/Portfolio_Website

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

cdcoonce/Portfolio_Website

GitHub CLI (gh) integration for managing issues, pull requests, branches,

cdcoonce/Portfolio_Website

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

cdcoonce/Portfolio_Website

Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.

cdcoonce/Portfolio_Website

CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Three modes: SCOPE EXPANSION (dream big), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when the user asks for a plan review, CEO review, mega review, or wants a plan challenged/stress-tested before implementation.

cdcoonce/Portfolio_Website

Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.

cdcoonce/Portfolio_Website

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in docs/plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

cdcoonce/Portfolio_Website

Generate comprehensive, high-quality README.md files for code repositories. Use this skill whenever the user asks to create, write, generate, update, or improve a README for any project or repository. Also trigger when the user says things like "document this project", "write docs for this repo", "this repo needs a README", "help me onboard developers to this codebase", or asks for project documentation in markdown. Even if the user just says "README" or "readme" in the context of a codebase, use this skill.

cdcoonce/Portfolio_Website

Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

cdcoonce/Portfolio_Website

Set up pre-commit hooks for the current repo. Use when user wants to add pre-commit hooks, configure commit-time linting, formatting, type checking, or testing. Triggers on "pre-commit", "git hooks", "linting hooks", or /setup-pre-commit.

cdcoonce/Portfolio_Website

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

cdcoonce/Portfolio_Website

Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.

cdcoonce/Portfolio_Website

Rewrites the prose sections of wiki pages in-place. Reads source files to understand current context, then updates only the content inside <!-- claude:prose --> ... <!-- claude:prose:end --> markers. Never touches <!-- generated:start --> ... <!-- generated:end --> blocks. Supports targeting a single page with /update-wiki {PageName}.

cdcoonce/Portfolio_Website

Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.

相關技能