# Migrate Global Code

> Migrates global code from a Kentico Xperience 13 project to Xperience by Kentico. Sets up the target project structure, generates code files, and migrates shared code including localization, styles, business logic, and project startup configuration. Use when starting a KX13 to XbyK codebase migration.

- **Type:** Skill
- **Install:** `agentstack add skill-kentico-xperience-by-kentico-kenticopilot-migrate-global-code`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Kentico](https://agentstack.voostack.com/s/kentico)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Kentico](https://github.com/Kentico)
- **Source:** https://github.com/Kentico/xperience-by-kentico-kenticopilot/tree/main/plugins/kx13-codebase-migration/skills/migrate-global-code

## Install

```sh
agentstack add skill-kentico-xperience-by-kentico-kenticopilot-migrate-global-code
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

You are tasked with the process of migrating global code from a Kentico Xperience 13 project to an Xperience by Kentico project.

## Structure of the projects

You are currently located in the root folder, which contains two subfolders:

- `KX13/` - This folder contains the Kentico Xperience 13 project files. This is the legacy/source project.
- `XbyK/` - This folder contains the Xperience by Kentico project files. This is the new project.

## Migration Steps

1. Review the structure of both the legacy and new project.
2. Use Kentico Docs MCP to read the following page: https://docs.kentico.com/guides/upgrade-to-xbyk/upgrade-walkthrough/adjust-global-code (note that this guide is written for a sample project and that there will be some differences between the sample project and the project you are migrating)
3. Create a new project for generated code files (named {ProjectName}.Entities).
   1. Configure given project as described in the documentation.
   2. **CRITICAL:** Ensure the .csproj file contains the following (without this, content item reference fields will fail to populate):
      ```xml
      
        
      
      ```
4. Generate code files by running the `--kxp-codegen` command as described in the documentation. Always use `--skip-confirmation` flag to avoid interactive prompts
5. Copy relevant global code from source project to the new project.
   1. Localization
   2. Shared views
   3. Styles and scripts
   4. Identifiers
   5. Services registration
6. Configure the project to display content.
   1. Enable Content tree-based routing and Page Builder.
   2. Add future custom service registrations and localization.
7. Ensure that the new project builds successfully without errors and warnings. If it doesn't, some part of the documentation was not followed correctly. Fix the issues based on the docs page.

Notes relevant to the migration process:

- Do not change any other files or settings outside of the global code migration process (that are not mentioned in the docs page).
- When commenting out code, always add "TODO:" note to make it easier to find later.

## Output format

When done, provide the user with this exact output (without any additional text):

```
# Migration Complete
Global code migration from the legacy project to the new one has been successfully completed.

**Next steps:**
- Update your channel configuration to include the port of the local XbyK instance (the one the project launches with).
    Follow these steps: https://docs.kentico.com/guides/upgrade-to-xbyk/upgrade-walkthrough/adjust-global-code#adjust-system-url
- Review the changes to ensure everything looks as expected.
- Continue with the migrate-page-widgets skill to migrate Page Builder widgets used by the specified page.
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Kentico](https://github.com/Kentico)
- **Source:** [Kentico/xperience-by-kentico-kenticopilot](https://github.com/Kentico/xperience-by-kentico-kenticopilot)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-kentico-xperience-by-kentico-kenticopilot-migrate-global-code
- Seller: https://agentstack.voostack.com/s/kentico
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
