agentleFS
reaatechreaatech/mcp-changelog/skills/migration-guide-generation/SKILL.md

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 }

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
  1. Distinctive:

    Lazy example generation: Only generate examples for changes that need them

    line 300

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Update all createUser calls to use full_name instead of name
  2. Search codebase for .name references in user creation contexts
  3. 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

  1. Add age parameter to all createUser calls
  2. If age is unknown, consider adding a default value on the server side
  3. Update any client-side validation to accept the new field

Breaking Change: Tool Removal

What Changed

The legacySearch tool has been removed.

Migration Steps

  1. Replace legacySearch calls with the query tool
  2. Note: query has a different response format (paginated)
  3. Update response handling code accordingly
  4. Remove any legacySearch-specific configuration

Summary

ChangeToolAction Required
Field renamedcreateUserUpdate field name in all calls
Required field addedcreateUserAdd age parameter to all calls
Tool removedlegacySearchMigrate 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 languages

Configuration 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.