hgxszhj/https-github.com-zhaoxuya520-reverse-skill / skills
reverse-skill-router
FlaggedRoutes reverse engineering, exploitation, penetration testing, malware, mobile, firmware, browser automation, documentation, and security tasks to the appropriate specialist skill. Use when a task spans modules or the correct reverse-skill entrypoint is unclear.
scripts/test-client-neutral-bootstrap.ps1
View on GitHub#requires -Version 5
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$bootstrap = Join-Path $scriptDir 'bootstrap-reverse.ps1'
$toolDiscovery = Join-Path $scriptDir 'lib\ToolDiscovery.ps1'
$scratch = Join-Path ([System.IO.Path]::GetTempPath()) ('reverse-client-neutral-' + [guid]::NewGuid().ToString('n'))
$binDir = Join-Path $scratch 'bin'
$clientDir = Join-Path $scratch 'client'
$claudeConfig = Join-Path $clientDir 'claude.json'
$codexConfig = Join-Path $clientDir 'codex.toml'
New-Item -ItemType Directory -Force -Path $binDir, $clientDir | Out-Null
try {
foreach ($name in @('node', 'npm', 'npx')) {
$cmdPath = Join-Path $binDir ($name + '.cmd')
@('@echo off', 'if "%1"=="--version" echo 1.0.0', 'exit /b 0') | Set-Content -LiteralPath $cmdPath -Encoding ascii
}
$oldPath = $env:PATH
$oldClaudeConfig = $env:CLAUDE_MCP_CONFIG
$oldCodexConfig = $env:CODEX_CONFIG_PATH
$env:PATH = "$binDir;$oldPath"
$env:CLAUDE_MCP_CONFIG = $claudeConfig
$env:CODEX_CONFIG_PATH = $codexConfig
$defaultOutput = (& $bootstrap -Capability jshookmcp -SkipRefresh | Out-String)
if (Test-Path -LiteralPath $claudeConfig) { throw 'default bootstrap wrote Claude global config' }
if (Test-Path -LiteralPath $codexConfig) { throw 'default bootstrap wrote Codex global config' }
if ($defaultOutput -notmatch 'configured-not-ready') { throw 'default MCP bootstrap did not report configured-not-ready' }
$codexOutput = (& $bootstrap -Capability jshookmcp -SkipRefresh -McpHostTarget Codex | Out-String)
if (Test-Path -LiteralPath $claudeConfig) { throw 'Codex-only bootstrap wrote Claude config' }
if (-not (Test-Path -LiteralPath $codexConfig)) { throw 'Codex-only bootstrap did not write Codex config' }
if ((Get-Content -LiteralPath $codexConfig -Raw) -notmatch '(?m)^\[mcp_servers\.jshook\]\r?$') { throw 'Codex config missing jshook MCP block' }
if ($codexOutput -notmatch '"status"\s*:\s*"ready"') { throw 'Codex-only bootstrap did not report ready' }
. $toolDiscovery
$tool = Resolve-ReverseToolSpec -Name 'jshookmcp'
if ($tool.Available) { throw 'npx must not masquerade as jshookmcp tool availability' }
$state = Get-ReverseCapabilityState -Name 'jshookmcp'
if (-not $state.Registered) { throw 'Codex-only registration was not discovered' }
if (-not $state.RuntimeAvailable) { throw 'npx runtime was not detected' }
if (-not $state.Ready) { throw 'Codex registration plus npx runtime should be ready' }
Remove-Item -LiteralPath $codexConfig -Force
$claudeOutput = (& $bootstrap -Capability jshookmcp -SkipRefresh -McpHostTarget Claude | Out-String)
if (-not (Test-Path -LiteralPath $claudeConfig)) { throw 'Claude-only bootstrap did not write Claude config' }
if (Test-Path -LiteralPath $codexConfig) { throw 'Claude-only bootstrap wrote Codex config' }
$json = Get-Content -LiteralPath $claudeConfig -Raw -Encoding UTF8 | ConvertFrom-Json
if ($null -eq $json.mcpServers.jshook) { throw 'Claude config missing jshook MCP server' }
if ($claudeOutput -notmatch '"status"\s*:\s*"ready"') { throw 'Claude-only bootstrap did not report ready' }
Write-Host 'client-neutral PowerShell bootstrap/discovery regression passed'
}
finally {
if ($null -ne $oldPath) { $env:PATH = $oldPath }
$env:CLAUDE_MCP_CONFIG = $oldClaudeConfig
$env:CODEX_CONFIG_PATH = $oldCodexConfig
Remove-Item -LiteralPath $scratch -Recurse -Force -ErrorAction SilentlyContinue
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |