home / skills / codyswanngt / lisa / git-submit-pr
This skill pushes the current branch, creates or updates a pull request with a full description, and enables auto-merge for faster review.
npx playbooks add skill codyswanngt/lisa --skill git-submit-prReview the files below or copy the command above to add this skill to your agents.
---
name: git-submit-pr
description: This skill should be used when pushing changes and creating or updating a pull request. It verifies the branch state, pushes to remote, creates or updates a PR with a comprehensive description, and enables auto-merge.
allowed-tools: ["Bash", "mcp__github__create_pull_request", "mcp__github__get_pull_request", "mcp__github__update_pull_request"]
---
# Submit Pull Request Workflow
Push current branch and create or update a pull request. Optional hint: $ARGUMENTS
## Workflow
### Check current state
!git status
!git log --oneline -10
### Apply these requirements
1. **Branch Check**: Verify not on `dev`, `staging`, or `main` (cannot create PR from protected branches)
2. **Commit Check**: Ensure all changes are committed before pushing
3. **Push**: Push current branch to remote with `-u` flag and the following environment variable - GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5"
4. **PR Management**:
- Check for existing PR on this branch
- If exists: Update description with latest changes
- If not: Create PR with comprehensive description (not a draft)
5. **Auto-merge**: Enable auto-merge on the PR using `gh pr merge --auto --merge`
### PR Description Format
Include in the PR description:
- **Summary**: Brief overview of changes (1-3 bullet points)
- **Test plan**: How to verify the changes work correctly
### Never
- use `--force` push without explicit user request
- create PR from protected branches (dev, staging, main)
- skip pushing before PR creation
## Execute
Execute the workflow now.
This skill automates pushing a feature branch and creating or updating a pull request with a clear, actionable description. It validates branch and commit state, pushes to the remote with a resilient SSH command, and ensures the PR is configured for auto-merge. The result is a reliable, policy-compliant submit workflow for TypeScript projects using GitHub CLI.
The skill inspects the current git status and recent commits, confirms you are not on protected branches (dev, staging, main), and verifies there are no uncommitted changes. It pushes the current branch to the remote using GIT_SSH_COMMAND to keep SSH connections alive, then checks for an existing PR on that branch. If a PR exists, it updates the description with the latest summary and test plan; if not, it creates a new non-draft PR and enables auto-merge via the GitHub CLI.
What happens if I run this on main or dev?
The skill aborts and instructs you to switch to a non-protected feature branch; PR creation from protected branches is blocked.
Will it force-push my branch?
No. The workflow never uses --force by default; it only supports force push if you explicitly request it.
How does auto-merge get enabled?
After creating or updating the PR, the skill calls gh pr merge --auto --merge to enable auto-merge so the PR merges when all checks and required reviews are satisfied.