skill-creator: Windows incompatibility in run_eval.py — select.select on subprocess.PIPE fails (WinError 10038)

Resolved 💬 2 comments Opened May 27, 2026 by Talsmlar Closed May 31, 2026

Skill-creator run_eval.py Windows-incompatible (select.select on PIPE)

priority : medium
found-during : D-031 — running skill-creator official protocol on header-pattern skill (2026-05-27)
status : patched locally, NOT contributed upstream
target : Anthropic claude-plugins-official marketplace (upstream repo URL TBD via research)

Context

Per Anthropic's official skill-creator plugin protocol, ran python -m scripts.run_eval and scripts.run_loop to optimize the header-pattern skill's description. Both immediately failed on Windows with :

Warning: query failed: [WinError 10038] An operation was attempted on something that is not a socket

Root cause : scripts/run_eval.py:108 uses select.select([process.stdout], [], [], 1.0). Python on Windows does not support select.select() on subprocess.PIPE file descriptors — only sockets. This is documented Python-on-Windows behavior.

Affected file in plugins cache : ~/.claude-webapp/plugins/cache/claude-plugins-official/skill-creator/unknown/skills/skill-creator/scripts/run_eval.py

Proposed change

Replace the Unix-specific polling with a cross-platform thread + queue reader :

import queue, threading

_IS_WINDOWS = sys.platform == "win32"

def _read_stream_to_queue(stream, q):
    try:
        while True:
            chunk = stream.read(8192)
            if not chunk: break
            q.put(chunk)
    except Exception: pass
    finally: q.put(None)

# In run_single_query, replace select.select on PIPE with :
if _IS_WINDOWS:
    win_queue = queue.Queue()
    win_reader = threading.Thread(
        target=_read_stream_to_queue,
        args=(process.stdout, win_queue),
        daemon=True,
    )
    win_reader.start()
    # then pull from win_queue with timeout=1.0 in main loop

Full patched version : ~/.claude-webapp/plugins/cache/claude-plugins-official/skill-creator/unknown/skills/skill-creator/scripts/run_eval.py
Backup of original : run_eval.py.bak-pre-windows-patch

Files

  • scripts/run_eval.py (lines 11-12, 22-30, 95-145 approx) — Windows fork
  • scripts/run_loop.py — should benefit transitively (no direct changes)

Effort

~30 min testing + write PR description. Patch already exists locally.

Verification

After patch, single-query test on Windows : python -c "from scripts.run_eval import run_single_query; ..." returns TRIGGERED: True as expected. Multi-iteration loop also runs cleanly (verified — 3 iterations completed in ~30 min wall-clock).

Verification command

PYTHONUTF8=1 PYTHONIOENCODING=utf-8 python -m scripts.run_eval \
  --eval-set <eval-set>.json \
  --skill-path <skill-path> \
  --num-workers 1 --runs-per-query 1 --timeout 30 --verbose

Notes

  • Encoding fix also needed (PYTHONUTF8=1) — scripts/utils.py uses read_text() without explicit encoding='utf-8', defaults to cp1252 on Windows which can't read Unicode arrows/em-dashes in SKILL.md. Could be bundled in same PR with encoding='utf-8' arg.
  • License : Apache 2.0 (compatible with contribution back)
  • Author : Anthropic (support@anthropic.com per plugin.json)
  • Upstream repo URL : TBD (to be researched — likely github.com/anthropics/claude-code-plugins or claude-plugins)

Filing target

Confirmed via research 2026-05-27 : anthropics/claude-code GitHub issues (Anthropic's triage repo for all first-party Claude Code components including bundled plugins). claude-plugins-official itself has no public source repo per plugin.json (no repository field).

gh issue create --repo anthropics/claude-code --title "skill-creator: Windows incompatibility in run_eval.py — select.select on subprocess.PIPE fails (WinError 10038)" --body-file <this-backlog-file>

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗