소스 정보
- 저장소
- SocketDev/socket-btm
- 최근 소스 활동
- 2026년 8월 1일 14:58
- 감지된 SKILL.md 언어
- 영어
- 스타
- 3
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/SocketDev/socket-btm --skill squashing-history명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Run this repo's GitHub Actions locally with Agent-CI before pushing CI-sensitive changes.
Audit Actions permissions/allowlists against the fleet baseline; --conform fixes drift.
Propagate a wheelhouse template change across fleet repos: worktrees, push/PR fallback, cleanup.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | squashing-history |
| description | Squash default-branch history to one commit with backup and force-push. |
| user-invocable | true |
| allowed-tools | AskUserQuestion, Bash(node:*), Bash(git:*) |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
Squash all commits on the default branch to a single commit while preserving code integrity. This is
the low-level squash-to-one-commit primitive; refreshing-history layers dep-refresh + a signed
commit on top of the same engine.
The commit message is chore: initial commit — a Conventional Commits header, so it clears
commit-message-format-guard. The collapse is gated by no-revert-guard and the force-push by
no-force-push-guard; the runner sets an inline SQUASH_HISTORY=1 sentinel limited to exactly
those two commands — the same opt-in-per-command shape as the cascade's FLEET_SYNC=1.
node .claude/skills/fleet/squashing-history/run.mts /path/to/<repo>
The runner walks 8 phases end-to-end in a sibling worktree; the primary checkout is never touched. See
run.mts for the implementation (the shared squashSingleCommit() engine lives there and
is reused by refreshing-history).
--branch)node .claude/skills/fleet/squashing-history/run.mts /path/to/<repo> \
--branch <name> [--base <ref>] [--message <subject>]
This is the sanctioned path for an author-agreed feature-branch total-squash — it removes the need
to type Allow total squash bypass every time. Instead of the default branch, it collapses the named
feature branch to a single commit on top of its PR base's merge-base:
--branch <name> — the feature branch to squash (required for this mode).--base <ref> — the PR base used for the merge-base (default: the resolved default branch, usually
main). Only commits the branch added past this base are collapsed; the shared base is never
rewritten.--message <subject> — the collapsed commit's subject (usually the PR title). When omitted it
defaults to the branch tip's own subject, falling back to chore: initial commit.It reuses the same engine and safety contract as the default-branch flow — resolve the canonical
tip (local-canonical / origin, refusing a two-way divergence), push a byte-verified backup ref of the
pre-squash tip before any rewrite, HARD-verify the post-squash tree is byte-identical to that tip,
then --force-with-lease-push under the SQUASH_HISTORY=1 sentinel. Because that backup + tree-identity
check is what the guards trust (not the branch name), the same sentinel clears
no-total-squash-guard/no-force-push-guard for the feature-branch push with no bypass phrase —
the safety is unchanged. Unlike the default-branch flow it skips the roster opt-in / published-release
gates: it rewrites only the named branch, never the repo's published default-branch history.
The runner picks a mode from the local-vs-origin relationship (local main is canonical in the fleet):
$BASE is AHEAD of origin): backup-push the LOCAL tip, mint a
signed root from its tree via git commit-tree (mintSquashRoot() — pure object creation, no
worktree, the primary checkout's index/worktree are never touched), verify the tree is
byte-identical, point the local branch at the root, lease-push against origin's tip.| # | Phase | What it does (origin mode) |
|---|---|---|
| 1 | Pre-flight | Resolve default branch (main → master fallback); fetch; capture orig HEAD + count. |
| 2 | Worktree | Add chore/squash worktree at <repo>-squash tracking origin/$BASE. |
| 3 | Backup | Push $ORIG_HEAD to refs/heads/backup-YYYYMMDD-HHMMSS before any destructive op. |
| 4 | Squash | Soft-reset to the root commit, then amend it; verify commit count == 1. |
| 5 | Integrity | Diff against $ORIG_HEAD (ignoring submodules) must be empty (HARD exit otherwise). |
| 6 | Push | Lease-push the single commit to $BASE under the sentinel. |
| 7 | Cleanup | Remove worktree + delete the temp branch. |
| 8 | Report | Print new SHA + backup ref name + recovery one-liner. |
--force-with-lease, which aborts if the remote moved
since the last fetch, so a racing push is never clobbered.When invoking interactively, show the summary (original count, backup ref, integrity status) and ask
for explicit confirmation via AskUserQuestion before the push.
See reference.md for retry loops and edge-case handling.
This skill collapses history. For the two other rewrite shapes, the deterministic owners already exist — never hand-roll one:
node scripts/fleet/strip-ai-attribution.mts --base <ref> [--dry-run]. It walks
base..HEAD with plumbing, rewords only flagged messages, preserves tree +
author identity + author date, signs each commit, and verifies the final tree
byte-identical.scripts/fleet/consolidate-commits.mts.history-rewrite-guard blocks git filter-branch / git filter-repo / an
unsigned git commit-tree — they re-mint commits unsigned, and filter-branch
restores the original GIT_COMMITTER_*, so even a re-signed commit fails
GitHub's verification. See history-rewrites.
Once a repo is a single chore: initial commit, the wheelhouse cascade keeps it that way:
sync-scaffolding detects the lone-initial-commit shape (isSingleInitialCommit in
scripts/repo/sync-scaffolding/commit.mts) and amends the cascade into that commit
(git commit --amend --no-edit) rather than stacking a chore(wheelhouse): cascade … on top. So a
squashed repo doesn't drift back to multi-commit between manual squashes — no re-squash needed after
routine cascades.