Files
claude-skills/.wiki/source/active-platform-decision.md
vitya 125007a35e 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>
2026-04-28 11:00:23 +03:00

1.9 KiB
Raw Blame History

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.

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.