system-prompts-and-models-o.../claude_skills/git-workflow-optimizer/SKILL.md
Claude 484f6c6b17
Add 25 world-class Claude Code skills for comprehensive software development
Created comprehensive skill collection covering all aspects of modern software
development with production-ready patterns, best practices, and detailed documentation.

## Skills Organized by Domain

### Code Quality & Architecture (2 skills)
- advanced-code-refactoring: SOLID principles, design patterns, refactoring patterns
- code-review: Automated/manual review, security, performance, maintainability

### API & Integration (2 skills)
- api-integration-expert: REST/GraphQL/WebSocket with auth, retry, caching
- graphql-schema-design: Schema design, resolvers, optimization, subscriptions

### Database & Data (3 skills)
- database-optimization: SQL/NoSQL tuning, indexing, query optimization
- data-pipeline: ETL/ELT with Airflow, Spark, dbt
- caching-strategies: Redis, Memcached, CDN, invalidation patterns

### Security & Authentication (2 skills)
- security-audit: OWASP Top 10, vulnerability scanning, security hardening
- auth-implementation: OAuth2, JWT, session management, SSO

### Testing & Quality (2 skills)
- test-automation: Unit/integration/E2E tests, TDD/BDD, coverage
- performance-profiling: CPU/memory profiling, Core Web Vitals optimization

### DevOps & Infrastructure (3 skills)
- docker-kubernetes: Containerization, orchestration, production deployments
- ci-cd-pipeline: GitHub Actions, automated testing, deployment strategies
- logging-monitoring: Observability with Datadog, Prometheus, Grafana, ELK

### Frontend Development (3 skills)
- frontend-accessibility: WCAG 2.1 compliance, ARIA, keyboard navigation
- ui-component-library: Design systems with React/Vue, Storybook
- mobile-responsive: Responsive design, mobile-first, PWAs

### Backend & Scaling (2 skills)
- backend-scaling: Load balancing, sharding, microservices, horizontal scaling
- real-time-systems: WebSockets, SSE, WebRTC for real-time features

### ML & AI (1 skill)
- ml-model-integration: Model serving, inference optimization, monitoring

### Development Tools (2 skills)
- git-workflow-optimizer: Git workflows, branching strategies, conflict resolution
- dependency-management: Package updates, security patches, version conflicts

### Code Maintenance (3 skills)
- error-handling: Robust error patterns, logging, graceful degradation
- documentation-generator: API docs, README, technical specifications
- migration-tools: Database/framework migrations with zero downtime

## Key Features

Each skill includes:
- YAML frontmatter with name, description, allowed tools
- Clear purpose and when to use
- Comprehensive capabilities overview
- Production-ready code examples
- Best practices and patterns
- Success criteria
- Tool-specific configurations

## Highlights

- 25 comprehensive skills covering full development lifecycle
- Production-ready patterns and examples
- Security-first approach throughout
- Performance optimization built-in
- Comprehensive testing strategies
- DevOps automation and infrastructure as code
- Modern frontend with accessibility focus
- Scalable backend architectures
- Data engineering and ML integration
- Advanced Git workflows

## File Structure

claude_skills/
├── README.md (comprehensive documentation)
├── advanced-code-refactoring/
│   ├── SKILL.md (main skill definition)
│   ├── reference.md (design patterns, SOLID principles)
│   └── examples.md (refactoring examples)
├── api-integration-expert/
│   └── SKILL.md (REST/GraphQL/WebSocket integration)
├── [23 more skills...]

Total: 25 skills + comprehensive README + supporting documentation

## Usage

Personal skills: cp -r claude_skills/* ~/.claude/skills/
Project skills: cp -r claude_skills/* .claude/skills/

Skills automatically activate based on context and description triggers.
2025-11-11 23:20:08 +00:00

155 lines
3.2 KiB
Markdown

---
name: git-workflow-optimizer
description: Expert in Git workflows, branching strategies, merge strategies, conflict resolution, and Git best practices. Use for optimizing Git workflows, resolving complex merge conflicts, or setting up branching strategies.
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
---
# Git Workflow Optimizer
## Purpose
Optimize Git workflows with best practices for branching, merging, and collaboration.
## Branching Strategies
### Git Flow
```bash
# Main branches
main # Production code
develop # Development integration
# Supporting branches
feature/user-auth
release/1.2.0
hotfix/critical-bug
# Workflow
git checkout develop
git checkout -b feature/new-feature
# ... work ...
git checkout develop
git merge --no-ff feature/new-feature
```
### GitHub Flow (Simpler)
```bash
# Only main branch + feature branches
main
feature/user-profile
feature/api-endpoints
# Workflow
git checkout -b feature/user-profile
# ... work ...
git push origin feature/user-profile
# Create PR → Review → Merge to main
```
### Trunk-Based Development
```bash
# Short-lived branches
main
short-lived-feature # Max 1-2 days
# Frequent integration to main
git checkout -b quick-feature
# ... small change ...
git push && create PR
# Merge immediately after review
```
## Commit Best Practices
```bash
# Conventional Commits
feat: add user authentication
fix: resolve login redirect issue
docs: update API documentation
style: format code with prettier
refactor: extract user service
test: add integration tests
chore: update dependencies
# Good commit message
feat(auth): implement JWT token refresh
- Add refresh token endpoint
- Store refresh tokens in Redis
- Set 7-day expiry on refresh tokens
- Update auth middleware to handle refresh
Closes #123
# Atomic commits
git add -p # Stage hunks interactively
git commit -m "fix: resolve validation error"
```
## Conflict Resolution
```bash
# When conflict occurs
git merge feature-branch
# CONFLICT in file.ts
# Option 1: Manual resolution
vim file.ts # Resolve conflicts
git add file.ts
git commit
# Option 2: Use merge tool
git mergetool
# Option 3: Choose one side
git checkout --ours file.ts # Keep your version
git checkout --theirs file.ts # Use their version
# Abort merge if needed
git merge --abort
```
## Useful Commands
```bash
# Interactive rebase (clean history)
git rebase -i HEAD~3
# Squash commits
git rebase -i main
# Mark commits as 'squash' or 'fixup'
# Cherry-pick specific commits
git cherry-pick abc123
# Find when bug was introduced
git bisect start
git bisect bad # Current is bad
git bisect good v1.0 # v1.0 was good
# Git checks out middle commit
# Test and mark good/bad until found
# Clean up branches
git branch --merged | grep -v "\*\|main\|develop" | xargs -n 1 git branch -d
# Stash changes
git stash save "WIP: working on feature"
git stash list
git stash pop
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Amend last commit
git commit --amend --no-edit
```
## Success Criteria
- ✓ Clear branching strategy
- ✓ Descriptive commit messages
- ✓ Clean commit history
- ✓ No merge conflicts
- ✓ Regular integration