Claude-skill-registry ic-migrate
Migrate old IC10 code to work with current Stationeers version. Use when user has legacy IC10 scripts that don't work due to game updates or breaking changes.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/ic-migrate" ~/.claude/skills/majiayu000-claude-skill-registry-ic-migrate && rm -rf "$T"
skills/data/ic-migrate/SKILL.mdIC10 Code Migration
Update old IC10 code to work with current Stationeers game version, handling breaking changes and deprecated features.
Workflow
1. Analysis Phase
Use Task tool to spawn:
- Understand current code structurecode-analyzer
2. Migration Phase
Use Task tool to spawn:
- Apply version-specific transformationscode-migrator
3. Validation Phase
Use Task tool to spawn:
- Verify migrated code passes validationcode-validator
Version Detection
The migrator will detect which version the code was written for based on patterns:
| Indicator | Detected Version | Breaking Changes |
|---|---|---|
| No tier handling for trading | Pre-Dec 2022 | Trading Update III |
| Old stack ops (no peek/poke) | Pre-Mar 2025 | "Big Changes Coming" |
| No TraderInstruction enum | Pre-Mar 2025 | Trading enhancement |
| Modern patterns present | Current | None |
Common Migration Scenarios
Trading Scripts (Pre-Dec 2022)
Problem: Old trading scripts don't handle tier system (Close/Medium/Far dishes)
Symptoms:
- Script tries to trade but doesn't work
- No dish tier detection
- Missing InterrogationProgress checks
Migration:
- Add tier constants (TIER_CLOSE, TIER_MEDIUM, TIER_FAR)
- Add dish tier detection logic
- Add interrogation progress checks before trading
- Update trading flow for 3-tier system
Stack Operations (Pre-Mar 2025)
Problem: Old code uses only push/pop, missing peek/poke
Symptoms:
- Stack operations limited
- Can't read stack without popping
- Inefficient stack management
Migration:
- Add peek operation for non-destructive reads
- Add poke operation for targeted writes
- Optimize stack usage patterns
Batch Operations (Outdated Hashes)
Problem: Prefab hashes may have changed in game updates
Symptoms:
- Batch operations don't affect devices
- Errors like "device not found"
Migration:
- Verify hashes against
knowledge/hashes/device-hashes.md - Update all
/lb
operations with current hashessb - Test in-game to verify
Instructions
When user requests code migration:
-
Identify the code's approximate age
- Ask: "When was this code written?"
- Analyze code patterns for version indicators
- Note which breaking changes likely apply
-
Launch code-migrator with:
- The old IC10 code
- Detected version
- Target version (current game)
-
Review migration report
- Check which breaking changes were applied
- Verify transformations make sense
- Note any features requiring in-game testing
-
Present migrated code
- Show before/after comparisons for key sections
- Highlight breaking changes addressed
- Explain migration strategy
-
Provide testing recommendations
- List features that need in-game verification
- Suggest test scenarios
- Note any remaining uncertainties
Example Triggers
- "Update this old script"
- "This code doesn't work anymore"
- "Migrate from pre-2022 version"
- "Trading script broken after update"
- "Update for current Stationeers version"
- "Fix deprecated features"
Output Format
After migration completes, respond with:
## Migration Report: [Script Name] ### Version Detection **Original Version**: Pre-Dec 2022 (no tier handling) **Target Version**: Current (Dec 2025) **Breaking Changes Applied**: 3 (Trading tiers, InterrogationProgress, Stack ops) ### Transformations | Change | Lines | Status | |---------|-------|--------| | Added tier detection | 12 | ✅ | | Added interrogation handling | 8 | ✅ | | Updated stack operations | 5 | ✅ | ### Migrated Code ```ic10 [Full migrated code with migration comments]
In-Game Testing Required
⚠️ Features to verify in-game:
- Dish tier detection - Verify Close/Medium/Far dish logic
- InterrogationProgress - Test interrogation timing works
- Peek/poke operations - Confirm stack operations work
Testing Checklist
- Load migrated code into IC Housing
- Test with Close/Medium/Far dishes
- Verify trading completes successfully
- Check stack operations work as expected
- Verify no CPU overrun errors
## Notes - Migration is based on documented breaking changes - Some features require in-game verification - Original code intent is preserved - Modern best practices are applied during migration - Line count constraints are maintained ## Related Skills - `ic-debug` - For fixing specific bugs in migrated code - `ic-test` - For verifying migrated code logic - `ic-validate` - For checking migrated code constraints