Communitygithub.com

cdcoonce/Portfolio_Website

遵循常規提交風格的 Git 提交工作流程。當需要暫存和提交變更、編寫提交訊息,或使用者要求進行提交、保存工作時使用。確保一致的提交訊息格式、適當的作用域劃分及原子性提交。

Portfolio_Website 是什麼?

此技能提供了一個結構化的 Git 提交工作流程,強制使用常規提交風格(Conventional Commits)和原子性提交原則。它對於維持提交歷史的一致性和可讀性至關重要,特別是在協作專案中。此技能支援在 Claude 環境中執行,並詳細說明了提交訊息的格式,包括類型(如 feat、fix、refactor)、可選的作用域以及簡潔的摘要(50 字元軟限制)。工作流程包括審查變更、執行 CI 檢查、選擇性暫存檔案以及使用 heredoc 撰寫提交訊息。它還內建了規則來防止提交機密資訊、構建產物以及使用 --no-verify 跳過鉤子。此技能會自動附加共同作者行,以表彰 Claude 的貢獻。

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

在你喜歡的 AI 中提問

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

說明文件

提交技能

遵循常規提交風格和原子性提交原則,暫存並提交變更。

提交訊息格式

<類型>(<可選作用域>): <簡短摘要>
  • 全部小寫 — 類型、作用域和摘要
  • 摘要結尾無句號
  • 祈使語氣 — 使用「新增功能」而非「已新增功能」或「新增了功能」
  • 摘要行最多 50 個字元(軟限制,硬限制為 72 字元)
  • 摘要描述原因,而非內容(diff 顯示內容)

類型

類型使用時機範例
feat新功能或能力feat: add user authentication flow
fix錯誤修復fix: resolve null pointer on empty input
refactor既不修復錯誤也不新增功能的程式碼變更refactor: extract parser into standalone module
style格式化、空白、分號 — 無邏輯變更style: apply formatter to config files
docs僅文件相關docs: add API usage examples to readme
test新增或更新測試test: add edge case coverage for validator
chore建置流程、工具、依賴、設定chore: update dependency lockfile
perf效能改善perf: cache repeated database lookups
ciCI/CD 管道變更ci: add lint step to PR workflow

作用域(可選)

當類型單獨使用時意義模糊,可使用作用域來縮小範圍。從專案的目錄結構或領域區域推導出作用域:

feat(auth): add OAuth2 token refresh
fix(api): handle timeout on large payloads
docs(contributing): add setup instructions

工作流程

  1. 審查變更 — 執行 git status 和 git diff(暫存 + 未暫存)以了解變更內容
  2. 檢查近期歷史 — 執行 git log --oneline -10 以符合專案現有的提交風格
  3. 確認意圖 — 確認變更構成單一邏輯單元;若不是,建議拆分為多個提交
  4. 執行 CI 檢查 — 在暫存之前,執行專案的 linter、格式化程式和測試套件以提早發現問題。檢查 package.json 腳本、Makefile 或 CI 設定以取得可用的命令。在繼續之前修復任何失敗。
  5. 暫存檔案 — 按名稱添加特定檔案(git add file1 file2),切勿使用 git add -A 或 git add .
  6. 撰寫訊息 — 選擇正確的類型,如有幫助則添加作用域,撰寫祈使句摘要
  7. 提交 — 使用 heredoc 處理訊息以確保格式整潔
  8. 驗證 — 提交後執行 git status 以確認提交成功

多行提交

對於需要主體的提交(少見 — 偏好簡潔的單行訊息):

<類型>(<作用域>): <摘要>

<解釋原因而非內容的主體>
  • 摘要和主體之間空一行
  • 主體在 72 個字元處換行
  • 僅在摘要單獨無法傳達理由時使用主體

規則

  • 原子性提交 — 每次提交一個邏輯變更。一個功能及其測試可以是一個提交。不相關的格式化修復應為單獨的提交。
  • 無機密資訊 — 絕不提交 .env、憑證、API 金鑰或令牌。如果這些已被暫存,請警告使用者。
  • 無生成產物 — 不提交建置輸出、依賴目錄或編譯檔案。在暫存前檢查 .gitignore 的涵蓋範圍。
  • 僅新提交 — 始終建立新提交。除非使用者明確要求,否則絕不修改(amend)。
  • 不跳過鉤子 — 絕不使用 --no-verify。如果鉤子失敗,請修復根本問題。
  • 共同作者行 — 當 Claude 撰寫或共同撰寫了變更時,附加共同作者結尾:
Co-Authored-By: Claude <[email protected]>

範例

# 功能 — 新能力
feat: add webhook notification system

# 帶作用域的功能
feat(api): add rate limiting middleware

# 修復 — 錯誤修正
fix: prevent crash on malformed JSON input

# 風格 — 僅格式化
style: apply consistent indentation across modules

# 文件 — 文件
 docs: add architecture decision records

# 雜務 — 工具/設定
chore: broaden gitignore to cover build artifacts

# 帶作用域的測試
test(auth): add integration tests for token refresh

# 帶作用域的重構
refactor(db): replace raw queries with query builder

參考文件

  • conventional-commits.md — 類型選擇指南、重大變更、作用域策略、多檔案提交決策、主體格式、結尾以及常見錯誤

Individual skills in this repo

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

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 or update the `.claude/docs/project.md` file that gives Claude project-specific context. Use this skill when the user asks to create, update, regenerate, or refresh project context, or says things like "update project.md", "generate project context", "this repo needs a project.md", or "Claude doesn't know about this project". Also trigger when onboarding Claude to a new repository for the first time.

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.

相關技能