鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

git

规范代码提交与协作流程,通过标准化的提交类型、作用域和描述格式确保版本历史清晰可追溯,支持自动化版本管理与变更日志生成,同时明确拉取请求的描述规范与合并策略,提升团队协作效率与代码审查质量。

测试与安全效率工具开发运维
访问 GitHub
文档Skills.MD
name
git
description
Git commit and pull request guidelines using conventional commits. Use when creating commits, writing commit messages, creating PRs, or reviewing PR descriptions.

Git Commit and Pull Request Guidelines

Conventional Commits Format

▼
text
复制代码
<type>[optional scope]: <description> [optional body] [optional footer(s)]

Commit Types

  • feat: New features (correlates with MINOR in semantic versioning)
  • fix: Bug fixes (correlates with PATCH in semantic versioning)
  • docs: Documentation only changes
  • refactor: Code changes that neither fix bugs nor add features
  • perf: Performance improvements
  • test: Adding or modifying tests
  • chore: Maintenance tasks, dependency updates, etc.
  • style: Code style changes (formatting, missing semicolons, etc.)
  • build: Changes to build system or dependencies
  • ci: Changes to CI configuration files and scripts

Scope Guidelines

  • Scope is OPTIONAL: only add when it provides clarity
  • Use lowercase, placed in parentheses after type: feat(transcription):
  • Prefer specific component/module names over generic terms
  • Your current practice is good: component names (EditRecordingDialog), feature areas (transcription, sound)
  • Avoid overly generic scopes like ui or backend unless truly appropriate

When to Use Scope

  • When the change is localized to a specific component/module
  • When it helps distinguish between similar changes
  • When working in a large codebase with distinct areas

When NOT to Use Scope

  • When the change affects multiple areas equally
  • When the type alone is sufficiently descriptive
  • For small, obvious changes

Description Rules

  • Start with lowercase immediately after the colon and space
  • Use imperative mood ("add" not "added" or "adds")
  • No period at the end
  • Keep under 50-72 characters on first line

Breaking Changes

  • Add ! after type/scope, before colon: feat(api)!: change endpoint structure
  • Include BREAKING CHANGE: in the footer with details
  • These trigger MAJOR version bumps in semantic versioning

Examples Following Your Style:

  • feat(transcription): add model selection for OpenAI providers
  • fix(sound): resolve audio import paths in assets module
  • refactor(EditRecordingDialog): implement working copy pattern
  • docs(README): clarify cost comparison section
  • chore: update dependencies to latest versions
  • fix!: change default transcription API endpoint

Commit Messages Best Practices

  • NEVER include Claude Code or opencode watermarks or attribution
  • Each commit should represent a single, atomic change
  • Write commits for future developers (including yourself)
  • If you need more than one line to describe what you did, consider splitting the commit

Pull Request Guidelines

  • NEVER include Claude Code or opencode watermarks or attribution in PR titles/descriptions
  • PR title should follow same conventional commit format as commits
  • Focus on the "why" and "what" of changes, not the "how it was created"
  • Include any breaking changes prominently
  • Link to relevant issues

Verifying GitHub Usernames

CRITICAL: When mentioning GitHub users with @username in PR descriptions, issue comments, or any GitHub content, NEVER guess or assume usernames. Always verify programmatically using the GitHub CLI:

▼
bash
复制代码
# Get the author of a PR gh pr view <PR_NUMBER> --json author # Get the author of an issue gh issue view <ISSUE_NUMBER> --json author

This prevents embarrassing mistakes where you credit the wrong person. Always run the verification command before writing the @mention.

Merge Strategy

When merging PRs, use regular merge commits (NOT squash):

▼
bash
复制代码
gh pr merge --merge # Correct: preserves commit history # NOT: gh pr merge --squash # NOT: gh pr merge --rebase # Use --admin flag if needed to bypass branch protections gh pr merge --merge --admin

Preserve individual commits; they tell the story of how the work evolved.

Pull Request Body Format

Use clean paragraph format instead of bullet points or structured sections:

First Paragraph: Explain what the change does and what problem it solves.

  • Focus on the user-facing benefit or technical improvement
  • Use clear, descriptive language about the behavior change

Subsequent Paragraphs: Explain how the implementation works.

  • Describe the technical approach taken
  • Explain key classes, methods, or patterns used
  • Include reasoning for technical decisions (e.g., why flex-1 is needed)

Example:

▼
text
复制代码
This change enables proper vertical scrolling for drawer components when content exceeds the available drawer height. Previously, drawers with long content could overflow without proper scrolling behavior, making it difficult for users to access all content and resulting in poor mobile UX. To accomplish this, I wrapped the `{@render children?.()}` in a `<div class="flex-1 overflow-y-auto">` container. The `flex-1` class ensures the content area takes up all remaining space after the fixed drag handle at the top, while `overflow-y-auto` enables vertical scrolling when the content height exceeds the available space. This maintains the drag handle as a fixed element while allowing the content to scroll independently, preserving the expected drawer interaction pattern.

Body Structure

  1. Context Section (if needed for complex changes):

    • Use bullet points for multiple related observations
    • Mix technical detail with accessible explanations
    • Acknowledge trade-offs: "we'd like to X, but at the same time Y is problematic"
  2. Solution Description:

    • Lead with what changed in plain language
    • Show code examples inline to illustrate the improvement
    • Compare before/after when it clarifies the change
  3. Technical Details:

    • Explain the "why" behind architectural decisions
    • Reference philosophical goals: "This doubles down on what people love about..."
    • Connect to long-term vision when relevant
  4. Outstanding Work (if applicable):

    • List TODOs candidly
    • Be specific about what remains
    • No need to apologize; just state what's left

Voice and Tone

  • Conversational but precise: Write like explaining to a colleague
  • Direct and honest: "This has been painful" rather than "This presented challenges"
  • Show your thinking: "We considered X, but Y made more sense because..."
  • Use "we" for team decisions, "I" for personal observations

Example PR Description:

▼
text
复制代码
This fixes the long-standing issue with nested reactivity in state management. First, some context: users have consistently found it cumbersome to create deeply reactive state. The current approach requires manual get/set properties, which doesn't feel sufficiently Svelte-like. Meanwhile, we want to move away from object mutation for future performance optimizations, but `obj = { ...obj, x: obj.x + 1 }` is ugly and creates overhead. This PR introduces proxy-based reactivity that lets you write idiomatic JavaScript: ```javascript let todos = $state([]); todos.push({ done: false, text: 'Learn Svelte' }); // just works ``` Under the hood, we're using Proxies to lazily create signals as necessary. This gives us the ergonomics of mutation with the performance benefits of immutability. Still TODO: - Performance optimizations for large arrays - Documentation updates - Migration guide for existing codebases This doubles down on Svelte's philosophy of writing less, more intuitive code while setting us up for the fine-grained reactivity improvements planned for v6.

What to Avoid

  • Listing files changed: Never enumerate which files were modified. GitHub's "Files changed" tab already shows this; the PR description should explain WHY, not WHAT files
  • Bullet points or structured lists
  • Section headers like "## Summary" or "## Changes Made"
  • Test plans or checklists (unless specifically requested)
  • Marketing language or excessive formatting
  • Corporate language: "This PR enhances our solution by leveraging..."
  • Excessive structure: Multiple heading levels and subsections
  • Marketing speak: "game-changing", "revolutionary", "seamless"
  • Over-explaining simple changes
  • Apologetic tone for reasonable decisions

What NOT to Include:

  • Generated with [Claude Code](https://claude.ai/code)
  • Co-Authored-By: Claude <noreply@anthropic.com>
  • Any references to AI assistance
  • Generated with [opencode](https://opencode.ai)
  • Co-Authored-By: opencode <noreply@opencode.ai>
  • Tool attribution or watermarks
测试与安全
效率工具
开发运维

快捷安装

复制到终端去安装 Skill

npxskillsaddEpicenterHQ/epicenter--skill"git"
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
朱雀AI检测助手朱雀AI检测助手
零感AI零感AI
Skills 推荐
debug
debug 是一个系统化定位软件缺陷根因的技能,适用于用户报告 'fix'、'broken'、'error' 等问题或测试意外失败时。它通过可验证的假设、最小复现、因果链分析和回归测试,确保在修复前准确定位根本原因。
retrieving-developer-knowledge
retrieving-developer-knowledge 用于搜索、获取和整合 Google 官方开发者文档,覆盖 Google Cloud、AI/Gemini、Android、Chrome、Web、Flutter、Go、Firebase 等平台,适用于查询 gcloud CLI 命令、API 语法、IAM 权限或架构对比等场景。
diff-intake
diff-intake 读取 PR 或分支差异,生成结构化 YAML 变更摘要,用于下游 analytics instrumentation 技能。适用于用户提交 PR 链接、分支对比或原始 diff 后需理解变更内容、评估分析覆盖或启动埋点流程的场景。
load-balancer-configurator
根据用户需求自动生成各类负载均衡器的生产级配置,覆盖 ALB、NLB、Nginx 和 HAProxy 等主流类型,适配不同协议、端口、健康检查及后端服务拓扑,支持直接集成到基础设施即代码流程中。
webapp-testing
提供本地 Web 应用的端到端测试能力,支持页面导航、元素交互、表单填写、动态等待、断言验证、截图捕获、浏览器日志收集及网络请求拦截,适用于前端功能验证与 UI 行为调试。