Communitygithub.com

cdcoonce/Portfolio_Website

為當前儲存庫設定 pre-commit 鉤子。當使用者想要新增 pre-commit 鉤子、配置提交時的 linting、格式化、型別檢查或測試時使用。觸發關鍵字:「pre-commit」、「git hooks」、「linting hooks」或「/setup-pre-commit」。

Portfolio_Website 是什麼?

這項技能會自動為你的 Git 儲存庫設定 pre-commit 鉤子,支援 Python 和 JavaScript/TypeScript 專案。它能偵測專案類型(根據 `pyproject.toml` 或 `package.json`),引導你選擇要啟用的檢查(linting、格式化、型別檢查、測試等),然後安裝必要的框架(例如 pre-commit)、根據你的選擇產生設定檔,最後在 Git 中啟用這些鉤子。設定完成後,它會對整個程式碼庫執行鉤子以進行驗證,並在可能的情況下自動修復違規問題(例如使用 `ruff --fix` 或 `prettier --write`),然後提交所有相關的設定檔。這簡化了強制執行程式碼品質檢查的流程,讓提交更乾淨且自動化。

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

在你喜歡的 AI 中提問

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

說明文件

設定 Pre-Commit 鉤子

前置需求

開始前,請確認:

  1. Git 儲存庫存在 — 檢查是否有 .git/ 目錄。如果找不到,通知使用者並停止。
  2. 套件管理工具可用 — 偵測後(見下方),確認相關工具已安裝:
    • Python:執行 uv --version 以確認 uv 可用
    • JS/TS:執行 npx --version 以確認 npx 可用

如果前置需求失敗,請告知使用者缺少什麼以及如何安裝。

步驟 1:偵測專案類型

檢查專案根目錄是否有:

信號結果
存在 pyproject.toml,無 package.jsonPython → 讀取 python-setup.md
存在 package.json,無 pyproject.tomlJS/TS → 讀取 js-setup.md
兩者都存在詢問使用者(見下方)
兩者都不存在告知使用者:未偵測到支援的專案,停止

兩者都存在

使用 AskUserQuestion 提供三個選項:

  • A) 僅 Python — 遵循 python-setup.md
  • B) 僅 JS/TS — 遵循 js-setup.md
  • C) 兩者 — 遵循 python-setup.md,包含「雙語言模式」章節

步驟 2:詢問使用者要啟用哪些檢查

委派給語言專屬的設定檔案。每個檔案會透過 AskUserQuestion 呈現可用的檢查。

如果使用者未選擇任何檢查:告知使用者不會安裝任何鉤子,並正常結束。

步驟 3:安裝框架

遵循語言專屬的設定檔案。

步驟 4:產生設定

遵循語言專屬的設定檔案,根據使用者的選擇建立設定檔。

步驟 5:安裝鉤子

遵循語言專屬的設定檔案,在 Git 中啟用鉤子。

步驟 6:驗證

對整個程式碼庫執行鉤子,以確認它們正常運作。

步驟 7:處理驗證失敗

  • 如果發現 lint/格式違規,在可能的情況下自動修復(ruff --fix、ruff format、prettier --write)並重新執行。
  • 如果發生型別或測試失敗,告知使用者,然後僅提交鉤子設定檔。

步驟 8:提交

暫存並提交所有已建立或修改的設定檔。

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 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

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.

相關技能