Claude-skill-registry 1k-git-workflow
Git workflow and conventions for OneKey development. Use when creating branches, committing code, or creating PRs. Triggers on git, branch, commit, PR, pull request, merge, workflow.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/1k-git-workflow" ~/.claude/skills/majiayu000-claude-skill-registry-1k-git-workflow && rm -rf "$T"
manifest:
skills/data/1k-git-workflow/SKILL.mdsource content
OneKey Git Usage Guidelines
Branch Management
- Main branch:
- This is the primary development branchx - Workflow:
→ create feature branch → develop → PR back toxx - Do not use
,onekey
, ormaster
as the base branch - always usemainx - NEVER work directly on the
branch → ALWAYS create feature branchesx
Branch Naming
- Feature branches:
orfeat/descriptionfeature/description - Bug fixes:
fix/description - Refactoring:
refactor/description
Commit Message Format
Use Conventional Commits format:
- New featuresfeat:
- Bug fixesfix:
- Code refactoringrefactor:
/perf:
- Performance improvementsoptimize:
- Build, version, or non-code changeschore:
- Documentation onlydocs:
Format:
type: short description
- Use lowercase
- Keep first line under 72 characters
- Include issue number if applicable:
fix: resolve login bug OK-12345
IMPORTANT - Claude Code commits:
- Do NOT include "Generated with Claude Code" link
- Do NOT include "Co-Authored-By: Claude" signature
- Commit message should be indistinguishable from human-written commits
PR Naming Convention
Follow the same format as commit messages:
feat: add dark mode supportfix: resolve authentication timeout issuerefactor: simplify payment processing logic
Common Git Commands
Creating a Feature Branch
git checkout x git pull origin x git checkout -b feat/my-new-feature
Committing Changes
Option 1: Use /commit command (Recommended)
/commit
The
/commit command automatically runs pre-commit checks (yarn lint:staged and yarn tsc:staged) and creates a well-formatted commit message.
Option 2: Manual commit with pre-checks
# Stage your changes git add . # Run pre-commit checks (MANDATORY) yarn lint:staged yarn tsc:staged # If checks pass, commit git commit -m "feat: add user profile page"
IMPORTANT:
- NEVER commit code that fails linting or TypeScript compilation
- Pre-commit checks are mandatory as specified in CLAUDE.md
- The
command handles this automatically/commit
Pushing and Creating PR
git push -u origin feat/my-new-feature # Then create PR via GitHub UI or gh CLI
Rebasing on Latest x
git fetch origin git rebase origin/x