بنقرة واحدة
github-pr
Create a GitHub branch, commit changes to it, and open a pull request
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create a GitHub branch, commit changes to it, and open a pull request
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Evaluate workflow run quality by analyzing artifacts and scratch outputs, identify gaps and root causes, and write a structured assessment with actionable recommendations.
Write an Architecture Decision Record (ADR) for a technical decision
Diagnose a bug, identify root cause, implement a targeted fix, and verify it
Analyze requirements and produce a detailed implementation plan before writing code
Explore a newly-loaded workspace, map its structure, and write project notes to memory
Restructure code without changing external behavior — extract, rename, split, move
| name | github-pr |
| description | Create a GitHub branch, commit changes to it, and open a pull request |
Create a feature branch, push changes to it, and open a pull request — using context.github.
context.github must be non-null. Check first:
if (!context.github) {
context.emit({ type: 'done', message: 'No GitHub connection — set GITHUB_TOKEN and GITHUB_REPO' });
return;
}
Use kebab-case, prefixed by type: feat/, fix/, chore/, docs/.
const branchName = 'feat/add-notification-service';
context.emit({ type: 'progress', message: `Creating branch ${branchName}...` });
await context.github.createBranch(branchName);
// createBranch(name, fromRef?) — fromRef defaults to context.github.ref
All files under /src/ are committed to GitHub when you call context.commit(msg, branch).
context.vfs.write('/src/services/notifications.js', '// ...content...');
context.emit({ type: 'file_write', path: '/src/services/notifications.js' });
context.emit({ type: 'progress', message: 'Committing to branch...' });
await context.commit('feat: add notification service', branchName);
context.emit({ type: 'progress', message: 'Opening pull request...' });
const pr = await context.github.createPR({
title: 'feat: add notification service',
body: [
'## Summary',
'- Adds EmailNotificationService and SMSNotificationService',
'- Follows existing INotificationService interface',
'',
'## Test plan',
'- [ ] Unit tests pass',
'- [ ] Integration test with real SMTP',
].join('\n'),
head: branchName,
base: 'main', // or context.github.ref
});
context.emit({ type: 'result', value: { pr_url: pr.html_url, pr_number: pr.number } });
context.emit({ type: 'done', message: `PR #${pr.number} opened: ${pr.html_url}` });
createBranch throws if the branch already exists (422) — check with context.github.getLatestSha(branchName) first, catch and continue if it existscreatePR throws 404 if the branch has no commits — ensure context.commit pushed at least one filerepo or public_repo scope for PR creationconst openPRs = await context.github.listPRs('open');
const existing = openPRs.find(pr => pr.head === branchName);
if (existing) {
context.emit({ type: 'result', value: { pr_url: existing.html_url, pr_number: existing.number } });
context.emit({ type: 'done', message: `PR already exists: #${existing.number}` });
return;
}