К основному содержанию
скилл CX Codex

porting-another-repository — скилл для Claude Code: план переноса кода

Разбирает фичу в текущем репозитории и правила целевого, а потом пишет план переноса в tmp/ — файлами, которые вы применяете руками.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dyoshikawa/rulesync --skill porting-another-repository -a claude-code
Открыть на GitHub

Что делает porting-another-repository

Скилл берёт два входа: target_repo (куда переносим — owner/repo, URL или локальный путь) и scope (что переносим — имя фичи, каталог, файл или описание). Направление жёстко зафиксировано: источник — репозиторий, где вы запустили скилл, цель — target_repo. Целевой репозиторий он не трогает вообще, только готовит план на диске.

Работа идёт по шагам. Сначала анализ источника: точки входа, внутренние зависимости, обвязка сборки и тестов, внешние пакеты. Потом анализ цели — язык, пакетный менеджер, раскладка каталогов, стиль именования, что уже есть и пересекается с переносимым. Локальный путь смотрится напрямую, удалённый — через gh repo view, gh api repos/<owner/repo>/contents/<path> и MCP-сервер deepwiki. Дальше таблица соответствий «источник → цель», пошаговый план изменений и готовые к копированию диффы.

Результат складывается в tmp/porting-another-repository-{YYYYMMDD-HHmm}/: 00-overview.md пишется последним и служит индексом, рядом 01-source-analysis.md, 02-target-analysis.md, 03-porting-plan.md и 04-diff.md. Для удалённого репозитория нужен настроенный gh и доступ к deepwiki, иначе анализ цели упрётся в то, что видно снаружи. Отметка времени считается один раз на весь запуск, поэтому все файлы лежат в одной папке.

Какие задачи решает

  • перенести фичу из одного репозитория в другой без ручного разбора зависимостей
  • узнать конвенции чужого репозитория перед тем, как писать в него код
  • получить готовые диффы для вставки в целевой проект
  • оценить риски и открытые вопросы переноса до начала работы
  • найти в исходном репозитории всё, что тянется за фичей: утилиты, типы, конфиги

Примеры запросов агенту

  • Перенеси авторизацию через JWT из этого репозитория в acme/backend
  • Спланируй порт каталога src/queue в /home/me/worker
  • Что из этого репозитория нужно утащить вместе с фичей экспорта отчётов в owner/repo?

Как установить porting-another-repository

1Через Skills CLI (Vercel)

npx skills add dyoshikawa/rulesync --skill porting-another-repository -a claude-code

2Вручную: положить файлы

~/.claude/skills/porting-another-repository/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/porting-another-repository/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о porting-another-repository

Как установить porting-another-repository в Claude?

Выполните npx skills add dyoshikawa/rulesync --skill porting-another-repository -a claude-code. Скилл встанет в ~/.claude/skills/porting-another-repository/SKILL.md.

Что делает porting-another-repository?

Анализирует выбранную часть текущего репозитория и конвенции целевого, затем пишет план переноса и конкретные диффы в tmp/porting-another-repository-{YYYYMMDD-HHmm}/. Целевой репозиторий не изменяется — правки вы вносите сами.

Что нужно, чтобы разобрать удалённый целевой репозиторий?

Для owner/repo или URL скилл обращается к gh repo view, gh api и MCP-серверу deepwiki. Без них останется только то, что видно снаружи.

Исходный текст

SKILL.md · MIT
---
name: porting-another-repository
description: >-
  Plan how to port a feature, configuration, or implementation from this
  repository into another repository. Analyzes the source feature here and the
  target repo's conventions, then writes a multi-file porting plan (overview,
  source analysis, target analysis, plan, diff) to
  tmp/porting-another-repository-{YYYYMMDD-HHmm}/*.md for the user to review and
  apply manually.
targets:
  - "*"
---

arguments = the user's request

Parse `arguments` as:

- `target_repo`: the repository to port INTO, in `owner/repo` form, a URL, or a local path
- `scope`: what to port from THIS repository (a feature name, directory, file, or rough description)

If `target_repo` is not provided, ask the user which repository to port into.
If `scope` is not provided, ask the user what part of this repository they want to port.

The direction is fixed: the **source** is this repository, the **target** is `target_repo`. This skill never modifies the target repository directly — it only produces a porting plan on disk for the user to apply manually.

## Step 0: Prepare the Output Directory

Compute a single timestamp once and reuse it for every file:

```bash
ts="$(date +%Y%m%d-%H%M)"
out="tmp/porting-another-repository-${ts}"
mkdir -p "${out}"
```

All artifacts in this run go under `${out}/`. Do not recompute the timestamp per file — every file must share the same directory.

## Step 1: Analyze the Source (This Repository)

Understand exactly what is being ported. Prefer targeted symbol and search tools over reading whole files.

Identify, for the requested `scope`:

- The entry points and the files that implement it.
- Its dependencies within this repo (shared utilities, base classes, types, config) that would also need to come along.
- Any build/test/tooling wiring it relies on (scripts, configs, fixtures, CI steps).
- External package dependencies it pulls in.

Write the result to `${out}/01-source-analysis.md`.

## Step 2: Analyze the Target Repository

Understand the target's conventions so the port fits in naturally.

- If `target_repo` is a local path, inspect it directly (grep/read).
- If it is `owner/repo` or a URL, use `gh repo view`, `gh api repos/<owner/repo>/contents/<path>`, and the deepwiki MCP (`mcp__deepwiki__ask_question`, `mcp__deepwiki__read_wiki_contents`) to learn its structure.

Capture:

- Language, package manager, build/test tooling, and directory layout.
- Where the equivalent of the source feature would live in the target's structure.
- Naming, style, and architectural conventions the port must follow.
- Existing functionality that overlaps or conflicts with what is being ported.

Write the result to `${out}/02-target-analysis.md`.

## Step 3: Produce the Porting Plan

Map source concepts onto the target. Use a small mapping table (source path/symbol → target path/symbol) — it is far easier to read than prose for this.

Cover:

- A step-by-step sequence of changes, ordered so the target stays buildable.
- Required dependency additions (with versions) and tooling/config changes.
- Adaptations needed to match the target's conventions (renames, refactors, API shape changes).
- Risks, open questions, and anything deliberately out of scope.
- A short test/verification plan for the target.

Write the result to `${out}/03-porting-plan.md`.

## Step 4: Produce Concrete Diffs

For each step in the plan, write the concrete code/config the user should add to the target, in fenced blocks labeled with their target file paths. Where an existing target file changes, show a unified-diff-style snippet. Keep these ready to copy-paste.

Write the result to `${out}/04-diff.md`.

## Step 5: Write the Overview and Report

Write `${out}/00-overview.md` last, as the index for the run. It must contain:

- Source repo and `scope`, target repo, and the timestamp.
- A one-paragraph summary of what is being ported and the recommended approach.
- A links list to the other files (`01-source-analysis.md` … `04-diff.md`) with a one-line description of each.
- Top risks and open questions surfaced during the analysis.

Then report to the user:

- The absolute path of `${out}/`.
- A one-line summary of the port (what moves, where it lands).
- The top open questions the user needs to decide before applying the plan.

© dyoshikawa · MIT · dyoshikawa/rulesync

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
report-malicious-repository reason-machines Помогает распознать репозиторий, который выдаёт себя за антивирус или другой софт, и оформить жалобу на GitHub. CX Codex +1 1 100установок Technical Debt Remediation Plan официальный github Составляет пошаговые планы устранения техдолга в кодовой базе. Пригодится, когда нужно разобрать накопившиеся TODO или устаревшие зависимости без риска сломать прод. ★ 40 418звёзд репо autofix coderabbitai Скилл читает незакрытые треды ревью CodeRabbit в вашем PR и предлагает исправления по каждому пункту отдельно. Пригодится, когда бот оставил десяток замечаний и разбирать их руками лень. CX Codex +1 10 400установок om-approve-merge-pr open-mercato Скилл принимает номер пул-реквеста, ставит апрувящий ревью и делает squash-merge. Отказывается, если мешает QA-гейт или блокирующий лейбл. CX Codex +1 3 500установок github-triage code-yeongyu Читает все открытые issues и PR в репозитории и пишет отчёты с доказательствами. Ничего не комментирует и не закрывает. CX Codex +1 2 700установок om-review-prs open-mercato Разбирает все открытые пул-реквесты без ревью, от новых к старым, и запускает по каждому полный разбор. Удобно в начале дня. CX Codex +1 2 600установок

Из того же набора11

rulesync-feature-research Сопоставляет фичи rulesync с документацией кодинг-агентов: что поддерживается, где пробелы, чем отличается поведение клиентов. CX Codex +1 ★ 1 552звёзд репо resolve-scrap-issues Скилл проходит по свежим GitHub-issue с меткой maintainer-scrap, проверяет каждую и либо закрывает её, либо открывает один общий PR с исправлениями. CX Codex +1 ★ 1 552звёзд репо rebase-latest-main Скилл проводит агента по шагам: проверить ветку, сделать fetch, ребейзнуть на origin/main и разрулить конфликты. Полезен, когда ветка отстала от main. CX Codex +1 ★ 1 552звёзд репо prs-awaiting-author Показывает открытые пул-реквесты, по которым следующий шаг за автором: упал CI, не отвечены замечания ревью, ждёт ответа вопрос мейнтейнера. CX Codex +1 ★ 1 552звёзд репо goal-release Ведёт релиз целиком: открывает PR, ждёт зелёный CI, мержит и обновляет формулу Homebrew. Пригодится, когда версию надо выпустить одной командой. CX Codex +1 ★ 1 552звёзд репо git-worktree-runner Скилл учит агента управлять git worktree через CLI-обёртку gtr: создавать, открывать в редакторе, запускать команды и удалять. CX Codex +1 ★ 1 552звёзд репо draft-issue-to-external-repository Готовит GitHub issue для репозитория, которым вы не владеете: изучает шаблоны и стиль проекта, уточняет замысел с вами и сохраняет текст в файл. CX Codex +1 ★ 1 552звёзд репо create-issue Скилл, который оформляет GitHub issue по шагам: собирает данные, изучает код, пишет описание на английском и ставит метки. Пригодится, когда лень вручную разбираться с шаблоном и gh label list. CX Codex +1 ★ 1 552звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой