Логотип Merge Pr

Merge Pr

Спільнота
kdy1
merge-pr

Squash-merge GitHub pull requests immediately or enable auto-merge with the default commit subject when the user explicitly invokes this skill, requests a merge, or authorizes a handoff within that scope.

Огляд

Видавецьkdy1
Репозиторійkdy1-scripts
Назва навичкиmerge-pr
Зірки
33
Форки
0
Файли в пакеті
3
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 3

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: kdy1. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Merge Pr у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/kdy1/kdy1-scripts/tree/main/skills/merge-pr
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kdy1/kdy1-scripts.git /tmp/kdy1-scripts
mkdir -p .claude/skills
cp -r /tmp/kdy1-scripts/skills/merge-pr .claude/skills/merge-pr
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Merge Pr в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Merge Pr, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Merge Pr не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Merge PR

Merge the requested PRs immediately when possible, or enable auto-merge, and verify each result.

Authorization

An explicit user invocation of $merge-pr is a merge request and authorizes merging the targets identified by the user's request or conversation context. This authorization includes enabling auto-merge for those targets when immediate merging is unavailable. The authorized targets include PRs returned by a selection workflow requested in the same message. Do not request confirmation again because the targets came from tool results rather than manually supplied PR numbers.

Automatic skill selection alone does not authorize merging or enabling auto-merge. A request to edit, inspect, or discuss this skill authorizes that work only. A handoff must retain the original human merge authorization and target scope.

Core Rules

  • Always use gh pr merge with --squash. Do not substitute merge commits or rebase merges.
  • Never specify --subject or its short form -t, including an empty value. Leave the commit subject to the default gh and GitHub behavior. Do not override it interactively or through another merge interface.

See the GitHub CLI merge documentation for these options.

Resolve and Merge

Use the requested PR URLs, numbers, or selection criteria with the repository context. Resolve targets from the request and conversation context, including the complete results of a requested selection workflow. Use those targets even when the checkout has a detached HEAD.

Only when the request and conversation context do not identify targets, resolve the current branch's PR with the helper:

sh
node <SKILL_DIR>/scripts/merge-pr.mjs resolve-current

Use the returned url. A lookup failure does not select another target. Ask for a target only when neither source identifies the intended PRs or when the requested scope is genuinely ambiguous. Do not ask for merge authorization again after an explicit invocation. Replace <SKILL_DIR> with this skill's absolute directory when running commands.

For an explicitly authorized workflow handoff with merge gates, honor its narrower constraints: let the caller own readiness checks, pass its verified head through --match-head-commit SHA, and pass --no-auto when auto-merge is forbidden. Either option restricts the helper to one target. Return after the single requested layer. The caller owns dependent-stack progression and stops on failure or any pending/unverified result instead of advancing to an upper PR. These constraints do not change the default direct-invocation behavior below.

Once the target is identified for a direct invocation, attempt the merge immediately. Do not preflight authentication, CI, reviews, draft status, conflicts, squash support, merge queues, or head SHAs. Let GitHub enforce its merge requirements. Do not announce plans to check readiness.

sh
node <SKILL_DIR>/scripts/merge-pr.mjs merge <PR_URL> [<PR_URL>...]

An explicit PR number can replace <PR_URL>; use the repository checkout or pass --repo [HOST/]OWNER/REPO. The helper runs gh pr merge with --squash --auto by default, omits --auto with --no-auto, and never passes a subject, administrator bypass, or branch-deletion option. It accepts no arbitrary gh options. The head option requires a full 40-character SHA. Do not fix source, change PR metadata, submit approvals, or bypass rules to make the merge succeed. Additional actions require applicable human instructions. The two core rules still apply.

For multiple directly requested PRs without dependent-stack handoff constraints, pass them in the requested order, or the supplied list order when no separate order is specified. The helper attempts them sequentially and continues after an individual failure.

Verify and Report

The helper reads the PR through REST after each attempt, even when the merge command fails. It verifies the REST merged, merged_at, merge_commit_sha, and auto_merge fields. A numeric target without --repo retains the current-repository PR lookup before that REST read. Its JSON results preserve the input target, URL, outcome, mergeCommitSha, PR state, merge command exit code and output, and verification output/error.

  • merged: GitHub confirms merged state and a merge commit SHA. Report completion with its URL and SHA.
  • queued: GitHub confirms open state and the CLI explicitly confirms queue registration. Report queued and pending.
  • auto_merge_pending: GitHub confirms open state with non-null autoMergeRequest. Report auto-merge enabled and pending.
  • unverified: State, commit SHA, or the outcome cannot be confirmed. Report the verification error and any known state.

Queue eligibility or a promise to add the PR when ready does not confirm registration. Unknown or suppressed CLI output does not establish a queued result. Pending outcomes are not completed merges. Do not block the attempt because a queue applies or add --admin to bypass it.

Exit code 1 means a merge command failed or a result is unverified; inspect every result even on that exit code. Exit code 0 can include pending outcomes. If the command fails, including when auto-merge is disabled or permissions are insufficient, report the GitHub or CLI error briefly along with any verified outcome. The helper does not retry; do not rerun it automatically or start a merge-readiness investigation. Keep the final report concise.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Merge Pr?

Squash-merge GitHub pull requests immediately or enable auto-merge with the default commit subject when the user explicitly invokes this skill, requests a merge, or authorizes a handoff within that scope.

Навіщо використовувати Merge Pr у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Merge Pr — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Merge Pr у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/kdy1/kdy1-scripts/tree/main/skills/merge-pr. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Merge Pr?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Merge Pr?

Зі скількома забажаєте. У TypingMind ви можете використовувати Merge Pr із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Merge Pr?

На GitHub цю навичку публікує kdy1. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇