본문으로 건너뛰기
cccskills
무료GitHub에 공개

ci

Use when running headless inside a GitLab CI job in the Gramax repo (the `ai` job). Establishes environment — repo checked out, glab/gh authenticated, what tools exist, how to read/post on GitLab, how to diagnose failed pipeline jobs. Triggers on "ci", "running in CI", "headless CI job", "ты в CI", "запущен в пайплайне".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax스타 616(GitHub 616 + cccskills 0)
연동 도구GitLab

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

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

Claude Code running headless in GitLab CI job for Gramax.

Environment

  • Cwd = team workspace root (cloned fresh by init.sh). Layout:
    • gramax/ — product repo, on MR source branch. cd gramax for code.
    • docs/, board/ — sibling repos (shallow). .claude/ — workspace config + skills.
  • GitLab host: gitlab.ics-it.ru, project ics/doc-reader (id 155).
  • glab already authed (GITLAB_HOST+GITLAB_TOKEN set). Use for every GitLab op — read MRs, diffs, job logs, post notes.
  • gh for GitHub mirror (gram-ax/gramax, issues only).
  • Non-interactive: no prompts, no questions. Decide and act.

Tools in image

claude, glab, gh, git, bun, rg, fd, jq, uv/python3, openssh-client. bun for JS/TS (bun run lint, bun run test <file>), rg/fd for search.

Current context

CI vars say where you are:

  • CI_MERGE_REQUEST_IID — MR (on MR pipeline).
  • CI_MERGE_REQUEST_SOURCE_BRANCH_NAME / CI_MERGE_REQUEST_TARGET_BRANCH_NAME.
  • CI_PIPELINE_ID — current pipeline. CI_PROJECT_ID (155), CI_PROJECT_PATH (ics/doc-reader), CI_SERVER_HOST.

CI vars omit MR body — pull live title/desc/diff with glab. Run from gramax/, or target -R ics/doc-reader:

glab mr view "$CI_MERGE_REQUEST_IID" -R ics/doc-reader
glab mr diff "$CI_MERGE_REQUEST_IID" -R ics/doc-reader

Diagnose failed pipeline jobs

Part of helping the dev: find which jobs failed and why, so you can propose a fix.

  1. List pipeline jobs, spot failed ones:
    glab api "projects/155/pipelines/$CI_PIPELINE_ID/jobs?per_page=100" | jq -r '.[] | select(.status=="failed") | "\(.id)\t\(.name)\t\(.stage)"'
    
  2. Read each failed job's log, find root cause (tail = error):
    glab api "projects/155/jobs/<job-id>/trace"
    
    Quote shortest decisive error line. Map to source file/line in the diff.
  3. Diagnose: lint break, test fail, type error, build error. Tie to the MR change that caused it.
  4. Tell dev concrete fix — file:line + what to change. If fix is small + safe, may commit it (attribution below).

Acting

  • Reviews follow merge-request skill. Run first — checklist (description + task link + ## Notes) is hard block before code review, defines comment style.
  • Prefer inline comments on exact lines (merge-request → REFERENCE.md → Inline comments), one thread = one finding, no status emoji. Summary MR note only for cross-file points not mapping to a line. Don't dump whole review in one note.
  • Output GitLab-flavored markdown. Reference files by path. Terse.
  • Review: focus correctness bugs, security, clear simplifications. Skip style nits (Biome handles). Nothing material wrong → say so in one line.
  • Comment replies = bot. Any reply to an MR/review comment posts as the bot (bot token GITLAB_CLAUDE_ACCESS_TOKEN). In CI that's the only token anyway; the rule matters when both tokens exist.
  • Conventions in gramax/CLAUDE.md + workspace CLAUDE.md (cwd). Follow.

Persistent review context across runs

ai job persists context dir between runs on same MR (GitLab cache keyed by MR IID). CI script restores before start, saves after, exports:

  • AI_CONTEXT_DIR — abs path to persisted dir (always exists). Read/write state here.
  • AI_REVIEW_MODE — fresh (first review) or continue (reviewed before).
  • AI_LAST_REVIEWED_SHA — head reviewed last run (empty on fresh); AI_HEAD_SHA = current head.

State file: $AI_CONTEXT_DIR/review-state.md. Its presence + last-reviewed-sha flips next run to continue — always (re)write at end. Keep compact:

  • Current head SHA + one-line MR summary.
  • Findings table: finding → file:line → status (open/fixed/wontfix/replied) → inline thread/discussion ID.
  • Open questions to author, waiting on.
  • Latest MR note timestamp seen (detect new comments next run).

fresh mode

Full review. Read MR via glab (description, full diff), run merge-request checklist, post inline comments per finding, write review-state.md from scratch.

continue mode — resume, don't restart

  1. Read $AI_CONTEXT_DIR/review-state.md — memory of prior review.
  2. Read new MR comments since recorded timestamp (glab mr view "$CI_MERGE_REQUEST_IID" --comments / discussions API in merge-request → REFERENCE.md). Reply in-thread: resolve addressed, push back on wrong fixes, answer questions.
  3. Review only new commits. Diff range, not whole MR: git -C gramax diff "$AI_LAST_REVIEWED_SHA".."$AI_HEAD_SHA" (--stat first to scope). AI_LAST_REVIEWED_SHA == AI_HEAD_SHA → no new code, only process comments. Don't re-review unchanged code or re-post known findings.
  4. Post new inline comments for new issues; update statuses of old findings as author fixes.
  5. Rewrite review-state.md: bump head SHA + timestamp, merge new findings, update statuses.

last-reviewed-sha written by CI script after you finish — don't manage it yourself.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

biome

무료

Use when user asks to lint with Biome, check lint warnings introduced in an MR/branch, run `lint:ref`, or read/triage large Biome diagnostic output in the Gramax project. Triggers on keywords like biome, lint, lint:ref, warnings, lint gate.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax6162026년 10월 6일 업데이트

e2e

무료

Use when user asks to write, create, run, or debug Playwright e2e tests in the Gramax project. Triggers on keywords like e2e, playwright, test, spec, QA.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax6162026년 10월 6일 업데이트

Use when CI jobs are red on a Gramax branch and need diagnosing/fixing — failed pipeline, broken build/tests, flaky jobs, a job that has been red for a while, "почини пайплайн", "почини все пайплайны", "сломанные джобы", "failed CI jobs", "pipeline red", "fix the pipeline".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax6162026년 10월 6일 업데이트

Use when creating, rewriting, OR reviewing a GitLab Merge Request in the Gramax product repo (`gramax/` → `gitlab.ics-it.ru/ics/doc-reader`). Triggers on "mr", "напиши описание MR", "опиши MR", "создай MR", "мерж реквест", "ревью MR", "проверь MR", "посмотри MR", "review MR", "review merge request", "code review for MR", "write MR description", "draft MR", "create merge request". Also pre-empts generic `/requesting-code-review`, `/code-review`, `/review` flows when target is a Gramax GitLab MR — team-convention checks (description, board link, `## Notes`) must run BEFORE code review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax6162026년 10월 6일 업데이트

Use when the user wants to inspect a Playwright `trace.zip` (actions, screenshots, console errors, network). Triggers on "examine trace", "explore trace", "open trace.zip", "look at the playwright trace", "что в trace.zip", "посмотри трейс", or any message attaching a `*.zip` path that looks like a Playwright trace (e.g. `trace-*.zip`, `trace.zip`).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Gram-ax/gramax6162026년 10월 6일 업데이트

Gram-ax의 스킬 모두 보기

이 스킬의 문제 신고