원클릭으로
empty-repo-bundle-preflight
Fail fast when the repository has no refs so downstream bundling never triggers empty Git bundles.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fail fast when the repository has no refs so downstream bundling never triggers empty Git bundles.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Collapse multiple change sources into one caller-facing boolean so headless bootstraps know whether a downstream refresh is necessary.
After awaiting persistence work, update the shared budget state for each `tool_use_id` exactly once so no concurrent reader ever sees a half-committed decision.
Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping.
Lazily extract referenced files for bundled skills so large prompts stay offline until needed.
Persist a cache-safe stop-hook context snapshot only for main session queries so later helpers can resume from stable state without fork pollution.
Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails.
| name | empty-repo-bundle-preflight |
| description | Fail fast when the repository has no refs so downstream bundling never triggers empty Git bundles. |
| metadata | {"author":"ychampion"} |
Domain: safety-worktrees
Trigger: Apply before running git bundle create to ensure the repository actually has refs, avoiding the 128 exit code and providing a clearer error path.
Source Pattern: Distilled from reviewed repo-safety, packaging, and worktree-management patterns.
Run git for-each-ref --count=1 refs/ from the repository root; if the output is empty, report that the repo has no commits, record an analytics metric with the empty_repo outcome, and abort with a helpful message instead of invoking git bundle create, which would exit 128 on an empty repo. Sweep stale temporary refs first so the check reflects the true repo state, and treat the empty case as a known failure reason with a dedicated fail reason identifier that consumers can react to.
refs/seed/stash and refs/seed/root before testing for refs so old placeholders cannot make an empty repo appear populated.empty_repo outcome via analytics or logs so you can audit why bundling never ran.empty_repo) so callers can distinguish it from git failures or oversized bundles.When building a git bundle upload helper, call this skill before _bundleWithFallback; if it signals an empty repo, stop and surface “Repository has no commits yet” to the UI and telemetry instead of letting git bundle create crash.