本文へ移動
cccskills
無料GitHub で公開

git-workflow

Automate the complete Git development workflow — create feature branches with conventional naming, atomic commits with conventional commit messages, interactive rebase, squash merges, PR body generation from commit history, branch cleanup, and git worktree patterns. Use when user asks to create a branch, commit changes, make a PR, rebase, squash, clean up branches, or follow a Git workflow. Do NOT use for CI/CD pipeline configuration (use ci-cd), code review (use code-review), or GitHub Actions workflows.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md9.5 KB
  • references/branch-strategy.md6.6 KB
  • references/git-workflows.md7.1 KB
  • scripts/auto-commit.ps15.5 KB
  • scripts/cleanup-branches.ps13.6 KB
  • scripts/create-feature-branch.ps12.7 KB
  • scripts/pr-body.ps17.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Git Workflow

Automate the development cycle: branch, commit, PR, review, merge, cleanup. Follows conventional commits and trunk-based development.

Workflow

Step 1: Create a feature branch

scripts/create-feature-branch.ps1 -Name "add-user-auth" -Type feat

This:

  1. Detects default branch (main/master)
  2. Fetches and pulls latest
  3. Creates feat/add-user-auth from base
  4. Pushes upstream with tracking

Branch naming:

TypePrefixExample
Featurefeat/feat/add-user-auth
Fixfix/fix/login-redirect
Docsdocs/docs/api-readme
Refactorrefactor/refactor/auth-middleware
Chorechore/chore/update-deps

Step 2: Make atomic commits

scripts/auto-commit.ps1 -Scope "auth" -DryRun  # Preview first
scripts/auto-commit.ps1 -Scope "auth"           # Commit

The script analyses changed files, generates a conventional commit message, and stages+commits.

Conventional commit format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Rules:

  • One logical change per commit
  • Description: imperative mood, lowercase, max 72 chars
  • Scope: the module/area affected
  • Footer: BREAKING CHANGE:, Closes #123, Co-authored-by:

Step 3: Prepare for PR

# Interactive rebase (squash WIP commits)
git rebase -i main

# Generate PR body from commit history
scripts/pr-body.ps1 -Clipboard

The PR body script:

  1. Detects base branch
  2. Extracts commits since fork
  3. Groups by conventional commit type
  4. Generates ## Summary, ## Changes, ## Testing sections
  5. Copies to clipboard

Squash rules:

  • Squash fixup! and wip commits
  • Keep meaningful commit history
  • Never squash if commits have different scopes
  • Use git rebase -i main with fixup (f) for WIP commits

Step 4: Create PR

# Create PR with generated body
gh pr create --title "feat(auth): add user authentication" --body "$(Get-Clipboard)"

# Or use the file
gh pr create --title "feat(auth): add user authentication" --body-file .pr-body.md

PR guidelines:

AspectRule
SizeMax 400 lines changed
TitleSame as conventional commit
DescriptionWhat + Why + How to test
Reviewers1-2 relevant team members
LabelsType (feat/fix/docs) + priority
DraftUse for Work-in-Progress

Step 5: Clean up after merge

scripts/cleanup-branches.ps1

This lists merged branches (excluding protected ones), asks for confirmation, deletes locally and remotely, and prunes remote tracking refs.

Workflow by strategy

See references/git-workflows.md for full reference.

StrategyBest forBranch modelProsConsGuidance
Trunk-basedCI/CD, deploys multiple times/day, feature flagsShort-lived feature branches → main (hours, not days)Fast integration, no merge hell, simple CIRequires feature flags + high test coverageKeep branches under 24h. Use branch by abstraction for large changes.
GitHub FlowStandard SaaS, team of 2-10feature → main (PR + squash merge)Simple, review-friendly, clean historyCan't manage multiple releasesUse for most projects. Squash-merge keeps main linear. Tag releases from main.
GitFlowRelease management, multiple supported versions, regulated industriesfeature → develop → release → main + hotfix branchesFull version tracking, parallel releasesHigh complexity, slow to releaseOnly use if you support 2+ release versions simultaneously. Overkill for single-version SaaS.
GitLab FlowEnvironment-based deployments, staging → production gatingfeature → main → staging → production (branch per env)Environment isolation, easy rollbackDuplicate merge overhead per envUse when environments need different merge cadences. Pair with CI/CD environment protection.

Default recommendation: GitHub Flow for simplicity. Trunk-based if CI/CD is mature and deploying multiple times/day.

Error Handling

ScenarioCauseFix
Rebase conflictsMultiple people changed same linesResolve conflicts, git rebase --continue. See conflict resolution workflow below.
Can't push (non-fast-forward)Branch behind baseRebase on base first
Accidental commit on wrong branchCareless checkoutCherry-pick to correct branch, reset original
Detached HEADAccidentally checked out a commitgit switch -c <new-branch>
Lost commits after resetgit reset --hardgit reflog → find SHA → git cherry-pick

Rebase conflict resolution

# During rebase, conflict arises
git status                          # See conflicted files
# Edit conflicted files → resolve markers (<<<<<<, ======, >>>>>>)
git add <resolved-files>
git rebase --continue               # Move to next commit

# If the rebase is going poorly and you want to bail:
git rebase --abort                  # Return to pre-rebase state

# If you're mid-rebase, unsure, and want to compare:
git diff                            # Show conflict diff
git mergetool                       # Launch configured merge tool (VS Code: code --wait $MERGED)

# Skip a problematic commit entirely:
git rebase --skip

# After rebase, verify history:
git log --oneline --graph -20

Conflict avoidance:

  • Keep branches short-lived (< 3 days). Longer branches accumulate merge debt.
  • Pull/rebase daily from main during long features: git fetch origin && git rebase origin/main
  • Break large features into stacked PRs (PR 1 → PR 2 → PR 3) instead of one 1000-line PR
  • Communicate: if you're refactoring a shared module, tell the team

Parallel work with git worktree

Use git worktree to work on multiple branches simultaneously without stashing or cloning:

# Create a new worktree for a feature
git worktree add ../project-feat-auth feat/add-user-auth

# List all worktrees
git worktree list

# Remove a worktree after branch is merged
git worktree remove ../project-feat-auth
# Then delete the branch normally

When to use:

  • Hotfix needs to go out while you're mid-feature on another branch
  • Running CI/lint/tests in one worktree while coding in another
  • Reviewing a PR branch without switching away from your current work
  • Exploring an old commit without detaching HEAD

Branch Protection Rules

RuleGitHub settingWhy
Require PR before mergerequired_pull_request_reviewsPrevents direct pushes
Require status checksrequired_status_checksCI must pass
Require linear historyrequired_linear_historyNo merge commits
Require signed commitsrequired_signaturesVerify authorship
Dismiss stale reviewsdismiss_stale_reviewsNew pushes need re-review

Production Checklist

  • Branch named with conventional prefix
  • Commit message follows conventional commits
  • One logical change per commit
  • PR description explains what + why + how to test
  • PR under 400 lines changed
  • CI passes (lint, typecheck, tests)
  • At least 1 reviewer approved
  • Branch deleted after merge
  • No WIP commits in history

Anti-Patterns

Anti-patternFix
git commit -m "fix bug"Conventional commit with context
1000+ line PRsBreak into smaller, atomic changes
Merging main into feature branchRebase instead (cleaner history)
Committing directly to mainBranch + PR + review always
No CI before mergeBlock merging without passing checks
Pushing to main without PRUse branch protection rules
Stale branches (older than 2 weeks)Clean up regularly

Sources

  • Conventional Commits (conventionalcommits.org)
  • GitHub Flow (docs.github.com)
  • Trunk-Based Development (trunkbaseddevelopment.com)
  • Git SCM docs (git-scm.com)
  • Keep a Changelog (keepachangelog.com)
  • Semantic Versioning (semver.org)

Checklist

  • Skill loads without errors in the AI agent
  • YAML frontmatter is valid (description, compatibility, audience)
  • Workflow section provides clear step-by-step instructions
  • Error handling section covers common failure modes
  • All referenced files (references/, scripts/, assets/) exist
  • Skill triggers correctly for intended use cases
  • No broken links or missing resources

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Apply professional, premium UI/UX design standards when building or styling web interfaces. Use this skill when the user asks to create a website, landing page, web app, dashboard, UI component, or any visual interface — or when they ask to make something look better, more professional, or more beautiful. Covers visual hierarchy, typography, color systems, layout, spacing, motion, dark mode, responsive design, and conversion patterns. Activate even when the user doesn't say "design" — if they're building a web frontend, these standards apply.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Run 150+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

api-forge

無料

Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency. Use when user asks to design an API, create endpoints, define REST/GraphQL schema, or generate OpenAPI spec. Do NOT use for database schema design, frontend API integration, or non-HTTP protocols (gRPC, WebSocket, MQTT).

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Implement authentication and authorization with OWASP Top 10 standards, OAuth 2.0 + OIDC, WebAuthn/Passkeys, session management, and RBAC/ABAC. Use when user asks to implement login, signup, authentication, authorization, JWT, OAuth, SSO, passkeys, MFA, or role-based access. Do NOT use for API key management (use api-forge), encryption at rest, or network-level security (firewalls, WAF).

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Generate brand guidelines, design systems with design tokens (W3C format), creative direction (SCAMPER, Design Thinking, TRIZ), and design briefs with scope and success criteria.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

EliasOulkadi のスキルをすべて見る

このスキルの問題を報告する