These are VSCode user snippets that generate detailed prompts for GitHub Copilot Chat to handle git workflows and PR creation.
- Open VSCode
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type "Preferences: Configure User Snippets"
- Select "New Global Snippets file..."
- Name it
feature-workflow.code-snippets
Copy and paste this entire JSON content into the file:
{
"Feature Start": {
"prefix": "featurestart",
"body": [
"@workspace I need to start work on a new feature branch. Please:",
"",
"1. **Check for uncommitted changes:**",
" - Run `git status`",
" - If changes exist, ask me: 'You have uncommitted changes. Would you like to: 1) Stash them, 2) Commit them, or 3) Cancel?'",
" - Handle according to my choice",
"",
"2. **Create feature branch:**",
" - Branch name: `$1`",
" - Run: `git checkout -b $1`",
"",
"3. **Set up conventional commits:**",
" - Use branch name or ask for ticket/feature prefix",
" - Inform me about commit format for this feature",
"",
"Prerequisites: git must be available"
],
"description": "Start feature development workflow"
},
"Feature Done": {
"prefix": "featuredone",
"body": [
"@workspace I need to complete this feature and create a PR. Please:",
"",
"1. **Commit final changes:**",
" - Run `git status` to check for uncommitted changes",
" - If changes exist, create a final commit using conventional format",
" - Use appropriate commit type (feat/fix/refactor/etc)",
"",
"2. **Push to origin:**",
" - Ask me: 'Ready to push all commits to origin?'",
" - If yes: `git push -u origin $(git branch --show-current)`",
"",
"3. **Create Pull Request:**",
" - Get current branch name",
" - Create PR using gh CLI with:",
" - Title: Use conventional commit format with branch/feature summary",
" - Body with sections for:",
" - Summary of changes",
" - Changes made (bullet points)",
" - Dependencies (if any)",
" - Testing instructions",
" - Basic checklist",
"",
"Prerequisites: gh CLI must be installed and authenticated"
],
"description": "Complete feature and create PR"
},
"Conventional Commit": {
"prefix": "commit",
"body": [
"@workspace I need to make a conventional commit. Please:",
"",
"1. **Analyze changes:**",
" - Run `git status` and `git diff --staged`",
" - If no staged changes, run `git diff`",
" - Summarize what was changed",
"",
"2. **Determine commit type:**",
" - feat: New feature",
" - fix: Bug fix",
" - docs: Documentation only",
" - style: Formatting, no logic changes",
" - refactor: Code restructuring",
" - test: Adding tests",
" - chore: Maintenance tasks",
"",
"3. **Get scope (optional):**",
" - Extract from branch name if available",
" - Or ask me for feature/component scope",
"",
"4. **Create commit:**",
" - Stage changes if needed: `git add -A`",
" - Format: `type(scope): concise summary`",
" - Execute: `git commit -m 'message'`",
" - Do NOT mention AI assistance",
" - Do NOT push unless I request it",
"",
"5. **Confirm:**",
" - Show: `git log -1 --oneline`"
],
"description": "Create conventional commit"
},
"Quick Branch": {
"prefix": "branch",
"body": [
"@workspace Create a new git branch named '$1' and switch to it. Please:",
"",
"1. Check for uncommitted changes first",
"2. If clean, run: `git checkout -b $1`",
"3. Confirm the new branch: `git branch --show-current`"
],
"description": "Create and switch to new branch"
},
"PR Template": {
"prefix": "prtemplate",
"body": [
"## Summary",
"$1",
"",
"## Changes Made",
"- $2",
"",
"## Dependencies",
"- None / List any dependent PRs",
"",
"## Testing",
"- $3",
"",
"## Checklist",
"- [ ] Tests pass",
"- [ ] Code reviewed",
"- [ ] Documentation updated"
],
"description": "PR description template"
}
}- Save the file (
Cmd+SorCtrl+S) - Restart VSCode or reload the window
-
featurestart+ Tab- Creates a prompt for Copilot to start a new feature
- You can add a branch name:
featurestartthen type your branch name
-
featuredone+ Tab- Creates a prompt to complete the feature and create a PR
-
commit+ Tab- Creates a prompt for making a conventional commit
-
branch+ Tab- Quick branch creation prompt
- You can specify the branch name
-
prtemplate+ Tab- Generates a PR description template
- Has placeholder fields you can tab through
- Type
featurestart+ Tab, add your branch name - Copy the generated text and paste into Copilot Chat
- Make your code changes
- Type
commit+ Tab when ready to commit - Type
featuredone+ Tab when feature is complete
- VSCode with GitHub Copilot extension
- Git installed and configured
- GitHub CLI (
gh) for PR creation - GitHub Copilot Chat extension
- These snippets generate prompts for Copilot Chat - they don't execute commands directly
- You'll need to copy/paste the generated text into Copilot Chat
- Copilot will then execute the git commands and handle the workflow
- All prompts use conventional commit format
- No Jira integration - just git and GitHub workflows
The snippets are saved in:
- macOS/Linux:
~/.config/Code/User/snippets/feature-workflow.code-snippets - Windows:
%APPDATA%/Code/User/snippets/feature-workflow.code-snippets
To share with others: Give them this gist URL and tell them to follow the installation instructions for VSCode Copilot integration.