/yd-skills-personal:dok3-git-shipfrom yd-skills-personal
Defines the procedure for agents (Claude Code, Codex, Antigravity) to push work to GitLab repos: issue creation, batch branch naming, commit format, MR workflow, CI tracking, and commit-msg hook installation.
Ships in yd-skills-personal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
규칙 원본은 ~/.claude/ref-git-agents.md (세 에이전트 공통, agents-mem 의 공통본을 각 호스트에 동기화). 이 스킬은 그 규칙을 따르는 절차와 도구다. 규칙과 이 문서가 다르면 원본이 우선한다. 원본 파일이 없는 환경(새 머신, 외부 설치)에서는 이 문서의 절차가 곧 규칙이다.
스크립트 위치: 이 스킬 폴더의 scripts/ (Claude ~/.claude/skills/dok3-git-ship, Codex ~/.agents/skills/dok3-git-ship, Antigravity ~/.gemini/config/skills/dok3-git-ship — 모두 doksam-skills install.sh 가 건 같은 원본의 심링크).
| Claude Code | Codex | Antigravity | |
|---|---|---|---|
AGENT | claude | codex | agy |
커밋 -c | user.name=claude-ai user.email=claude-ai@<도메인> | codex-ai / codex-ai@<도메인> | agy-ai / agy-ai@<도메인> |
| 모델 태그 | 지금 도는 모델 이름, 예 [Claude Opus 5.5] | 예 [GPT-6 Sol] | 예 [Gemini 3.8 Flash] |
모델 태그는 추측하지 말고 자기 시스템 정보에 적힌 실제 모델명을 쓴다.
SK=~/.claude/skills/dok3-git-ship/scripts # 에이전트별 경로로
GL="$SK/glab-as.sh claude" # 토큰을 출력하지 않고 자기 계정으로 glab 실행
REPO=<gitlab-host>/<ns>/<repo> # -R 에는 호스트까지 붙인다. 명령은 그 레포 폴더 안에서
$GL api user | grep '"username"' # claude-ai 인지 확인
glab-as.sh 는 Python 3.11 미만(tomllib 없음)에서도 요청한 계정 섹션의 토큰만 읽는다. 호출한 셸의 PATH 에 따라 시스템 Python 3.9 가 잡혀도 동작한다.
git status -sb; git branch --show-current
$GL api "projects/<ns>%2F<repo>/merge_requests?state=opened&author_username=claude-ai" # 내 열린 MR 있으면 그것부터 머지
$GL api "projects/<ns>%2F<repo>" | python3 -c 'import json,sys;p=json.load(sys.stdin);print(p["squash_option"],p["merge_method"])'
$SK/install-hook.sh --check || $SK/install-hook.sh # 없으면 설치 → scripts/commit-msg.sh 를 첫 커밋에 포함
squash_option 이 always 면 squash 금지 규칙과 충돌하니 사용자에게 알린다. merge_method 가 ff 면 merge commit 이 안 생기니 역시 알린다.Co-Authored-By: Claude 와 Generated with Claude Code 줄을 사람 커밋이어도 거부한다. Merge 로 시작하는 제목은 형식 검사에서 뺀다..jj/)는 jj commit 이 git hook 을 안 돌린다. 커밋 제목을 직접 맞추고 push 전 git log 로 확인한다.작업 단위마다 이슈. 본문은 파일로 쓰고 "누가 판정하나"를 넣는다.
$GL issue create -R $REPO --title "..." --description "$(cat body.md)" --yes
git switch main && git pull -q
git switch -c "batch/claude-$(date +%Y%m%d)-$(openssl rand -hex 4)" # 배치마다 새 8자리 hex
BR=$(git branch --show-current) # 셸 상태가 안 이어지면 쓸 때마다 이렇게 다시 읽는다
git add <명시 파일만> # -A 금지, .env 금지
if git diff --cached | grep -iE 'glpat-|ghp_|password[[:space:]]*[:=]|secret[[:space:]]*[:=]|token[[:space:]]*[:=]'; then
echo "시크릿 의심 — 커밋하지 않고 멈춘다(값을 확인하고 스테이징에서 뺀다)"
else
git -c user.name=claude-ai -c user.email=claude-ai@<도메인> commit -m "[Claude Opus 5.5] docs: ... (#N)" \
&& git push -u origin HEAD # 수시로 push, MR 은 아직
fi
batch/<agent>-<YYYYMMDD>-<8자리 hex> 다. hex 는 배치를 시작할 때 openssl rand -hex 4 로 한 번 만들고 MR·정리까지 같은 이름을 쓴다.
날짜 뒤 -2·-3 순번은 쓰지 않는다. 같은 에이전트의 세션 둘이 같은 순번을 골라 겹친다(아래 Learned warnings).git revert 가 되게).--no-verify 로 우회하지 않는다(오타 수준만 YD_TRIVIAL=1).$GL mr create -R $REPO --source-branch "$(git branch --show-current)" --target-branch main \
--title "[Claude Opus 5.5] <요약>" --description "$(cat mr.md)" --remove-source-branch --yes
# mr.md 에 반드시: Closes #a #b ... (Refs 만 쓰지 않는다)
$GL mr merge <iid> -R $REPO --remove-source-branch --yes # --squash 붙이지 않는다
mr merge 가 405 Method Not Allowed 면 GitLab 이 아직 mergeability 를 계산 중이다(detailed_merge_status: checking). mergeable 이 될 때까지 몇 초 기다렸다가 다시 머지한다.Closes 한다.git merge origin/main 으로 풀고 push (rebase·force push 금지).| tail 로 자르지 않는다. mr create 는 현재 폴더의 remote 를 source 로 잡아서, 다른 폴더에서 돌리면 422 Source project is not a fork 가 나는데 tail 이 그걸 가린다. 실패하면 --recover 로 재시도.$GL api "projects/<ns>%2F<repo>/merge_requests/<iid>" | python3 -c 'import json,sys;m=json.load(sys.stdin);print(m["state"],m["merge_commit_sha"],m["squash"])'
python3 $SK/ci_wait.py --agent claude <ns>/<repo> <merge_commit_sha> # run_in_background 로. 배포 잡까지 끝나야 완료
$GL api "projects/<ns>%2F<repo>/issues/<N>" | grep '"state"' # opened 면 note + close
BR=$(git branch --show-current); git switch main && git pull -q && git branch -d "$BR"
git log -1 --format='%an %s' # 작성자·태그 확인
ci_wait.py 종료 코드는 0 성공(또는 파이프라인 없음), 1 실패·취소, 2 시간 초과, 3 도구 오류(glab 실패·토큰 없음)다. 3 을 CI 실패로 읽지 말고 토큰·네트워크부터 확인한다.
m["squash"] 가 true 면 규칙 위반이다. 사용자에게 보고한다(되돌리려면 force push 가 필요하므로 임의로 고치지 않는다).
main 직접 커밋이 허용되는 예외지만 제목 규칙은 지킨다: [Claude Opus 5.5] chore: sync memory mirror (#N).
batch/claude-20261005-8 을 골랐다. 한쪽이 llmgw#57 을 머지하며 브랜치를 지웠다. 직후 다른 쪽이 같은 이름으로 같은 기능을 push 했다. 작업이 중복되고 MR(!46)이 충돌로 남았다. 날짜 뒤 순번 대신 배치마다 openssl rand -hex 4 8자리를 붙인다 (#205).scripts/ci_wait.py (opens in a new tab)scripts/commit-msg.sh (opens in a new tab)scripts/glab-as.sh (opens in a new tab)scripts/install-hook.sh (opens in a new tab)scripts/read_token.py (opens in a new tab)tests/claims.json (opens in a new tab)tests/test_ci_wait.py (opens in a new tab)tests/test_commit_msg.py (opens in a new tab)tests/test_glab_as.py (opens in a new tab)tests/test_glab_as_fallback.py (opens in a new tab)tests/test_install_hook.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub leeyudok/agents-scaffold --plugin yd-skills-personal12 skills in this plugin
/dok3-agents-mem에이전트 메모리·전역 지침·설정을 GitLab agents-mem 레포에 백업하고 되돌린다. 전역 CLAUDE.md·infra-*.md·ref-*.md·프로젝트 메모리·스킬·에이전트·settings 를 고친 뒤 미러를 갱신할 때, 다른 호스트가 바꾼 전역 지침을 받을 때, 새 머신을 복원할 때 사용한다. "메모리 백업", "미러 갱신", "agents-mem 싱크", "sync_memory", "전역 지침 동기화" 요청에 쓴다. 메모리 내용이 맞는지 감사하는 일은 dok3-memory-factcheck 를 쓴다./dok3-claude-auth-sync한 PC 에서 claude login 으로 다시 인증한 Claude Code 로그인을, 사용자가 등록해 둔 다른 PC·서버에도 똑같이 맞춘다. 키체인·~/.claude/.credentials.json 의 claudeAiOauth 만 ssh 표준입력으로 넘기고 토큰은 출력하지 않는다. "클로드 인증 서버들에 공유", "claude 로그인 다른 PC 에도 맞춰", "인증값 똑같이" 요청에 쓴다. 저장소 동기화는 dok3-git-sync 가 맡는다./dok3-doksam-uidoksam 프로젝트의 UI 를 만들거나 수정할 때, 사용자가 "ui.doksam.com 참고" / "doksam-ui" / "독삼 표준 UI" 라고 말할 때, 프론트엔드 작업이 doksam 인프라를 대상으로 할 때 사용한다. ui.doksam.com 을 디자인 단일 진실원천(SSOT)으로 강제한다 — shadcn/ui 시맨틱 토큰(색상 하드코딩 금지), 브랜드 프로필, 자체 호스팅 shadcn 커스텀 레지스트리(npx shadcn add https://ui.doksam.com/r/<name>.json), Phosphor 아이콘 우선, 폐쇄망 셀프호스팅, 기계적 표준 준수 검증. 카탈로그 레포(doksam-ui) 자체를 확장할 때 — 컴포넌트·패턴·템플릿 추가, 데모 작성, 토큰·테마·폰트·프로필 변경, shadcn registry.json / llms.txt 갱신 — 도 이 스킬을 쓴다./dok3-finguardFinGuard CLI로 소스코드 취약점을 점검하고 심각도 기반 보안 게이트와 제한된 수정·재검증 루프를 수행할 때 사용한다. 일반 코드 품질 리뷰나 SCA·모의해킹은 범위 밖이다./dok3-git-sync여러 호스트(맥·server1·doksam 등)에 클론해 둔 같은 저장소를 맞춘다 — 각 클론을 git pull --ff-only 로 origin 에 맞추고 추적 파일 수·목록 해시를 비교한 뒤, git 이 관리하지 않는 폴더(docs/원본자료 등)를 지우지 않고 합집합으로 채운다. "서버들 레포 동기화", "파일 갯수 같은지 확인", "server1 doksam 싱크", "합집합으로 맞춰" 요청에 쓴다. 작업을 커밋·MR 로 올리는 일은 dok3-git-ship 이 맡는다./dok3-hugo-tech-blogWrite, expand, validate, and safely publish Korean Hugo technical-course chapters in the dok123 Rocky Linux blog. Use `dok3-writer-kr` for sentence-level Korean style.Other plugins' skills for the same job