Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

project-migration项目迁移

Agent Skill

project-migration 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

766

周安装

31

GitHub Stars

公开资料未说明

下载量

241
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:project-migration(项目迁移)
来源仓库:https://github.com/loxosceles/ai-dev
仓库路径:skills/project-migration
安装命令:
npx skills add https://github.com/loxosceles/ai-dev --skill project-migration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/loxosceles/ai-dev --skill project-migration

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合项目协作场景。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息整理和跟踪。
  • 支持对 GitHub 相关数据进行分类、筛选和状态管理。
  • 安装命令:npx skills add https://github.com/loxosceles/ai-dev --skill project-migration。
  • 建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。

SKILL.md

Project Migration

This is a strict guideline. Follow these rules exactly.

Migrate an existing project to the current infrastructure and tooling standards. Unlike project-setup (which scaffolds from scratch), this skill works with existing code and configs — it must be non-destructive and interactive.


Core Principles

  • Never overwrite without asking. If a config file already exists, present a diff of what would change and ask before replacing.
  • Work on a branch. All changes happen on a dedicated branch. Rollback is a branch reset.
  • Ask early, not late. When intent is ambiguous (e.g., a custom eslint config that partially overlaps with the standard), ask whether to merge, replace, or skip. Do not assume.
  • Fragments are the source of truth. Use fragment files from loxosceles/project-blueprints for all standard configs. Common fragments (fragments/common/) are assembled with stack-specific injections (fragments/injections/{stack}/) and Dockerfiles (fragments/dockerfiles/{stack}/). The result is one clean file per output — no runtime includes or sourcing. Do not improvise alternatives.
  • devcontainer-state is the shared config repo. All containers mount from ~/.devcontainer-state (overridable via DEVCONTAINER_STATE env var). SSH and AWS use ${SSH_PATH:-~/.ssh} and ${AWS_PATH:-~/.aws}. All mounts are directories — no file mounts.

Workflow

Phase 1: Assessment

  1. Pre-flight: Verify devcontainer-state: Before anything else, check that ~/.devcontainer-state/.git exists. If it doesn't, stop immediately and instruct: ⛔ ~/.devcontainer-state is not a git repo. Docker will auto-create mount targets as empty root-owned directories, breaking the devcontainer. Fix: git clone git@github.com:loxosceles/devcontainer-state.git ~/.devcontainer-state If ~/.devcontainer-state already exists (empty/root-owned), remove it first: sudo rm -rf ~/.devcontainer-state Do not proceed until this is resolved.
  2. Identify the project type. Ask the user what stack this is (e.g., Next.js + SST, Python services, static frontend). This determines which blueprint to reference.
  3. Read the matching blueprint from loxosceles/project-blueprints to understand the target state.
  4. Audit the current project. Check for the existence and content of:

- .devcontainer/ (Dockerfile, docker-compose.yml, devcontainer.json, post_create.sh, post_start.sh) - Linting/formatting (eslint config, prettier config,.prettierignore) - CI/CD (.github/workflows/) - Editor config (.vscode/settings.json) - Project config (.gitignore, .npmrc, .envrc, .env_TEMPLATE) - Skills setup (skills-lock.json, .agents/) - Husky / lint-staged - Docs structure (docs/) - MCP server config (~/.devcontainer-state/ai/mcp/servers.json)

  1. Present a migration plan. List every file that will be added, updated, or left alone. Group by category (devcontainer, linting, CI/CD, etc.). For each existing file that would change, note whether it's a replace, merge, or skip — and flag items that need user input.

Do not proceed past this phase without user confirmation of the plan.

Phase 2: Branch Setup

  1. Check for a dev branch. If it exists, branch from it. Otherwise branch from main (or the current default branch).
  2. Create the migration branch: git checkout -b chore/migrate-project-setup
  3. Verify clean working tree. If there are uncommitted changes, stop and ask the user to commit or stash first.

Phase 3: Execute Migration

Work through the plan category by category. After each category, commit the changes with a descriptive message (e.g., chore: Add devcontainer configuration).

Devcontainer

  • If .devcontainer/ does not exist, copy all fragment files from project-blueprints/fragments/devcontainer/.
  • If .devcontainer/ exists, compare each file against the fragment version:

- Identical or trivially different (only project name differs): replace silently. - Structurally different (custom volumes, extra packages, different base image): present both versions and ask which parts to keep.

  • Create .devcontainer/.env from template. Ask for PROJECT_NAME, GIT_NAME, GIT_EMAIL if not inferrable from git config.
  • Replace {{project_name}} in all fragment files.
  • Pre-create host mount targets. Only per-project cache directories need pre-creation (Docker creates them correctly as directories). The shared data/zsh_history_tmux/ directory already exists in the devcontainer-state repo via .gitkeep. After creating the devcontainer files, run: PROJECT=<project-name> mkdir -p ~/.devcontainer-state/cache/${PROJECT}/claude mkdir -p ~/.devcontainer-state/cache/${PROJECT}/kiro/agents mkdir -p ~/.devcontainer-state/cache/${PROJECT}/kiro/settings
  • Verify MCP server config. Check that ~/.devcontainer-state/ai/mcp/servers.json exists. If not, warn the user to copy from servers.json.template and add credentials.
  • Verify devcontainer scripts. The setup uses two scripts:

- post_create.sh — runs once after container creation (validation, symlinks, git identity, agent seeding, skills restore) - post_start.sh — runs on every container start (Claude CLI install/update, Claude settings copy, MCP server distribution) - devcontainer.json must have both postCreateCommand and postStartCommand.

Linting & Formatting

  • If no eslint/prettier config exists, copy fragments.
  • If configs exist, present the diff and ask: replace with standard, merge, or skip.
  • Preserve project-specific eslint blocks. The fragment eslint config is a baseline. If the project has additional blocks (e.g., cli/**/*.ts), keep them when replacing — merge the fragment with the project-specific additions.
  • Check package.json for required devDependencies (eslint, prettier, husky, lint-staged). Add missing ones.

CI/CD

  • If .github/workflows/ does not exist, copy all workflow fragments.
  • If workflows exist, compare each one. Present diffs for any that differ from fragments.
  • Note: If the project uses a newer version of a CI action than the fragment (e.g., pnpm/action-setup@v5 vs fragment's @v4), keep the newer version and flag the fragment as needing an update.

Editor Config

  • If .vscode/settings.json does not exist, copy fragment.
  • If it exists, merge — add missing keys, flag conflicting keys for user decision.
  • Generate a unique statusBar.background color if not already set.

Project Config

  • .gitignore: merge — append missing entries from the fragment, never remove existing entries.
  • .npmrc, .envrc, .env_TEMPLATE: copy if missing, ask if existing version differs.

Skills & Agents

  • Use the --agent flag to limit installation to only the agents we use: npx skills add loxosceles/ai-dev --agent claude-code github-copilot codex kiro-cli -y Without --agent, using --yes installs for ALL agents (dozens of directories). Without --yes, it prompts interactively (won't work in scripts).
  • The skills/ directory is always created by the installer as a symlink convenience folder. It cannot be prevented — just gitignore it.
  • .gitignore must include: .agents/, .claude/skills/, .kiro/skills/, skills/
  • Ask about additional third-party skills (e.g., anthropics/claude-code, browser-use/browser-use).
  • Kiro agents are seeded from devcontainer-state/ai/agents/kiro/ into ~/.kiro/agents/ by post_create.sh on first run. They persist in the per-project kiro cache mount.
  • Codex agents are symlinked from devcontainer-state/ai/agents/codex/ into .github/agents/ by post_create.sh on every container start. .github/agents/ is gitignored.
  • Both agent mounts are overridable via KIRO_AGENTS and CODEX_AGENTS env vars in .devcontainer/.env.

Husky & Lint-Staged

  • If not configured, initialize: npx husky init, set pre-commit hook to pnpm exec lint-staged.
  • If already configured, check the hook content. Ask before modifying.

Docs Structure

  • Create docs/architecture/, docs/guides/, docs/reference/ with .gitkeep if they don't exist.
  • Never touch existing docs content.

Phase 4: Verification

Run the appropriate checks for the project type:

pnpm lint          # or equivalent
pnpm format:check  # or equivalent
pnpm build         # if applicable
pnpm test          # if applicable

If any check fails, debug and fix. If the fix requires changing something the user approved in the plan, ask again before modifying.

Phase 5: Summary

Present a summary of everything that was done:

  • Files added
  • Files modified (with what changed)
  • Files left untouched (and why)
  • Branch name and how to merge or rollback

Rules

  • Git remotes must use SSH, never HTTPS: git@github.com:user/repo.git
  • Template variables use {{double_braces}} syntax
  • Commit after each category, not at the end — this makes partial rollback possible
  • If a fragment doesn't work with the project's current tool versions, report the conflict and ask
  • Never modify source code files (components, pages, lib, etc.) — only infrastructure and config
  • Never remove entries from .gitignore — only append
  • Consistency with project-setup: This skill and project-setup must produce identical results for shared concerns (devcontainer, skills, kiro, linting, CI/CD). If you detect a discrepancy between what this skill instructs and what project-setup does, stop and warn the developer before proceeding.

Progressive Improvement

If the developer corrects a behavior that this skill should have prevented, suggest a specific amendment to this skill to prevent the same correction in the future.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.39%
按下载量换算80

Claude

31.71%
按下载量换算76

Cursor

19.35%
按下载量换算47

Gemini CLI

10.18%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills