Communitygithub.com

cdcoonce/Portfolio_Website

Git 提交流程,遵循约定式提交规范。当 Claude 需要暂存和提交更改、编写提交信息或用户要求提交、保存工作时使用。确保一致的提交信息格式、适当的作用域和原子提交。

Portfolio_Website 是什么?

该技能为 AI 助手(如 Claude Code、Cursor、Codex 等)提供了一种结构化的 Git 提交工作流,强制使用约定式提交(Conventional Commits)格式。它确保提交信息具有一致的格式,包含类型、可选作用域和符合规范的摘要,同时倡导原子提交原则——每个提交只包含一个逻辑变更。该技能适用于任何基于 Git 的项目,其工作流程包括:审查变更、检查近期提交历史、运行 CI 检查(如 linter 和测试)、按文件名暂存文件、使用可读的 heredoc 提交信息进行提交,以及提交后验证。还包含附加规则,如禁止提交密钥和生成产物、不修改已有提交、不跳过 Git 钩子,并在必要时添加合作作者署名。提供详细的类型表、作用域建议、多行提交格式及常见场景示例,帮助用户保持清晰、可供审查的项目提交历史。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

提交技能

按照约定式提交风格和原子提交原则,暂存并提交更改。

提交信息格式

<类型>(<可选作用域>): <简短摘要>
  • 全部小写 — 类型、作用域和摘要均小写
  • 摘要末尾不加句号
  • 祈使语气 — 使用"添加功能"而非"添加了功能"或"添加功能"
  • 摘要行最多 50 个字符(软限制,硬限制 72 个字符)
  • 摘要描述原因,而非内容(差异显示内容)

类型

类型使用场景示例
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 的覆盖范围。
  • 仅新建提交 — 始终创建新提交。除非用户明确要求,否则绝不修改。
  • 不跳过钩子 — 绝不使用 --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.

相关技能