migrate-htt
npx machina-cli add skill brennacodes/brenna-plugs/migrate-htt --openclawFiles (1)
SKILL.md
1.4 KB
<purpose>
Migrate heres-the-thing data between versions. Currently a stub -- v1.0.0 is the initial release with no prior data to migrate. Future versions will add migration logic here.
</purpose>
<steps>
<step id="check-version" number="1">
<description>Check Current Version</description>
<load-config>
Resolve the user's home directory (run `echo $HOME` via Bash). Use this absolute path for all file operations below -- never pass `~` to the Read tool.
1. Read `<home>/.things/config.json`
<if condition="config-missing">Tell the user: "Run `/things:setup-things` first." Then stop.</if>
2. Read `<home>/.things/heres-the-thing/preferences.json`
<if condition="prefs-missing">Tell the user: "No heres-the-thing installation found. Run `/heres-the-thing:setup-htt` first." Then stop.</if>
</load-config>
</step>
<step id="report" number="2">
<description>Report Status</description>
<completion-message>
heres-the-thing v1.0.0 -- no migrations needed.
This is the initial release. Future versions will add migration logic as the data schema evolves.
Current data location: `~/.things/heres-the-thing/`
</completion-message>
</step>
</steps>Source
git clone https://github.com/brennacodes/brenna-plugs/blob/main/plugins/heres-the-thing/skills/migrate-htt/SKILL.mdView on GitHub Overview
This skill scaffolds data migration for heres-the-thing between versions. As a v1.0.0 stub, there is currently no data to migrate, but it establishes the structure and checks needed to implement future migration logic when the data schema evolves.
How This Skill Works
It resolves the user’s home directory and uses absolute paths to locate config.json and preferences.json, then reports the current migration status. Since it’s a stub, no migration steps are executed yet; future versions will apply transformation logic based on detected version differences.
When to Use It
- Preparing for a future upgrade of heres-the-thing by validating environment and readiness.
- Verifying that a local installation exists and is properly configured before migrations.
- Checking current version and data location to assess migration needs.
- Running a dry-run to preview migration behavior without changes.
- Planning or testing migration workflows as new versions introduce schema changes.
Quick Start
- Step 1: Resolve $HOME and locate ~/.things/config.json and ~/.things/heres-the-thing/preferences.json; abort with setup guidance if missing.
- Step 2: Read the config and prefs to determine the current version and data location.
- Step 3: Run a status check to see the message like 'heres-the-thing v1.0.0 -- no migrations needed.'
Best Practices
- Run with --dry-run to safely simulate migrations.
- Always resolve the home directory and use absolute paths (no ~).
- Ensure both config.json and preferences.json exist before migrating.
- Check the reported version and data location in the status message before proceeding.
- Document and review future migration steps as the schema evolves.
Example Use Cases
- A user upgrades to a new version and runs migrate-htt to confirm there is nothing to migrate yet.
- New installation of heres-the-thing followed by migrate-htt to validate setup.
- After installation, migrate-htt reports current version and data location: ~/.things/heres-the-thing/.
- A maintainer outlines future migration logic by running migrate-htt in a dry run to sketch flow.
- A support script executes migrate-htt --dry-run to verify environment before any migration.
Frequently Asked Questions
Add this skill to your agents