--- allowed-tools: >- Bash(git add:*), Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git commit:*), Bash(mkdir:*), Read, Write, Edit, Glob, Grep description: 'Command: ob-commit (imported from Claude Code)' name: cmd-ob-commit --- ## Context - Current git status: !`git status` - Current git diff (staged and unstaged changes): !`git diff HEAD` - Current branch: !`git branch --show-current` - Recent commits: !`git log --oneline -10` ## Task Based on the above changes, create a git commit AND write a development log to Obsidian. ### Step 1: Create the commit 1. Analyze the changes and draft a commit message following conventional commits format. 2. Stage the relevant files and create the commit. ### Step 2: Write Obsidian dev log (MANDATORY) After the commit succeeds, you MUST write a development log. Follow these rules exactly: **Directory**: `D:\markdown\workspace-lanqi\new-api\{YYYY-MM-DD}\` (create if not exists) **File naming**: `{YYYY-MM-DD} {commit message short summary}.md` - If multiple commits on the same day, append a brief distinguishing suffix - Example: `2026-04-16 fix: 修复支付回调签名验证.md` **Log template** — write in Chinese: ```markdown --- created: YYYY-MM-DD tags: - dev-log - new-api branch: {branch name} commit: {short hash} --- # {commit message} > 分支:`{branch}` | Commit:`{short hash}` | 日期:YYYY-MM-DD ## 变更概述 {1-3 sentences summarizing purpose and impact} ## 新增文件 | 文件 | 说明 | |------|------| | `{path}` | {description} | ## 修改文件 | 文件 | 变更内容 | |------|---------| | `{path}` | {what changed and why} | ## 关键代码变更 {Detailed description of core logic changes, including function signature changes, new key functions, algorithm logic. Use code blocks for key snippets.} ## 数据库变更 {If table structure changed, list new tables, columns, indexes. Delete this section if none.} ## 备注 {Additional notes, design decisions, known issues. Delete this section if none.} ``` ### Rules - Delete sections with no content (数据库变更, 备注) - All log content in Chinese - Frontmatter MUST include: `created`, `tags` (at least `dev-log` and `new-api`), `branch`, `commit` - Include enough detail for someone unfamiliar with the change to understand it - You MUST use multiple tools in a single response. Stage, commit, then write the log file.