Community코딩 & 개발github.com

코드베이스 마이그레이션 (Composio)

대규모 코드베이스 마이그레이션 및 다중 파일 리팩터링을 실행합니다. 에이전트가 수백 개의 파일을 로컬에서 변환하는 동안 Composio CLI를 사용하여 이슈 추적, 배치별 PR, CI 검증을 조정합니다.

코드베이스 마이그레이션 (Composio)란 무엇인가요?

이 스킬은 에이전트가 수백 개의 파일에 걸친 대규모 코드베이스 변환(프레임워크 업그레이드, API 이름 변경, 설정 재작성, 구조적 리팩터링)을 체계적으로 수행할 수 있게 해줍니다. 에이전트는 `jscodeshift`, `ts-morph`, `comby`, `ast-grep` 같은 도구를 사용해 로컬에서 코드 모드를 실행하고, Composio CLI를 통해 깃허브 PR 생성, 선형/지라 이슈 추적, CI 상태 확인 등 주변 작업을 처리합니다. 계획 단계에서 정확한 변환 규칙을 정의하고 영향 범위를 파악한 후, 25개 파일 단위로 배치를 나누어 각 배치마다 PR을 생성하고 CI가 통과하면 병합하는 반복 프로세스를 따릅니다. 각 PR은 하나의 변환만 포함하고, `done.list`로 완료된 파일을 추적하며, 배치 간 충돌을 방지하기 위해 리베이스 전략을 사용하는 등 안전 장치가 내장되어 있어 리뷰 가능한 조각으로 대규모 변경을 안전하게 배포할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/codebase-migrate

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

코드베이스 마이그레이션

수백 개의 파일에 걸친 프레임워크 업그레이드, API 이름 변경, 설정 재작성, 구조적 리팩터링을 조정합니다. 로컬 편집은 에이전트가 수행하고, Composio CLI가 이슈 추적, 배치별 PR, CI 검증 같은 주변 작업을 처리합니다.

사용 시기

  • 프레임워크 업그레이드 (React 17 → 19, Node 18 → 22, Django 4 → 5).
  • 모노레포 전체의 API 이름 변경 (예: getUserById → users.byId).
  • 설정/포맷 마이그레이션 (webpack → vite, eslint → biome, jest → vitest).
  • "200개 파일을 동일한 방식으로 변경"해야 하며, 리뷰 가능한 조각으로 나누어 배포해야 하는 모든 작업.

사전 요구 사항

curl -fsSL https://composio.dev/install | bash
composio login
composio link github        # PR + CI 상태 확인용
composio link linear        # 또는 jira — 마이그레이션 추적용

에이전트가 직접 사용할 로컬 도구: git, rg, jscodeshift/ts-morph/comby/ast-grep (언어에 적합한 도구), 그리고 테스트 러너.

계획 단계

  1. 변환을 정확히 정의하세요. 나쁜 예: "vitest로 마이그레이션." 좋은 예: "jest.mock을 vi.mock으로 대체, jest.fn()을 vi.fn()으로 교체, jest.config.js를 템플릿 X를 사용해 vitest.config.ts로 이름 변경."
  2. 영향 범위를 파악하세요:
    rg -l 'jest\.(mock|fn|spyOn)' | wc -l
    rg -l 'from "jest"' | sort
    
  3. 추적 이슈를 등록하세요:
    composio execute LINEAR_CREATE_ISSUE -d '{
      "teamId":"TEAM_ID",
      "title":"테스트 러너 마이그레이션: jest → vitest",
      "description":"약 25개 파일씩 배치. 각 PR이 정상적으로 병합된 후 체크포인트."
    }'
    

리뷰 가능한 배치로 실행

반복: N개 파일 선택 → 변환 → 테스트 → PR → 정상 통과 대기 → 병합 → 다음 배치.

# 배치 헬퍼: 패턴과 일치하는 처음 25개의 수정되지 않은 파일
BATCH=$(rg -l 'jest\.mock' | grep -v done.list | head -25)
echo "$BATCH" > batch.list

에이전트가 batch.list에 대해 코드 모드를 실행한 후:

git checkout -b migrate/vitest-batch-03
xargs < batch.list codemod-runner   # 예: jscodeshift / ts-morph / comby
npm test -- --changed
git add -A && git commit -m "migrate(test): jest → vitest (batch 3)"
git push -u origin migrate/vitest-batch-03

composio execute GITHUB_CREATE_A_PULL_REQUEST -d '{
  "owner":"acme","repo":"app",
  "head":"migrate/vitest-batch-03","base":"main",
  "title":"migrate(test): jest → vitest (batch 3)",
  "body":"LIN-482의 일부. 25개 파일. 코드 모드: `transforms/jest-to-vitest.ts`."
}'

그런 다음 CI를 폴링하고 정상 통과 시 병합:

composio execute GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY \
  -d '{"owner":"acme","repo":"app","branch":"migrate/vitest-batch-03"}'

워크플로 스크립트

scripts/migrate-batch.ts, 배치당 한 번씩 composio run --file scripts/migrate-batch.ts -- --batch 3으로 실행:

const batch = process.argv[process.argv.indexOf("--batch") + 1];

const pr = await execute("GITHUB_CREATE_A_PULL_REQUEST", {
  owner: "acme", repo: "app",
  head: `migrate/vitest-batch-${batch}`, base: "main",
  title: `migrate(test): jest → vitest (batch ${batch})`,
  body: `LIN-482의 일부. transforms/jest-to-vitest.ts 참조.`
});

await execute("LINEAR_CREATE_COMMENT", {
  issueId: "LIN-482",
  body: `PR #${pr.number} 생성됨: ${pr.html_url}`
});

안전 장치

  • PR당 하나의 변환만. 이름 변경과 포맷 변경을 절대 섞지 마세요.
  • done.list를 유지하여 이미 마이그레이션된 파일을 추적하고 다음 배치가 건너뛰도록 합니다.
  • 마지막 배치에서는 전체 테스트 스위트를 실행하세요. 배치별 PR이 --changed 옵션으로 실행되었더라도 마찬가지입니다.
  • 코드 모드 먼저, 수동 편집은 나중에. 코드 모드가 3개 파일을 놓친 경우 수동으로 패치하고 PR 본문에 기록하세요.
  • 배치별로 롤백하고 전역적으로 롤백하지 마세요. 각 PR이 깔끔하게 되돌려질 수 있어야 합니다.

검증 루프

각 병합 후:

rg 'jest\.(mock|fn|spyOn)' | wc -l     # 0에 수렴해야 함
npm test                                # 전체 스위트
composio execute GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY \
  -d '{"owner":"acme","repo":"app","branch":"main","event":"push"}' \
  | jq '.workflow_runs[0].conclusion'

문제 해결

  • 코드 모드 정규식이 너무 많이 잡힘 → 구조적 일치를 위해 AST 기반 도구(ast-grep, ts-morph)로 전환하세요.
  • 로컬에서는 테스트가 통과하지만 CI에서 실패 → Node/Python 버전 일치 확인; .nvmrc / pyproject.toml을 확인하세요.
  • PR이 리뷰하기 너무 큼 → 배치 크기를 절반으로 줄이세요; 메인테이너는 800줄 짜리 diff를 리뷰하지 않습니다.
  • 배치 간 충돌 → 현재 배치를 병합하기 전에 열린 배치를 리베이스하세요; 병합된 배치에 강제 푸시하지 마세요.

전체 CLI 참조: docs.composio.dev/docs/cli

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

관련 스킬