Skip to content

Commit 1d3b7e5

Browse files
committed
update skill
1 parent a50ff91 commit 1d3b7e5

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

.claude/skills/port-pr/SKILL.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
11
---
22
name: port-pr
3-
description: Port PRs or commits from another repository. Use when you need to bring changes from a source repo. Invoke with /port-pr <commit-or-pr> <source-repo-path>
4-
argument-hint: <commit-or-pr> <source-repo-path>
3+
description: Port PRs from a GitHub repository. Use when you need to bring changes from a source repo. Invoke with /port-pr <github-pr-url>
4+
argument-hint: <github-pr-url>
55
disable-model-invocation: true
66
---
77

88
# Port PR Skill
99

10-
This skill enables porting PRs/commits from another repository into this repository.
10+
This skill enables porting PRs from a GitHub repository into this repository.
1111

1212
## Required Inputs
1313

1414
This skill receives arguments via `$ARGUMENTS`:
15-
- `$0` or `$ARGUMENTS[0]`: Commit reference (hash or PR URL)
16-
- `$1` or `$ARGUMENTS[1]`: Source repo path
1715

18-
## Workflow
16+
- `$ARGUMENTS`: GitHub PR URL (e.g., `https://github.com/owner/repo/pull/123`)
1917

20-
### 1. Extract Commit Information
18+
## Workflow
2119

22-
**For commit hash:**
23-
```bash
24-
git diff <commit>^..<commit>
25-
git log -1 --format="%s%n%n%b" <commit>
26-
```
20+
### 1. Extract PR Information
2721

28-
**For PR URL:**
2922
```bash
30-
gh pr view <url> --json mergeCommit,title,body
23+
gh pr view <url> --json mergeCommit,title,body,headRepository
3124
git diff <mergeCommit>^..<mergeCommit>
3225
```
3326

@@ -48,6 +41,7 @@ Run these commands in the source repository using `workdir` parameter.
4841
### 4. Ask for Guidance
4942

5043
Before implementing, ask the user for clarification when:
44+
5145
- A file doesn't exist in the target repo
5246
- The code structure differs significantly between repos
5347
- The feature/change may not apply to this repository
@@ -56,6 +50,7 @@ Before implementing, ask the user for clarification when:
5650
### 5. Implement Changes
5751

5852
Apply similar changes following this repository's conventions:
53+
5954
- Follow AGENTS.md guidelines (formatting, imports, naming)
6055
- Maintain consistent code style with surrounding code
6156
- Use explicit file extensions (`.js`) for local imports
@@ -64,6 +59,7 @@ Apply similar changes following this repository's conventions:
6459
### 6. Verification
6560

6661
After implementation, run:
62+
6763
```bash
6864
pnpm code:checks
6965
```
@@ -73,7 +69,8 @@ This runs formatting, linting, and TypeScript checks.
7369
### 7. Summary
7470

7571
Provide a summary of:
72+
7673
- What was ported
7774
- Any adaptations made
7875
- Files modified/created
79-
- Any remaining TODOs or follow-up items
76+
- Any remaining TODOs or follow-up items

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ Before committing, ensure:
162162
3. `pnpm ts:check` - TypeScript compiles without errors
163163
4. `pnpm test` - All tests pass
164164

165-
Run `pnpm code:checks` to verify all checks pass.
165+
Run `pnpm code:checks` to verify all checks pass.

0 commit comments

Comments
 (0)