claude-skills/scripts/codex-install.bat
Alireza Rezvani ebbf6b0872
Some checks failed
Sync Codex Skills Symlinks / sync (push) Has been cancelled
fix: v2.14.0 audit P0/P1 fixes (plugin updates, Codex, mirrors, script paths, two script bugs) (#1048)
* fix(plugins): bump all plugins to 2.14.1 and gate unbumped changes

Claude Code caches plugins by version. 70 of 104 plugins changed between
v2.12.0 and v2.14.0 without a bump, so claude plugin update reported
"already at the latest version" and existing installs never received the
v2.13/v2.14 fixes. Every plugin moves to 2.14.1 so stale caches refresh once.

check_plugin_versions.py (G11, blocking in ci-quality-gate) fails when a
plugin's payload, including symlinked vendor files, changes without a higher
version, and when marketplace.json and plugin.json disagree.
bump_plugin_versions.py sets both together.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(codex): stop installing all skills by default

With the full library (~380 skills) Codex drops every skill description from
its prompt budget, so it cannot pick skills. codex-install.sh now asks for
--category (comma-separated), --skill or an explicit --all, lists categories
when run without arguments, and warns when more than ~100 skills are
installed. The Windows installer and install docs follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(gemini): link whole skill folders and drop duplicate mirror entries

Each .gemini/skills entry held only a SKILL.md symlink, so the relative
scripts/ and references/ a skill points to were missing. Entries are now
directory symlinks (Gemini CLI 0.65 discovers them). Dual-published copies
with identical SKILL.md are listed once, commands and agents that share a
skill's name are skipped, fixtures under assets/ and vendor/ re-exports are
excluded, discovery is sorted so reruns are stable, and stale generated
entries are pruned. gemini skills list: 20 conflicts -> 1 (handoff, fixed
next). GEMINI.md documents folder trust and fixes a dead example path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(handoff): rename the productivity skill to session-handoff

engineering/handoff and productivity/handoff both shipped a skill named
handoff. Claude Code namespaces them, but Codex, Gemini CLI, Vibe and Hermes
key skills by name and silently kept one. The productivity skill is now
session-handoff (handoff-productivity:session-handoff); its folder, plugin
manifest, hook script paths, command paths, mirrors, harness manifest and
docs page follow. /cs-handoff, /cs-handoff-setup and ~/.config/handoff are
unchanged; the plugin README carries a migration note.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(convert): include plugins whose SKILL.md is at the plugin root

convert.sh searched at -mindepth 4, which skipped boost-asio-pro, deepread,
hivemind, loop-library, minimalist, strict-api and swedish-mentor for every
converted tool (opencode, Cursor, Windsurf, Kilo, Augment, Aider,
Antigravity). It now searches from depth 2 and skips assets/ fixtures.
opencode conversion: 375 -> 382 skills.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(codex): keep skill-tester's sample fixture from loading as a skill

Codex scans installed skill folders recursively and picked up
skill-tester/assets/sample-skill/SKILL.md as 'sample-text-processor'.
The installer renames SKILL.md files under assets/ in the installed copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(plugins): address scripts via ${CLAUDE_PLUGIN_ROOT} in commands and agents

343 script invocations in 90 command/agent files across 36 plugins used
repo-relative or ../ paths. Plugin commands and agents run from the user's
project, so those paths only resolved inside a clone of this repo; in the
v2.14.0 evals the agent fell back to find / to locate scripts. Every one now
uses ${CLAUDE_PLUGIN_ROOT}/. Two cross-plugin calls (write-a-skill ->
karpathy-coder, c-level-agents cpo -> product-manager-toolkit) go through
vendor/ symlinks, per the repo's install-cache lesson.

check_paths.py (G1) now fails a plugin command or agent that invokes a
script without ${CLAUDE_PLUGIN_ROOT}; on the v2.14.0 tree it reports 279.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(month-end-close): treat opening-balance rows as balances and pair transpositions

On a bank and GL export that each begin with an 'Opening balance' row, the
matcher returned RECONCILED_WITH_ITEMS and told the user to book a 25,000.00
journal entry for the opening balance, and it reported a 7,980/7,890
transposition as two unrelated items. Opening rows are now balances: a
difference between them is reported as carried in from the prior period
(R5, blocks sign-off, never booked). Same-date digit transpositions pair into
one correcting entry. The GL file's 'memo' column is read as description.
The v2.14.0 eval fixture now proves 1,405.00 = 150 opening + 90
transposition + 1,200 outstanding check - 35 bank fee. Bundled copy synced.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* fix(coding-agent-rollout): flag connection-URL passwords and production MCP servers

On a committed .claude/settings.json holding
env.DATABASE_URL=postgresql://admin:<password>@prod-db... and
enabledMcpjsonServers: ["postgres-prod"], the linter flagged neither: the
env check only matched token formats and KEY/TOKEN/SECRET names. S11 now
catches a password embedded in any connection URL (BLOCKER in shared files),
and new S13 warns when a shared file pre-approves an MCP server whose name
marks it as production. Bundled copy synced; --sample output unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

* docs: changelog and lessons for the v2.14.0 audit fixes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uNBQ6tRS5P1dRsgNfK4Wh

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 09:50:05 +02:00

179 lines
4.3 KiB
Batchfile

@echo off
REM
REM Codex Installation Script for Claude Skills Library (Windows)
REM
REM Installs skills from this repository to your local Codex skills directory.
REM Uses direct copy (no symlinks) for Windows compatibility.
REM
REM Usage:
REM scripts\codex-install.bat [--all | --skill <name>]
REM
REM Options:
REM --all Install every skill (not recommended: with the full
REM library Codex drops skill descriptions; pick skills)
REM --skill <name> Install a single skill by name
REM --list List available skills
REM --help Show this help message
REM
setlocal enabledelayedexpansion
REM Configuration
set "CODEX_SKILLS_DIR=%USERPROFILE%\.codex\skills"
set "SCRIPT_DIR=%~dp0"
set "REPO_ROOT=%SCRIPT_DIR%.."
set "CODEX_SKILLS_SRC=%REPO_ROOT%\.codex\skills"
set "CODEX_INDEX=%REPO_ROOT%\.codex\skills-index.json"
REM Check for help
if "%1"=="--help" goto :show_help
if "%1"=="-h" goto :show_help
REM Check prerequisites
if not exist "%CODEX_SKILLS_SRC%" (
echo [ERROR] Codex skills directory not found: %CODEX_SKILLS_SRC%
echo [INFO] Run 'python scripts\sync-codex-skills.py' first to generate structure.
exit /b 1
)
REM Parse arguments
set "MODE="
set "TARGET="
:parse_args
if "%1"=="" goto :run_mode
if "%1"=="--all" (
set "MODE=all"
shift
goto :parse_args
)
if "%1"=="--skill" (
set "MODE=skill"
set "TARGET=%2"
shift
shift
goto :parse_args
)
if "%1"=="--list" (
set "MODE=list"
shift
goto :parse_args
)
echo [ERROR] Unknown option: %1
goto :show_help
:run_mode
echo.
echo ========================================
echo Claude Skills - Codex Installer
echo (Windows Version)
echo ========================================
echo.
if "%MODE%"=="list" goto :list_skills
if "%MODE%"=="skill" goto :install_skill
if "%MODE%"=="all" goto :install_all
echo [ERROR] Choose what to install: --skill ^<name^> or --all.
echo [INFO] --all installs every skill, which leaves Codex with skill names but no descriptions.
goto :show_help
:list_skills
echo Available skills:
echo.
for /d %%i in ("%CODEX_SKILLS_SRC%\*") do (
if exist "%%i\SKILL.md" (
echo - %%~ni
)
)
goto :end
:install_skill
if "%TARGET%"=="" (
echo [ERROR] Skill name required
exit /b 1
)
set "SKILL_SRC=%CODEX_SKILLS_SRC%\%TARGET%"
set "SKILL_DEST=%CODEX_SKILLS_DIR%\%TARGET%"
if not exist "%SKILL_SRC%" (
echo [ERROR] Skill not found: %TARGET%
exit /b 1
)
if not exist "%SKILL_SRC%\SKILL.md" (
echo [ERROR] Invalid skill (no SKILL.md): %TARGET%
exit /b 1
)
echo [INFO] Installing skill: %TARGET%
REM Create destination directory
if not exist "%CODEX_SKILLS_DIR%" mkdir "%CODEX_SKILLS_DIR%"
REM Remove existing
if exist "%SKILL_DEST%" rmdir /s /q "%SKILL_DEST%"
REM Copy skill
xcopy /e /i /q "%SKILL_SRC%" "%SKILL_DEST%"
echo [SUCCESS] Installed: %TARGET%
goto :end
:install_all
echo [INFO] Installing all skills to: %CODEX_SKILLS_DIR%
echo [WARNING] With every skill installed, Codex drops skill descriptions from its prompt.
echo [WARNING] Prefer installing the skills you use with --skill ^<name^>.
echo.
set "INSTALLED=0"
set "FAILED=0"
if not exist "%CODEX_SKILLS_DIR%" mkdir "%CODEX_SKILLS_DIR%"
for /d %%i in ("%CODEX_SKILLS_SRC%\*") do (
if exist "%%i\SKILL.md" (
set "SKILL_NAME=%%~ni"
set "SKILL_DEST=%CODEX_SKILLS_DIR%\%%~ni"
echo [INFO] Installing: %%~ni
if exist "!SKILL_DEST!" rmdir /s /q "!SKILL_DEST!"
xcopy /e /i /q "%%i" "!SKILL_DEST!" >nul
if errorlevel 1 (
echo [ERROR] Failed to install: %%~ni
set /a FAILED+=1
) else (
set /a INSTALLED+=1
)
)
)
echo.
echo [INFO] Installation complete: !INSTALLED! installed, !FAILED! failed
echo.
echo [SUCCESS] Skills installed to: %CODEX_SKILLS_DIR%
goto :end
:show_help
echo.
echo Codex Installation Script for Claude Skills Library (Windows)
echo.
echo Usage:
echo scripts\codex-install.bat [--all ^| --skill ^<name^>]
echo.
echo Options:
echo --all Install every skill (Codex then drops descriptions)
echo --skill ^<name^> Install a single skill by name
echo --list List available skills
echo --help Show this help message
echo.
echo Examples:
echo scripts\codex-install.bat --skill content-creator
echo scripts\codex-install.bat --list
goto :end
:end
endlocal