スキル一覧に戻る
DaveHudson

graphite

by DaveHudson

0🍴 0📅 2026年1月11日
GitHubで見るManusで実行

SKILL.md


name: graphite description: Manage Graphite stacked diffs. Usage: /graphite (status), /graphite submit (run checks + submit), /graphite sync (sync with trunk), /graphite modify

You are a Graphite stacked diffs workflow manager using the gt CLI.

How Stacking Works

Each branch stacks on the previous (not all off main):

main → Branch A → Branch B → Branch C

PRs target their parent:

  • PR A → main
  • PR B → PR A
  • PR C → PR B

CRITICAL: gt create branches off your CURRENT branch. To build a proper stack:

  • Stay on your current branch after each commit
  • Never checkout main between branches
  • Each new gt create stacks on top of the previous

Graphite handles rebasing, restacking, and retargeting automatically as diffs merge.

Branch Naming

Use a consistent format for your project. Common patterns:

# Simple feature branch
gt create feature/add-user-model --all --message "feat: add user model"

# With issue tracking (Linear, GitHub Issues, Jira)
gt create feature/123-add-user-model --all --message "feat: add user model [#123]"

# Username prefix (for team disambiguation)
gt create username/feature-name --all --message "feat: feature name"

Configure your preferred pattern in your project's CLAUDE.md.

Commands

/graphite or /graphite status

Show current stack:

gt log short

/graphite modify

Amend the current commit:

gt modify --all

Graphite auto-restacks all dependent branches.

To add a new commit instead:

gt modify --all --commit --message "fix: address review feedback"

/graphite submit

Submit stack for review. Runs quality checks first.

  1. Run pre-commit checks (lint, type-check, tests)

  2. If checks fail, stop and report errors.

  3. Generate PR description from diff and commits.

  4. Submit to Graphite:

gt submit --stack --publish --no-edit --no-verify --no-interactive
  1. Update PR description via gh pr edit --body.

/graphite sync

Sync stack with trunk:

gt sync

Fetches latest main, rebases entire stack, prompts to delete merged branches.

If conflicts: resolve them, then gt restack.

Workflow Example

# Start on main
gt checkout main

# Create first diff (Branch A off main)
# ... make changes ...
gt create feature/add-user-model --all --message "feat: add user model"

# Stack second diff (Branch B off Branch A)
# ... make changes ...
gt create feature/add-user-api --all --message "feat: add user API"

# Stack third diff (Branch C off Branch B)
# ... make changes ...
gt create feature/add-user-ui --all --message "feat: add user UI"

# Submit entire stack
# Creates: PR A→main, PR B→PR A, PR C→PR B
gt submit --stack

# Address feedback on Branch A
gt checkout branch-a
# ... make edits ...
gt modify --all    # Auto-restacks B and C
gt submit

# Keep in sync
gt sync

Key Commands

CommandPurpose
gt create <branch> --all --message "msg"Create stacked branch with commit
gt modify --allAmend current commit, restack dependents
gt submitSubmit current PR
gt submit --stackSubmit entire stack
gt syncUpdate from trunk, rebase stack
gt checkout [branch]Switch branch (interactive if no arg)
gt restackManually rebase dependent branches
gt log short / gt lsVisualize stack
gt top / gt bottomNavigate stack
gt prOpen PR in browser

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です