feat: add active-platform skill (Win/Linux/macOS switcher)

- skills/active-platform/SKILL.md: default = Windows/PowerShell; trigger
  phrases in RU+EN switch the active platform for the session; per-platform
  conventions (chaining, paths, env vars, install scripts) documented
- dist/active-platform.skill: built archive
- .wiki/source/active-platform-decision.md: rationale (skill chosen over
  global CLAUDE.md / project memory; user wanted a discoverable, iterable
  artifact)
- scripts/build.sh: fix PS arg-passing — single-quotes were leaking into
  -Names value, so multi-arg builds on Windows were rejected with
  "not found in skills/"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-28 11:00:23 +03:00
parent 9f54068de0
commit 125007a35e
6 changed files with 130 additions and 2 deletions

View File

@@ -7,3 +7,4 @@ The agent updates this file whenever source/ changes.
- [repo-layout.md](source/repo-layout.md) — how the repo is organized: `skills/` sources, `dist/` builds, `scripts/` build & install
- [build-notes.md](source/build-notes.md) — why `build.ps1` exists, ZIP layout, PowerShell 5.1 backslash gotcha
- [active-platform-decision.md](source/active-platform-decision.md) — why we made `active-platform` a skill instead of a memory entry

View File

@@ -0,0 +1,33 @@
# Decision: `active-platform` skill
_2026-04-28._
## Problem
The user develops on multiple machines (Windows primary, Linux/macOS secondary). I was generating bash one-liners by default — wrong shell for their daily workstation. Need a way to make Windows/PowerShell the default and switch on a phrase.
## Options weighed
- **Project memory** — wrong scope (project-only, doesn't cross repos).
- **Global `~/.claude/CLAUDE.md`** — right scope, simple, but the user explicitly preferred a skill: "поживём со скиллом" (let's live with a skill and iterate).
- **New skill** ← chosen.
The user's reasoning for the skill route: it's a discoverable, shareable artifact that lives next to their other 12 skills, and it can evolve with the same edit/build/install loop.
## What the skill does
Switches command/example generation between Windows / Linux / macOS based on session signals. Default = Windows + PowerShell. Trigger phrases in RU + EN (e.g. "мы на винде", "we're on Linux"). The rule applies only to **user-facing output** — tool calls still follow the harness's `Shell:` line.
Full spec: [`skills/active-platform/SKILL.md`](../../skills/active-platform/SKILL.md).
## Why this is a skill, not memory
- **Discoverability:** appears in `available_skills` list, can be re-read or audited.
- **Cross-repo:** installed into `~/.claude/skills/`, applies in every session regardless of project.
- **Iterable:** lives in this repo's `skills/` so we can edit + reinstall as we learn what triggers and exceptions actually happen in practice.
## Open questions to revisit
- Are the trigger phrases comprehensive enough? Add real-world examples as they come up.
- WSL handling — currently treated as Linux. Reconsider if user has WSL-specific needs.
- macOS divergences (BSD coreutils, Homebrew) — minimal coverage now, expand if user actually uses macOS often.