agentleFS
pyramidheadsharkpyramidheadshark/claude-scaffold/.claude/skills/windows-developer/SKILL.md

windows-developer

Skill4 starsChanged 7 months agoMITArchived repositoryView on GitHub

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: At script entry point, reconfigure stdout: For subprocess calls: Use python (not python3) on Windows. The python3 alias is not reliably available. Use pathlib.Path or os.path — never hardcode forward/backslashes: Git Bash handles UTF-8 well by default. Recommended as primary shell. Set code page to UTF-8 before running scripts: PowerShell…

  • Installs packages

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use python (not python3) on Windows.

    line 41
  2. Very specific:

    Use pathlib.Path or os.path — never hardcode forward/backslashes:

    line 51
  3. Very specific:

    Temp files: Use tempfile.NamedTemporaryFile(delete=False) — Windows cannot open a temp file while it's held

    line 92
  4. Very specific:

    Process cleanup: Use taskkill /F /PID instead of kill -9

    line 93
  5. Very specific:

    Permission errors on rmtree: Use onerror handler for read-only files:

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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:

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")

Python Command

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

Path Handling

Use pathlib.Path or os.path — never hardcode forward/backslashes:

from pathlib import Path
config = Path(__file__).parent / "config" / "settings.json"

Terminal Encoding

Git Bash (Preferred for Claude Code)

Git Bash handles UTF-8 well by default. Recommended as primary shell.

CMD / PowerShell

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

Environment Variable

Set globally for consistent behavior:

[Environment]::SetEnvironmentVariable("PYTHONIOENCODING", "utf-8", "User")

Common Windows Pitfalls

  1. File locking: Windows locks open files — close handles before rename/delete
  2. Max path length: Enable long paths via Group Policy or registry if paths exceed 260 chars
  3. Line endings: Configure git: git config core.autocrlf true
  4. Temp files: Use tempfile.NamedTemporaryFile(delete=False) — Windows cannot open a temp file while it's held
  5. Process cleanup: Use taskkill /F /PID instead of kill -9
  6. Permission errors on rmtree: Use onerror 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)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.