用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aiskillstore/marketplace --skill draft-commit命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | draft-commit |
| description | Draft clear commit messages from staged Git changes without modifying the repository. |
Create a thoughtful, supportive commit message from your staged changes.
Writing good commit messages is an art. This skill helps you capture the essence of your changes in a clear, inviting way that your future self (and teammates) will appreciate.
Your staged changes tell a story. Let's write that story together.
You're about to:
First, we'll look at your staged changes using git diff --cached.
This shows us:
From the changes, we infer:
We craft a message that:
We display the drafted message so you can:
The skill reads from .claude/skills/draft-commit/config.json:
Edit config.json to change defaults:
{
"style": "supportive", // or "concise"
"format": "descriptive", // or "conventional"
"messageLength": "concise", // or "detailed"
"includeContext": true,
"includeFileCounts": true
}
Run: git diff --cached
Returns: All staged changes in unified diff format
Analyze the diff to understand:
From patterns, detect:
feat — New functionalityfix — Bug fixesdocs — Documentation changesrefactor — Code structure improvementstest — Test additions/changeschore — Dependency updates, config changesstyle — Formatting, cleanupperf — Performance improvementsIdentify what part of the system:
Template:
[Brief description of what you did]
[Why this matters — what improves or what it enables]
[Optional: More context if helpful]
[Optional: File counts if configured]
Example:
Add StandardsRepository abstraction
Centralizes standards access into a single, reliable interface.
This eliminates duplication and makes the system easier to maintain.
Files:
- Added: lib/standards-repository.md, lib/schemas/standards-schema.json
- Modified: 7 agent/skill files updated to use new pattern
Why: Standards were scattered across multiple files, creating duplication
and coupling. Now there's one clear way to access standards with validation.
Template:
[Concise description]
[Brief context if needed]
Example:
Centralize standards access
Standards scattered across 7 files now use single repository pattern.
Template:
[type]: [description]
[Why this matters / additional context]
Example:
refactor: Centralize standards access with repository pattern
Consolidates standards loading into single interface.
Eliminates duplication and improves testability.
The skill displays the drafted message like this:
## 📝 Drafted Commit Message
[The actual message, ready to copy]
---
## How to Use It
1. Copy the message above
2. Stage your changes: `git add .` (or select specific files)
3. Create the commit: `git commit -m "your message"`
Or paste into your editor's commit message prompt.
---
**Changes analyzed**:
- [X files] changed
- [+Y lines] added
- [-Z lines] deleted
This keeps you in control. You:
If we encounter issues:
Staged changes: New function + tests + docs
Drafted message:
Add user authentication module
Implements JWT-based authentication for API.
Includes token generation, validation, and refresh logic.
Files:
- auth/jwt-handler.ts (main implementation)
- auth/__tests__/jwt-handler.test.ts (comprehensive tests)
- docs/AUTHENTICATION.md (usage guide)
Why: Enables secure API access. Provides foundation for role-based access control.
Staged changes: Fixed bug in error handler
Drafted message:
Fix error handling in API response middleware
Error messages weren't being properly serialized, causing 500 errors
to appear as malformed JSON. Now returns clean error objects.
Files:
- middleware/error-handler.ts (fixed serialization)
- __tests__/error-handler.test.ts (added test case)
This fixes issue #245.
Staged changes: Added README and guides
Drafted message:
Document setup and deployment process
Adds comprehensive guides for:
- Local development setup
- Running tests
- Building for production
- Deployment procedures
Files:
- SETUP.md (new)
- DEPLOYMENT.md (new)
- README.md (updated with links)
Why: New contributors need clear guidance. This reduces time to productivity.
{
"style": "concise",
"format": "conventional",
"messageLength": "concise",
"includeContext": true,
"includeFileCounts": false
}
Output: feat: Add authentication module
{
"style": "supportive",
"format": "descriptive",
"messageLength": "detailed",
"includeContext": true,
"includeFileCounts": true
}
Output: Long, detailed message with full context
{
"style": "concise",
"format": "descriptive",
"messageLength": "concise",
"includeContext": false,
"includeFileCounts": false
}
Output: Brief, to-the-point message
Q: What if I staged wrong changes?
A: Unstage them with git reset HEAD <file> and run /dac again.
Q: Can I edit the drafted message? A: Absolutely! Copy it, edit it, and use your version. It's a draft!
Q: Does this work with conventional commits?
A: Yes! Set format: "conventional" in config.json.
Q: Can I configure it differently per project? A: Yes! Each project's config.json is independent. Just edit the file.
This skill demonstrates HQB patterns:
git commit -m "your message"