Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add nbsp1221/agent-skills
Or install specific skill: npx add-skill https://github.com/nbsp1221/agent-skills/tree/main/engineering/commit
# Description
Detect the repo's commit convention (Conventional Commits, Gitmoji, or a custom template) and create commits. Use when asked to commit, write a commit message, stage and commit changes, or commit and push work.
# SKILL.md
name: commit
description: Detect the repo's commit convention (Conventional Commits, Gitmoji, or a custom template) and create commits. Use when asked to commit, write a commit message, stage and commit changes, or commit and push work.
Commit
Follow the repo's existing convention, create the commit, verify, and push when requested.
Use the reference docs for detailed rules.
Workflow
- Identify the convention
- Read agent guidance first:
AGENTS.md,CLAUDE.md, etc. - Check repo guidance or templates if present:
CONTRIBUTING.md,README.md, commit templates, etc. - Scan history:
git log -n 50 --pretty=%s - Choose exactly one: Conventional Commits, Gitmoji, or Custom.
- If ambiguous, pause and ask using the user input guidance below.
-
Never invent new commit types or emoji codes.
-
Pull if requested
- If
--pullis set, rungit pullbefore reviewing changes. -
If conflicts occur, try to resolve them. If you cannot, pause and ask using the user input guidance below.
-
Review changes
git status -sbgit diff --statgit diff(orgit diff --staged)-
Split unrelated changes into separate commits.
-
Stage intentionally
- Prefer
git add -porgit add <files> -
Do not stage secrets or large generated artifacts unless explicitly requested.
-
Run verify steps
- If the repo has tests, lint, or format checks, run them before committing.
- Only proceed if they pass, unless the user requests
--no-verify. -
If checks fail, try to resolve them. If you cannot, pause and ask using the user input guidance below.
-
Compose the message
- If a convention is identified, you MUST open the matching reference and follow its rules before composing the message.
- Conventional Commits: follow
references/conventional-commits.md. - Gitmoji: follow
references/gitmoji.md. - Custom template: follow the exact pattern from history or the template file.
-
Use a body and trailers when needed (blank line before body, wrap at 72 chars).
-
Commit, inspect, and push
git commit -m "subject"(use a heredoc for a body).git log -1 --format="%h %s"git show --stat- If
--pushis set, push to the current branch after commit. - If push fails, pause and ask using the user input guidance below.
User input guidance
If you cannot proceed, pause and ask. Examples include: ambiguous convention, unresolved conflicts, failed checks, or a failed push.
- Summarize the current state and what you attempted.
- Offer a recommended option and why.
- List alternative options the user can choose.
Options
These options can be expressed in natural language, not just the flag form.
Honor the user's explicit request even if it does not use --flag syntax.
--dry-run: analyze changes and recommend a commit message, but do not commit or push--no-verify: skip tests, lint, and format checks even if they exist--pull: rungit pullbefore reviewing changes; attempt conflict resolution--push: push to the current branch after commit
Important Rules
- ALWAYS identify the repo convention and follow it over defaults.
- ALWAYS open the matching reference and follow its rules before composing the message.
- ALWAYS run verify steps if they exist, unless the user requests
--no-verify. - ALWAYS summarize state and propose options when you need user input.
- NEVER invent new commit types or emoji codes.
- NEVER stage secrets or large generated artifacts unless explicitly requested.
- NEVER push unless the user requests
--push. - NEVER compose a commit message without checking the matching reference.
References
references/conventional-commits.mdreferences/gitmoji.md
# README.md
๐ง Agent Skills
Personal collection of Agent Skills and instructions for AI agents.
Skills are folders of instructions, scripts, and references that agents can load to perform tasks more accurately. This repo follows the Agent Skills format.
Installation
Install a skill by pointing your agent's installer at the repo path.
$skill-installer install https://github.com/nbsp1221/agent-skills/tree/main/engineering/commit
After installing, restart your agent to pick up new skills.
Available Skills
commit
Detect the repo's commit convention (Conventional Commits, Gitmoji, or a custom template) and create commits.
Use when:
- You want to commit changes with the repo's existing convention
- You want a commit message generated from current changes
- You want to commit and push with the right format
Example usage:
- "Commit these changes with the repo's convention"
- "Generate a commit message for this diff"
- "Commit and push"
Location: engineering/commit
Skill Structure
Each skill is a folder that includes:
SKILL.mdfor instructions and workflowreferences/for detailed rules and documentation
References
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.