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

orchestrate:precommit

Add pre-commit hooks, linting, CLAUDE.md, and foundational .claude/ setup to a target repo

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

rossoctl/rossoctl스타 303(GitHub 303 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.7 KB

SKILL.md(원문)

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

flowchart TD
    START(["/orchestrate:precommit"]) --> DETECT["Detect language"]:::orch
    DETECT --> PRECOMMIT["Generate .pre-commit-config.yaml"]:::orch
    PRECOMMIT --> LINT["Generate lint config"]:::orch
    LINT --> MAKEFILE["Add Makefile targets"]:::orch
    MAKEFILE --> CLAUDE_MD["Create CLAUDE.md"]:::orch
    CLAUDE_MD --> SETTINGS["Create .claude/settings.json"]:::orch
    SETTINGS --> BRANCH["Create branch"]:::orch
    BRANCH --> SIZE{Under 700 lines?}
    SIZE -->|Yes| PR["Commit + open PR"]:::orch
    SIZE -->|No| SPLIT["Split into sub-PRs"]:::orch
    SPLIT --> PR
    PR --> DONE([Phase complete])

    classDef orch fill:#FF9800,stroke:#333,color:white

Follow this diagram as the workflow.

Orchestrate: Pre-commit

Establish the code quality baseline for a target repo. This is Phase 2 and produces PR #1 — the foundation that validates all subsequent PRs.

When to Use

  • After orchestrate:plan identifies precommit as a needed phase
  • Always the first PR-producing phase

Prerequisites

  • Plan exists at /tmp/rossoctl/orchestrate/<target>/plan.md
  • Target repo cloned in .repos/<target>/

Step 1: Detect Language

Use the scan report or check directly:

ls .repos/<target>/go.mod .repos/<target>/pyproject.toml .repos/<target>/package.json .repos/<target>/requirements.yml 2>/dev/null

Step 2: Generate Pre-commit Config

Create .pre-commit-config.yaml with language-appropriate hooks.

Python hooks

  • ruff — lint + format
  • trailing-whitespace, end-of-file-fixer, check-yaml
  • check-added-large-files

Go hooks

  • golangci-lint
  • gofmt, govet
  • trailing-whitespace, end-of-file-fixer

Node hooks

  • eslint, prettier
  • trailing-whitespace, end-of-file-fixer

Ansible hooks

  • ansible-lint, yamllint
  • trailing-whitespace, end-of-file-fixer

Step 3: Generate Lint Config

Python (pyproject.toml)

[tool.ruff]
line-length = 120
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I", "W"]

Go (.golangci.yml)

linters:
  enable:
    - errcheck
    - govet
    - staticcheck
    - unused
run:
  timeout: 5m

Node (.eslintrc.json)

{
  "extends": ["eslint:recommended"],
  "env": { "node": true, "es2022": true }
}

Step 4: Add Makefile Targets

If no Makefile exists, create one. If it exists, add targets:

.PHONY: lint fmt

lint:
	pre-commit run --all-files

fmt:
	# language-specific formatter command

Step 5: Create CLAUDE.md

Template for the target repo:

# <Repo Name>

## Overview
<brief description from README or scan>

## Repository Structure
<key directories and their purpose>

## Key Commands
| Task | Command |
|------|---------|
| Lint | `make lint` |
| Format | `make fmt` |
| Test | <detected test command> |
| Build | <detected build command> |

## Code Style
- <language> with <linter>
- Pre-commit hooks: `pre-commit install`
- Sign-off required: `git commit -s`

Step 6: Create .claude/settings.json

{
  "permissions": {
    "allow": [
      "Bash(git status:*)",
      "Bash(git log:*)",
      "Bash(git diff:*)",
      "Bash(git branch:*)",
      "Bash(ls:*)",
      "Bash(cat:*)",
      "Bash(find:*)",
      "Bash(make lint:*)",
      "Bash(make fmt:*)",
      "Bash(pre-commit run:*)"
    ]
  }
}

Step 7: Create Branch and PR

Create branch in the target repo:

git -C .repos/<target> checkout -b orchestrate/precommit

PR size check

git -C .repos/<target> diff --stat | tail -1

Target ~600-700 lines. Split if over 700.

Skills to push alongside

Include initial skills in .claude/skills/ within the target repo:

  • repo:commit — commit message conventions adapted for the target

Commit and push

git -C .repos/<target> add -A
git -C .repos/<target> commit -s -m "feat: add pre-commit hooks, linting, and Claude Code setup"
git -C .repos/<target> push -u origin orchestrate/precommit

Create PR

gh pr create --repo org/repo --title "Add pre-commit hooks and code quality baseline" --body "Phase 2 of repo orchestration. Adds pre-commit hooks, linting config, CLAUDE.md, and .claude/ setup."

Update Phase Status

Update /tmp/rossoctl/orchestrate/<target>/phase-status.md:

  • Set precommit to complete
  • Record PR number and date

Related Skills

  • orchestrate — Parent router
  • orchestrate:scan — Provides tech stack detection
  • orchestrate:plan — Defines precommit phase tasks
  • orchestrate:tests — Next phase: test infrastructure

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

auth

무료

Authentication and authorization patterns for Rossoctl services

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

Create confidential OAuth2 clients in Keycloak for server-to-service authentication

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

ci

무료

CI pipeline monitoring, status checks, and PR validation workflows

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

Monitor running CI jobs, wait for completion, create tasks for results

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

rossoctl/rossoctl3032026년 10월 25일 업데이트

rossoctl의 스킬 모두 보기

이 스킬의 문제 신고