migration-guide-generation
Skill0 starsChanged 3 months agoMITView on GitHub
The migration-guide-generation skill creates detailed, actionable migration documentation for breaking changes. It generates before/after code examples, step-by-step instructions, and identifies affected tools to help users upgrade smoothly. json { "name": "John Doe", "email": "john@example.com" } json { "full_name": "John Doe", "email": "john@example.com" } json { "name": "John Doe", "email": "john@example.com" } json { "full_name": "John Doe", "email": "john@example.com", "age": 30 }
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- change-detectionSkill
- changelog-generationSkill
- cli-developmentSkill
- config-loaderSkill
- github-actionSkill
- git-integrationSkill
- json-diffSkill
- performance-optimizationSkill
- schema-discoverySkill
- security-auditSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 300
Lazy example generation: Only generate examples for changes that need them
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Migration Guide Generation Skill
Purpose
The migration-guide-generation skill creates detailed, actionable migration documentation for breaking changes. It generates before/after code examples, step-by-step instructions, and identifies affected tools to help users upgrade smoothly.
Capabilities
1. Automated Migration Guide Creation
- Generate migration guides from breaking changes
- Include before/after code examples
- Provide step-by-step migration instructions
- Identify affected tools and fields
2. Code Example Generation
- Generate JSON examples (language-agnostic)
- Support multiple programming languages (TypeScript, Python, Go)
- Show field mappings and type conversions
- Include nested object transformations
3. Affected Tools Analysis
- Identify which tools are affected by each change
- List fields that require migration
- Calculate migration effort estimates
- Provide impact summaries
Usage Examples
Basic Migration Guide Generation
import { MigrationGuideGenerator } from '@reaatech/mcp-changelog/migration';
const generator = new MigrationGuideGenerator();
const guide = await generator.generate({
version: '2.0.0',
changes: [
{
type: 'breaking',
category: 'field_renamed',
toolName: 'createUser',
path: 'inputSchema.properties.name',
description: 'Field "name" renamed to "full_name"',
oldValue: { type: 'string' },
newValue: { type: 'string' }
},
{
type: 'breaking',
category: 'field_added',
toolName: 'createUser',
path: 'inputSchema.properties.age',
description: 'Required field "age" added without default',
oldValue: undefined,
newValue: { type: 'number' }
},
{
type: 'breaking',
category: 'tool_removed',
toolName: 'legacySearch',
description: 'Tool "legacySearch" removed',
}
],
oldSchema: v1Schema,
newSchema: v2Schema
});
console.log(guide.markdown);Output:
# Migration Guide for v2.0.0
## Breaking Change: Field Rename in `createUser`
### What Changed
The `name` field has been renamed to `full_name`.
### Before (v1.x)
```json
{
"name": "John Doe",
"email": "john@example.com"
}After (v2.x)
{
"full_name": "John Doe",
"email": "john@example.com"
}Migration Steps
- Update all
createUsercalls to usefull_nameinstead ofname - Search codebase for
.namereferences in user creation contexts - Update any stored data mappings
Breaking Change: Required Field Added to createUser
What Changed
A new required field age has been added without a default value.
Before (v1.x)
{
"name": "John Doe",
"email": "john@example.com"
}After (v2.x)
{
"full_name": "John Doe",
"email": "john@example.com",
"age": 30
}Migration Steps
- Add
ageparameter to allcreateUsercalls - If age is unknown, consider adding a default value on the server side
- Update any client-side validation to accept the new field
Breaking Change: Tool Removal
What Changed
The legacySearch tool has been removed.
Migration Steps
- Replace
legacySearchcalls with thequerytool - Note:
queryhas a different response format (paginated) - Update response handling code accordingly
- Remove any
legacySearch-specific configuration
Summary
| Change | Tool | Action Required |
| Field renamed | createUser | Update field name in all calls |
| Required field added | createUser | Add age parameter to all calls |
| Tool removed | legacySearch | Migrate to query tool |
### With Multi-Language Examples
```typescript
import { MigrationGuideGenerator } from '@reaatech/mcp-changelog/migration';
const generator = new MigrationGuideGenerator({
languages: ['json', 'typescript', 'python']
});
const guide = await generator.generate({
version: '2.0.0',
changes: breakingChanges,
oldSchema: v1Schema,
newSchema: v2Schema,
includeCodeExamples: true
});
// Output includes examples in all three languagesConfiguration Options
interface MigrationGuideConfig {
// Version being migrated to
version: string;
// Breaking changes to document
changes: SchemaChange[];
// Old and new schemas for generating examples
oldSchema?: ToolSnapshot;
newSchema?: ToolSnapshot;
// Whether to include code examples
includeCodeExamples: boolean;
// Programming languages for examples
languages: string[];
// Whether to include affected tools summary
includeAffectedTools: boolean;
// Whether to include migration effort estimates
includeEffortEstimates: boolean;
}
const config: MigrationGuideConfig = {
version: '2.0.0',
changes: breakingChanges,
oldSchema: v1Schema,
newSchema: v2Schema,
includeCodeExamples: true,
languages: ['json', 'typescript', 'python', 'go'],
includeAffectedTools: true,
includeEffortEstimates: true
};Code Example Generation
JSON Examples (Default)
// Before (v1.x)
{ "name": "John", "email": "john@example.com" }
// After (v2.x)
{ "full_name": "John", "email": "john@example.com", "age": 30 }TypeScript Examples
// Before (v1.x)
const user = await client.createUser({
name: 'John Doe',
email: 'john@example.com'
});
// After (v2.x)
const user = await client.createUser({
full_name: 'John Doe',
email: 'john@example.com',
age: 30
});Python Examples
# Before (v1.x)
user = client.create_user(
name='John Doe',
email='john@example.com'
)
# After (v2.x)
user = client.create_user(
full_name='John Doe',
email='john@example.com',
age=30
)Best Practices
1. Always Include Before/After Examples
// Good: Clear before/after
### Before (v1.x)
```json
{ "name": "John" }After (v2.x)
{ "full_name": "John" }// Bad: No examples The field was renamed. Update your code.
### 2. Provide Actionable Steps
```typescript
// Good: Specific steps
// 1. Find all createUser calls: grep -r "createUser(" src/
// 2. Replace "name" with "full_name"
// 3. Add "age" parameter (use 0 if unknown)
// 4. Run tests to verify
// Bad: Vague instructions
// Update your code to use the new field name.3. Include Impact Assessment
// Good: Clear impact
// **Affected**: All clients using `createUser` tool
// **Effort**: ~30 minutes for typical codebase
// **Risk**: Low - straightforward field rename
// Bad: No context
// Breaking change detected.Performance Considerations
- Lazy example generation: Only generate examples for changes that need them
- Template caching: Cache example templates between runs
- Parallel generation: Generate examples for multiple changes concurrently
- Streaming output: Stream large guides to disk
Testing Strategies
describe('MigrationGuideGenerator', () => {
it('should generate migration guide with before/after examples', async () => {
const generator = new MigrationGuideGenerator();
const guide = await generator.generate({
version: '2.0.0',
changes: [{
type: 'breaking',
category: 'field_renamed',
toolName: 'createUser',
description: 'name → full_name',
oldValue: { type: 'string' },
newValue: { type: 'string' }
}],
oldSchema: v1Schema,
newSchema: v2Schema
});
expect(guide.markdown).toContain('Before (v1.x)');
expect(guide.markdown).toContain('After (v2.x)');
expect(guide.markdown).toContain('full_name');
});
it('should list affected tools', async () => {
const generator = new MigrationGuideGenerator();
const guide = await generator.generate({
version: '2.0.0',
changes: breakingChanges
});
expect(guide.affectedTools).toContain('createUser');
expect(guide.affectedTools).toContain('legacySearch');
});
it('should generate multi-language examples', async () => {
const generator = new MigrationGuideGenerator({
languages: ['json', 'typescript', 'python']
});
const guide = await generator.generate({
version: '2.0.0',
changes: breakingChanges,
includeCodeExamples: true
});
expect(guide.markdown).toContain('```json');
expect(guide.markdown).toContain('```typescript');
expect(guide.markdown).toContain('```python');
});
});Resources
- ARCHITECTURE.md - System architecture
- Migration Guide Generator section - Detailed module spec
- mcp-schema-evolution changelog skill - Related migration guide patterns
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

