diff --git a/README.md b/README.md index 05fdaaf..040f2a6 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,7 @@ diffity list --json # machine-readable output | `DIFFITY_HOST` | Hostname used in the printed URL (default: `localhost`). | | `DIFFITY_BIND` | Interface the server listens on (default: `127.0.0.1`). | | `DIFFITY_DATA_DIR` | Where review notes are kept (default: `~/.diffity/`). | +| `DIFFITY_SYNC_DEV_SKILLS` | Set to `1` to have a build install the `diffity-dev-*` skills into `~/.claude/skills`. | Useful when running diffity inside a VM or container and opening it from another machine: diff --git a/bin/diffity b/bin/diffity new file mode 120000 index 0000000..67c6055 --- /dev/null +++ b/bin/diffity @@ -0,0 +1 @@ +../lib/node_modules/diffity/dist/index.js \ No newline at end of file diff --git a/scripts/build-skills.ts b/scripts/build-skills.ts index 141ec07..7bbf104 100644 --- a/scripts/build-skills.ts +++ b/scripts/build-skills.ts @@ -30,8 +30,10 @@ writeFile( ); console.log(`Skills hash: ${skillsHash}`); -if (process.env.DIFFITY_SKIP_DEV_SKILLS || !homeDir) { - console.log('Skipped dev skills sync'); +// Opt-in: a build should not write into the user's home directory unless asked. The dev skills +// exist to drive the `diffity-dev` binary from this checkout, which is not what most builds want. +if (!process.env.DIFFITY_SYNC_DEV_SKILLS || !homeDir) { + console.log('Skipped dev skills sync (set DIFFITY_SYNC_DEV_SKILLS=1 to install them)'); } else { cleanManagedSkills(globalClaudeSkillsDir, DEV_SKILL_PREFIX); for (const skill of skills) {