Github Pr.Create Child
БесплатноБез исполняемых скриптовНе проверенWrite instructions to build a child PR from a branch or PR
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
- Given a
<SRC>Git branch, write instructions to build a child PR on a new<DST>branch
Workflow
Resolve the Input
- An argument in the form
PR<PLAN_NUM>(e.g.,PR2) selects a PR of the split plan<SPLIT_PREFIX>.md(see## Select the Content of the Child PR)- The plan is written by
.claude/skills/github_pr.split_branch/SKILL.md
- The plan is written by
- Resolve the other argument following
.claude/skills/github_pr.rules.md## Resolve the PR Argument- A PR is not needed
<SRC>is<BRANCH_NAME>
- Get the code following
.claude/skills/github_pr.rules.md## Get the Local Code of the PR
Select the Content of the Child PR
<INPUT_REF>is<SRC>, as in.claude/skills/skill.rules.md### Name the Output File<PREFIX>isgithub_pr.create_child.<INPUT_REF><SPLIT_PREFIX>isgithub_pr.split_branch.<INPUT_REF>- All the files are in the current dir
- If
<SPLIT_PREFIX>.mdexists- Use the PR
PR<PLAN_NUM> - Without
PR<PLAN_NUM>, use the first PR of the plan that is not under## Merged/Done, and tell the user which one
- Use the PR
- If
<SPLIT_PREFIX>.mddoes not exist, ask the user which files go in the child PR- If the user passed
PR<PLAN_NUM>, say that the plan is missing
- If the user passed
- Set
<FILES_TXT>, the list of the files of the child PR- If
<SPLIT_PREFIX>.pr<PLAN_NUM>.files.txtexists, use it and do not rewrite it - Otherwise, create
<PREFIX>.files.txtwith one file per line - For a renamed file,
<FILES_TXT>must list both the old and the new path; if one is missing, tell the user
- If
- Set
<PYTEST_SH>, the script with the tests that check the behavior of the PR- If
<SPLIT_PREFIX>.pr<PLAN_NUM>.pytest.shexists, use it and do not rewrite it - Otherwise, create
<PREFIX>.pytest.shand make it executable
- If
Find the Next Branch Name
- Find which branch name is next available:
> i git_branch_next_name Found highest number '3' in all branches, next is '4' branch_next_name='HelpersTask1273_Get_Mac_tests_to_pass_4'
Create the Files
- Create
<PREFIX>.title.txtwith the title of the PR on one line- Use plain text, without backticks or
$, since the shell reads the title
- Use plain text, without backticks or
- Create
<PREFIX>.commit_msg.txtwith the title, an empty line, and the description of what the PR does- Start from the description of the PR in
<SPLIT_PREFIX>.md, if any
- Start from the description of the PR in
- Create
<PREFIX>.merge.txtwith the instructions to build the child PR- Follow the phases in
## Example - Replace
<FILES_TXT>and<PYTEST_SH>with the actual file names - Add a comment for each phase, and make sure each command is correct
- Follow the phases in
- In
<PREFIX>.merge.txtand<PREFIX>.pytest.sh, state how they were generated, with this comment at the top of each file (after the shebang, if any):# Generated by `.claude/skills/github_pr.create_child/SKILL.md`
Example
- Example of
<PREFIX>.merge.txtforPR2, where<FILES_TXT>and<PYTEST_SH>come from the split plan# Set the variables. > export SRC_BRANCH=HelpersTask1273_Get_Mac_tests_to_pass > export DST_BRANCH=HelpersTask1273_Get_Mac_tests_to_pass_4 > export PREFIX=github_pr.create_child.$SRC_BRANCH > export PR2=github_pr.split_branch.$SRC_BRANCH.pr2 > export FILES=$(cat $PR2.files.txt) # Create the branch from `origin/master`, without a draft PR. > i git_branch_create --branch-name $DST_BRANCH --no-create-pr # Copy the files from the source branch and stage them. # `$SRC_BRANCH` must include `origin/master`, or the copy reverts newer changes. > git_sync_between_branches.sh --src_branch $SRC_BRANCH --dst_branch $DST_BRANCH --files "$FILES" # Check that only the expected changes are staged. > git diff --cached --stat # Commit. > git commit -F $PREFIX.commit_msg.txt # Run the tests, in the container and outside. > export CSFY_DOCKER_ENGINE="docker"; i docker_cmd --stage=local -v 1.6.0 --cmd "./$PR2.pytest.sh 2>&1 | tee build1.txt" > export CSFY_DOCKER_ENGINE="docker"; ./$PR2.pytest.sh 2>&1 | tee build2.txt > export CSFY_DOCKER_ENGINE="apple"; ./$PR2.pytest.sh 2>&1 | tee build3.txt # Push, create the PR, and watch the CI. > git push > i gh_create_pr --no-draft --title "$(cat $PREFIX.title.txt)" --body "$(cat $PREFIX.commit_msg.txt)" > i gh_watch - If the files come from another Git client instead of a branch, replace the copy
phase with this one
# Copy only the listed files from another Git client. > export SRC_DIR=/Users/saggese/src/csfy1/helpers_root > export DST_DIR=/Users/saggese/src/notes1/helpers_root > diff_to_vimdiff.py --dir1 $SRC_DIR --dir2 $DST_DIR > copy_across_clients.py --dir1 $SRC_DIR --dir2 $DST_DIR --from_file $SRC_DIR/$PR2.files.txt > cp $SRC_DIR/$PREFIX.* $SRC_DIR/$PR2.pytest.sh $DST_DIR/ > cd $DST_DIR > git add $FILES
Verification
- The output files are in the current dir and start with
github_pr.create_child.<INPUT_REF>
Установить Github Pr.Create Child в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Github Pr.Create Child?
Write instructions to build a child PR from a branch or PR
Как установить скилл Github Pr.Create Child?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Github Pr.Create Child запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic