gt

Create Graphite stacked PRs from staged git changes. Use when user says "/gt", "create a PR", "submit PR", or wants to commit and create a pull request using Graphite. Optionally accepts a Linear issue ID (e.g., "/gt A-35") to auto-close issues on merge.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gt" with this command: npx skills add wiseiodev/skills/wiseiodev-skills-gt

Analyze staged changes and create a Graphite stacked PR with user confirmation.

Usage: /gt or /gt A-35 (with optional Linear issue ID)

1. Analysis Phase

  1. Check for Linear Issue ID: If user provided an issue ID argument (e.g., A-35):
    • Validate format matches A-\d+ pattern
    • Store for use in commit message and PR description
    • Prepare "Completes [ISSUE_ID]" phrase
  2. Check Prerequisites: Verify git staged changes exist, if not prompt user to stage changes first
  3. Analyze Staged Changes: Use git status, git diff --cached --stat, and git diff --cached to understand:
    • Files modified, added, deleted
    • Lines added/removed
    • Nature of changes (features, fixes, refactoring, etc.)
  4. Review Recent Commits: Check git log --oneline -5 for context and commit message patterns

2. Suggestion Generation

Generate and present to user:

Suggested Branch Name:

[type]/[brief-kebab-case-description]

  • Use conventional prefixes: feat/, fix/, chore/, refactor/, docs/
  • Keep under 50 characters
  • Be descriptive but concise

Suggested Commit Message:

Follow conventional commits format:

[type]([scope]): [description]

[optional body with more details]

[If Linear Issue ID provided: Completes ISSUE_ID]

Suggested PR Description:

Format strictly using this template:

Detailed Summary: [Summary of changes]

Impact Metrics:

  • Files Changed: [Count]
  • Lines Added: [Count]
  • Lines Removed: [Count]

Change Categories:

  • New Feature
  • Bug Fix
  • Refactor
  • Tests
  • Documentation

Testing Instructions: [Instructions]

[If Issue ID provided]: Completes [ISSUE_ID]

3. User Confirmation

Present all suggestions clearly and ask:

Review the suggestions above. Would you like to:
1. Proceed with these suggestions
2. Modify any suggestions (specify which)
3. Cancel the operation

4. Execution Phase (Only after user confirms)

IMPORTANT: Follow these CLI commands exactly. Do not use Graphite MCP server.

  1. Create Graphite Branch & Commit:

    gt create [BRANCH_NAME] -m "[COMMIT_MESSAGE]"
    
  2. Submit Stacked PR (without editing prompts):

    gt ss --no-edit -p
    
  3. Update PR Description via GitHub CLI:

    gh pr edit [PR_NUMBER] --title "[PR_TITLE]" --body "[PR_DESCRIPTION]"
    

    Note: Escape internal double quotes and backticks in the body string.

5. Error Handling

  • If Graphite commands fail, provide clear error messages and suggested fixes
  • Handle common issues: no staged changes, Graphite not initialized, auth problems, branch name exists

6. Success Reporting

## Success Report:

✅ Graphite stacked PR created successfully!

- **Branch:** `[BRANCH_NAME]`
- **Commit:** `[COMMIT_HASH]`
- **PR #[NUMBER]:** [GITHUB_URL]
- **Graphite URL:** [GRAPHITE_URL]
[If Issue ID provided: - **Linear Issue:** [ISSUE_ID]]

**Next steps:**
- Review the PR in GitHub or Graphite
- Request reviewers if needed
- Monitor CI/CD checks

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-principles

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

graphite

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ClawHub CLI Assistant

Use the ClawHub CLI to publish, inspect, version, update, sync, and troubleshoot OpenClaw skills from the terminal.

Registry SourceRecently Updated
21.8K
Profile unavailable