본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

pr

현재 브랜치에서 풀 리퀘스트를 만들고, 서버 계약에 의존하는 변경은 하위 계층이 먼저 병합되도록 여러 요청으로 나눕니다. 의존 순서, 요청 설명, 인수 확인 링크와 검증 절차를 정리합니다.

원문원문 설명 보기

Create a PR for the current branch (targets `canary` by default), including splitting one cross-layer branch into ordered stacked PRs so a lower layer (db / shared package / server TRPC) merges before its callers (desktop / CLI / UI). Use when the user asks to create / submit a PR, or to split a branch because clients call a server contract that isn't on the trunk yet. Triggers on 'pr', 'create pr', 'submit pr', 'open a PR', 'pull request', 'split this PR', 'stacked PR', 'backend should merge first', '提 PR', '提个 PR', '新建 PR', '拆 PR', '后端先合', '分层合并'.

lobehub/lobehub스타 83,502(GitHub 83,502 + cccskills 0)
연동 도구GitHub

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • 현재 브랜치에서 풀 리퀘스트 생성
  • 서버와 클라이언트 변경을 순서대로 분리
  • 요청 의존성과 병합 순서 정리
  • 인수 확인을 요청에 연결

한국어 소개

할 수 있는 일

이 가이드는 현재 브랜치의 변경 사항과 기존 풀 리퀘스트를 확인하고, 필요할 때 새 요청을 만드는 절차를 안내합니다. 기본 대상 브랜치는 canary입니다. 데이터베이스, 공유 패키지, 서버 API 계약과 이를 호출하는 데스크톱, 명령줄 도구, UI 변경이 한 브랜치에 함께 있으면 하위 계층이 먼저 병합되도록 여러 요청으로 나눕니다. 각 요청이 독립적으로 빌드되고 동작할 수 있는지 판단하고, 관련 이슈와 인수 확인 링크를 연결하며 프로젝트 템플릿에 맞는 설명을 작성하는 방법도 다룹니다.

이럴 때 유용합니다

브랜치 변경 사항을 검토받으려 제출할 때 사용할 수 있습니다. 클라이언트가 아직 대상 브랜치에 없는 백엔드 계약을 기준으로 구현된 경우에도 적합합니다. 여러 요청의 의존 순서를 유지하고 각 요청이 담당하는 계층과 관련 이슈를 명확히 할 때도 도움이 됩니다.

사용 예시

  • “현재 브랜치에서 대상이 canary인 풀 리퀘스트를 만들어 주세요.”
  • “이 변경을 서버 쪽과 클라이언트 쪽 요청으로 의존 순서에 맞춰 나눠 주세요.”
  • “풀 리퀘스트 설명에 넣을 변경 요약과 인수 확인 항목을 정리해 주세요.”

주의 사항

풀 리퀘스트를 만들려면 GitHub CLI(gh)와 인증된 환경이 필요합니다. 절차에 따라 인수 확인의 공개 링크를 요청할 수 있습니다. 요청 본문은 영어로 작성하며 운영 데이터에서 가져온 식별자나 사용자 정보를 포함하지 않도록 정합니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

문서 점검

AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.

안전성전송·삭제·명령 실행 등을 명시하고 있는가
B일부 부족브랜치를 푸시하고 요청을 공개하며 운영 데이터와 공개 내용에 관한 제한을 설명합니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족GitHub CLI, 인증, 인수 확인 게시 환경이 필요하며 설정 단계는 일부만 있습니다.

점수에는 넣지 않았습니다. 2026년 10월 26일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

포함된 파일(2)

  • SKILL.md12.5 KB
  • agents/openai.yaml43 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Create Pull Request

Branch Strategy

  • Target branch: canary (development branch, cloud production)
  • main is the release branch — never PR directly to main

Steps

1. Gather context (run in parallel)

  • git branch --show-current — current branch name
  • git status --short — uncommitted changes
  • git rev-parse --abbrev-ref @{u} 2>/dev/null — remote tracking status
  • git log --oneline origin/canary..HEAD — unpushed commits
  • gh pr list --head "$(git branch --show-current)" --json number,title,state,url — existing PR
  • git diff --stat --stat-count=20 origin/canary..HEAD — change summary
  • Reuse an existing acceptance link from the task when it covers the delivered behavior. If a lookup is needed, first follow Publish auth preflight, then run publish_lh acceptance run list --json and match on branch. Do not blindly unset API keys: the production credential may exist only in the environment. A lookup never requires creating a new round.

2. Handle uncommitted changes on default branch

If current branch is canary (or main) AND there are uncommitted changes:

  1. Analyze the diff (git diff) to understand the changes
  2. Infer a branch name from the changes, format: <type>/<short-description> (e.g. fix/i18n-cjk-spacing)
  3. Create and switch to the new branch: git checkout -b <branch-name>
  4. Stage relevant files: git add <files> (prefer explicit file paths over git add .)
  5. Commit with a proper gitmoji message
  6. Continue to step 3

If current branch is canary/main but there are NO uncommitted changes and no unpushed commits, abort — nothing to create a PR for.

3. Push if needed

  • No upstream: git push -u origin $(git branch --show-current)
  • Has upstream: git push origin $(git branch --show-current)

4. Search related GitHub issues

  • gh issue list --search "<keywords>" --state all --limit 10
  • Only link issues with matching scope (avoid large umbrella issues)
  • Skip if no matching issue found

5. Acceptance gate

A feature or fix needs a published acceptance round before the PR is opened (AGENTS.md → Acceptance). If step 1 found none for this branch, run the acceptance skill first and come back with its https://app.lobehub.com/acceptance/<id> link. When the delivery was already verified on the real product earlier in the session, that skill's ingest path publishes the existing observations and artifacts directly — no re-run, no re-plan. Pure refactors or tooling changes with no user-visible outcome may skip it — state that in the PR body instead of leaving the line out.

6. Create PR with gh pr create --base canary

  • Title: <gitmoji> <type>(<scope>): <description>
  • Body: based on PR template (.github/PULL_REQUEST_TEMPLATE.md)
  • Obey the AGENT-INSTRUCTIONS HTML comments in that template. Keep them commented out, and do not copy them into the visible description.
  • Link related GitHub issues using magic keywords (Fixes #123, Closes #123)
  • Link Linear issues if applicable (Fixes LOBE-xxx)
  • Put the acceptance link (or the explicit skip reason) under Test in the Summary section.
  • Follow the source-label, privacy, and AI assistance rules in PR Template below when creating or updating a PR. Do not request prompt disclosure or block the normal PR workflow waiting for consent to publish a conversation.
  • Write the body to a temporary file and use --body-file to preserve formatting.

7. Link the PR to its acceptance

An acceptance round published before the PR existed carries no PR, and reusing that round is correct, so nothing else ever tells the acceptance about the PR. Right after gh pr create, record the link through the production publish environment. If step 1 reused a known acceptance and skipped the lookup, publish_lh is not defined yet: run Publish auth preflight now to define and verify it.

publish_lh acceptance link-pr <acceptanceId> "$(gh pr view --json url --jq .url)"

Do this for each PR in a stack; they share one acceptance. Skip it when the PR states that no acceptance is needed. A later round links itself only when its result.json names the PR (pullRequest); a PR inferred from the branch is recorded on the round but never linked. If the installed CLI lacks link-pr, or the server rejects it as unknown, mention that in the reply instead of retrying.

8. Open in browser

gh pr view --web

PR Template

Use .github/PULL_REQUEST_TEMPLATE.md as the source of truth for body structure, contribution classification, disclosure eligibility, and required fields. Follow its AGENT-INSTRUCTIONS when filling these sections:

  • Summary: fill for every PR, including the required Contribution source label. AI-assisted work remains labeled AI-assisted even when organization membership exempts the author from disclosing details; human review does not make it human-only. Use Unknown when the source cannot be established.
  • AI assistance: apply the template's organization-member exemption to details only, never to the source label. When required, fill its six fields using the final diff and verification evidence, not private conversation summaries. Use one section per PR, combining tools/models across sessions; report unknown metadata and unperformed review/checks honestly.

Prompts and transcripts are private by default and are not required fields. Only if the author explicitly requests sharing them, review the exact proposed text for sensitive information and obtain confirmation before publishing that text. Authorization to create or update a PR is not consent to publish a conversation. Check attached logs and screenshots for sensitive information too.

No production data identifiers

PR titles, bodies, comments and review replies are public. Never put an identifier or detail taken from production data in them, even when that is where the bug was found:

  • Record ids: topic (tpc_…), message (msg_…), operation (op_…), agent (agt_…), document (docs_…), user, device and bot ids. This includes agent vent ids and ids of internal reproduction reports.
  • User details: device or host names, local paths, file names, quoted user text, and app links to a user's agent or topic.

Describe the evidence instead: "observed in a production topic", "a user with two desktops (device A and device B)". Obvious placeholders (tpc_xxx, C:\Users\user) are fine in examples. Commit hashes, deployment ids and code identifiers are not production data. The same rule applies to commit messages and code comments.

Notes

  • Language: All PR content must be in English
  • If a PR already exists for the branch, inform the user instead of creating a duplicate

Stacked PRs (cross-layer feature)

The steps above create one PR for the current branch. When a single branch lands across layers — packages/database schema/model → a shared packages/* lib → src/server TRPC → apps/desktop + apps/cli callers → src/features UI — shipping it as one PR can't merge safely: the clients call an endpoint that doesn't exist on the trunk until the same PR merges, so any partial/rollback or independent review breaks. Split it into ordered PRs, lower layer first.

The ordering rule

A PR may only merge after every layer it calls is already on the trunk.

  • The server contract (new TRPC procedure, changed return shape, new table/model) merges first.
  • The callers (desktop, CLI, UI) merge after — they invoke that contract.
  • Tie-break with one question: "if this merged alone to canary right now, would it build and behave?" If no, it belongs in a later PR.

Which file goes in which PR

The non-obvious calls:

  • Frontend that adapts to a contract change goes WITH the server PR. If you widen a TRPC return shape (e.g. listDevices now returns platform: string | null), the component consuming it must change in the same PR — otherwise the server PR breaks the build on its own. Contract + its in-repo consumers ship together.
  • A new shared package goes with its consumer, not the server, unless the server imports it too. A @lobechat/* package imported only by desktop/CLI ships in the client PR. Don't carry an unused package in the lower PR.
  • Workspace dep declarations (package.json workspace:*, pnpm-workspace.yaml) travel with the code that imports the package.

The git recipe — split an existing full branch

Starting point: one branch (feat/x) with a single commit <FULL> containing everything, already pushed (so it's also safe on the remote).

# 1. Safety nets — make the full work unloseable before rewriting anything
git branch backup/x-full <FULL>          # local ref to the full commit
git branch feat/x-clients <FULL>         # the higher-layer branch starts here

# 2. Rewrite the lower-layer branch to lower-layer files only
git checkout feat/x                      # this becomes the SERVER PR
git reset --hard origin/canary
git checkout <FULL> -- <server/db files…>   # stages just those paths
git commit -m "✨ feat(...): <server half>"
git push --force-with-lease origin feat/x   # never --force; never push to canary

# 3. Build the higher-layer branch STACKED on the lower branch
git checkout feat/x-clients
git reset --hard feat/x                  # base = the just-rewritten server HEAD
git checkout backup/x-full -- <client/ui files…>   # only the remaining paths
git commit -m "✨ feat(...): <client half>"
git push -u origin feat/x-clients

Then open the higher PR based on the lower branch, not the trunk:

gh pr create --base feat/x --head feat/x-clients --title "…" --body "…"

--base feat/x keeps the diff client-only (no server files leak in) and makes it physically impossible to merge the clients before the server. After the server PR merges to canary, retarget the client PR's base to canary (GitHub usually auto-retargets when the base branch merges; note it in the PR body so a human confirms).

Verify the dependency actually holds

The whole point is the higher layer needs the lower one. Prove it: on the stacked higher branch, type-check the caller and confirm the symbol the lower layer introduced resolves.

cd apps/cli && bun run type-check 2>&1 | grep -iE "connect\.ts|device\.register"
# empty (re: your change) = the stacked base supplies device.register ✓

Filter to your touched files — this repo's standalone type-check emits pre-existing env noise (__ELECTRON__, @/types/llm, unbuilt @lobechat/types) that isn't yours.

PR + Linear bookkeeping

  • Each PR closes only its own layer's issues. Server PR: Closes LOBE-<server>. Client PR: Closes LOBE-<pkg> / <desktop> / <cli>. Don't let one PR's body claim another layer's issue.
  • Both PRs are Part of LOBE-<parent>.
  • On PR creation, move each closed sub-issue to In Review (not Done) and add a completion comment — see the linear skill.

Gotchas

  • Never push to canary. A split branch cut with git checkout -b feat/x origin/canary tracks origin/canary, so a bare git push targets canary. Always git push origin feat/x with the explicit branch name.
  • --force-with-lease, not --force when rewriting the lower branch — it aborts if the remote moved under you.
  • Back up before reset --hard. Step 1's backup/x-full + the pushed remote branch mean the full commit is referenced by ≥3 refs before you rewrite anything. Verify with git branch --contains <FULL>.
  • Lockfiles: this monorepo commits no root pnpm-lock.yaml, so a new workspace:* dep needs no lockfile churn. In a repo that does commit one, regenerate it on each branch after the split.
  • Don't over-split. Two PRs (contract / callers) is usually enough. A UI page that only reads an existing endpoint can be its own later PR, but don't fragment a single layer across PRs for its own sake.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

acceptance

무료요약 있음

실제 제품을 적절한 조작 환경에서 실행해 변경 사항을 검증하고, 사용자가 확인할 수 있는 증거를 모아 인수 보고서로 게시합니다. 기존 검증 계획을 확인하거나 점검 항목을 만들고, `lh` CLI로 결과를 게시할 수 있습니다.

  • 변경된 제품 동작을 실제로 확인하기
  • 스크린샷 등 검증 증거 수집하기
  • 검증 계획과 보고서 작성하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

add-model-provider

무료요약 있음

LobeHub에 AI 모델 제공자를 추가하는 과정을 안내합니다. 런타임 연동, 모델 정보와 설정, 브랜드 표시, 문서화 및 인수 확인을 다루며, 기존 제공자에 모델만 추가하는 경우와 새 연동이 필요한 경우를 구분합니다.

  • LobeHub에 새 AI 모델 제공자 추가하기
  • 제공자의 설정 안내나 설명 갱신하기
  • 모델 추가에 새 제공자 연동이 필요한지 판단하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

add-setting-env

무료요약 있음

서버 환경 변수로 사용자 설정의 기본값을 지정하도록 구현하는 절차를 안내합니다. 변수 검증, 서버 설정 구성, 사용자 저장소 반영부터 예시 환경 파일과 셀프 호스팅 문서 갱신까지 다룹니다.

  • 환경 변수로 사용자 설정 기본값 지정
  • 설정을 서버 구성과 사용자 저장소에 연결
  • 환경 변수 예시와 문서 갱신
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-runtime-hooks

무료요약 있음

에이전트 실행 단계, 도구 호출, 사람의 승인, 컨텍스트 압축, 하위 에이전트 호출에 훅을 등록하는 방법을 안내합니다. 이벤트를 관찰하고 로컬 도구 결과를 모의하거나 설정에 따라 웹훅으로 도구 호출을 허용 또는 거부할 수 있습니다.

  • 에이전트 단계와 오류 기록
  • 테스트 중 도구 결과 모의
  • 웹훅으로 도구 호출 허용 또는 거부
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-signal

무료요약 있음

에이전트의 이벤트 기반 백그라운드 작업을 설계하고 구현하도록 돕습니다. 소스, 시그널, 액션, 정책의 역할을 나누고 비동기 처리, 중복 실행 방지, 완료 기록과 관측 기능을 다룹니다.

  • 이벤트로 시작되는 백그라운드 작업 추가
  • 대화 요청과 작업을 분리
  • 액션의 중복 실행 방지
lobehub/lobehub8.4만2026년 10월 26일 업데이트

agent-testing-bot

무료요약 있음

실제 데스크톱 채팅 앱에서 봇 채널의 인수 테스트를 진행합니다. Discord, Slack, Telegram, WeChat, Lark, QQ에서 메시지를 보내고 응답을 기다린 뒤 결과 화면을 캡처합니다. iMessage는 BlueBubbles 브리지를 사용합니다.

  • 실제 Discord 채널에서 봇 응답 확인하기
  • Slack이나 Telegram 대화 경로 테스트하기
  • macOS 앱의 작업 결과 화면으로 기록하기
lobehub/lobehub8.4만2026년 10월 26일 업데이트

lobehub의 스킬 모두 보기

이 스킬의 문제 신고