.claude/skills/windows-developer/SKILL.md
# Windows Developer Guide ## When to Load Automatically loaded on Windows (`platform_trigger: "win32"`). Applies to: `.py`, `.ps1`, `.bat`, `.cmd` files and any Windows-specific workflow. ## Python on Windows ### Encoding (CRITICAL) Windows defaults to `cp1251` / `cp1252` for file I/O. Always specify UTF-8 explicitly: ```python with open("file.txt", "r", encoding="utf-8") as f: content = f.read() Path("file.txt").read_text(encoding="utf-8") Path("file.txt").write_text(content, encodin
npx skillsauth add pyramidheadshark/ml-claude-infra .claude/skills/windows-developerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automatically loaded on Windows (platform_trigger: "win32").
Applies to: .py, .ps1, .bat, .cmd files and any Windows-specific workflow.
Windows defaults to cp1251 / cp1252 for file I/O. Always specify UTF-8 explicitly:
with open("file.txt", "r", encoding="utf-8") as f:
content = f.read()
Path("file.txt").read_text(encoding="utf-8")
Path("file.txt").write_text(content, encoding="utf-8")
import json
json.load(open("data.json", encoding="utf-8"))
At script entry point, reconfigure stdout:
import sys
sys.stdout.reconfigure(encoding="utf-8")
sys.stderr.reconfigure(encoding="utf-8")
For subprocess calls:
subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8")
Use python (not python3) on Windows. The python3 alias is not reliably available.
python -m pytest tests/
python -m pip install -e .
python scripts/run.py
Use pathlib.Path or os.path — never hardcode forward/backslashes:
from pathlib import Path
config = Path(__file__).parent / "config" / "settings.json"
Git Bash handles UTF-8 well by default. Recommended as primary shell.
Set code page to UTF-8 before running scripts:
chcp 65001
PowerShell profile setup:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
Set globally for consistent behavior:
[Environment]::SetEnvironmentVariable("PYTHONIOENCODING", "utf-8", "User")
git config core.autocrlf truetempfile.NamedTemporaryFile(delete=False) — Windows cannot open a temp file while it's heldtaskkill /F /PID instead of kill -9onerror handler for read-only files:import shutil, stat
def rm_readonly(func, path, _):
os.chmod(path, stat.S_IWRITE)
func(path)
shutil.rmtree(dir_path, onerror=rm_readonly)
testing
# Design Doc Creator ## When to Load This Skill Load when: design documents, requirements, new project start. Short fixture skill for testing (optional/meta skill).
development
# Test-First Patterns ## When to Load This Skill Load when writing tests, creating `.feature` files, setting up conftest, discussing test strategy, or reviewing coverage. ## Philosophy Tests are written BEFORE code. Always. No exceptions. The order is: Design Doc → BDD Scenarios → Unit Tests → Implementation. BDD scenarios come from the design document's use cases section — they are a direct translation of business requirements into executable specifications. This makes tests the living do
testing
# Skill: Supply Chain Auditor ## When to Load Auto-load when: adding dependencies, reviewing packages, updating versions, or discussing `requirements.txt`, `pyproject.toml`, `package.json`. Triggers on `dependency`, `install`, `package`, `CVE`, `audit`, `vulnerable` (≥2 keywords). ## Core Rules Every new dependency addition must pass this checklist before merging: 1. **Pinned** — exact version in production (`==1.2.3` for pip, `"1.2.3"` for npm, not `^` or `~`). 2. **Maintained** — last com
development
# Skill Developer ## When to Load This Skill Load when: creating a new skill, modifying an existing skill, updating `skill-rules.json`, evaluating skill quality, or refactoring the skill library. ## Skill Anatomy Every skill follows this structure: ``` .claude/skills/{skill-name}/ ├── SKILL.md # main file — MUST be under 500 lines └── resources/ ├── topic-1.md # deep-dive subsections — under 500 lines each └── topic-2.md ``` `SKILL.md` is the entry point