You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/services/command/built-in-commands.ts
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -284,6 +284,62 @@ Please analyze this codebase and create an AGENTS.md file containing:
284
284
285
285
Remember: The goal is to create documentation that enables AI assistants to be immediately productive in this codebase, focusing on project-specific knowledge that isn't obvious from the code structure alone.`,
286
286
},
287
+
create_pr: {
288
+
name: "create-pr",
289
+
description: "Create a GitHub pull request from current branch",
290
+
content: `<task>
291
+
Stage and commit any outstanding changes, then review the changes made in this branch versus main/master and create a pull request using the gh CLI.
292
+
</task>
293
+
294
+
<instructions>
295
+
1. Check if there are any unstaged/uncommitted changes:
296
+
- Run: git status
297
+
- If changes exist, stage and commit them with a descriptive message
298
+
299
+
2. Identify the base branch (main or master):
300
+
- Check which exists: git branch --list main master
301
+
- Use the one that exists as base branch
302
+
303
+
3. Get current branch name:
304
+
- Run: git branch --show-current
305
+
306
+
4. Analyze all changes between current branch and base:
307
+
- Run: git diff <base-branch>...HEAD
308
+
- Also get commit messages: git log <base-branch>..HEAD --oneline
309
+
310
+
5. Generate PR title and description:
311
+
- Analyze the diff and commit messages
312
+
- Create concise, descriptive title (50 chars max)
313
+
- Write clear PR description explaining:
314
+
* What changed and why
315
+
* Key implementation details
316
+
* Any breaking changes or important notes
317
+
318
+
6. Get repository info:
319
+
- Extract from: git remote get-url origin
320
+
- Parse to get org/repo format
321
+
322
+
7. Check if gh CLI is installed:
323
+
- Run: gh --version
324
+
- If not found, guide user to install:
325
+
* macOS: brew install gh
326
+
* Windows: winget install GitHub.cli
327
+
* Linux: See https://github.com/cli/cli#installation
0 commit comments