Portabilize hardcoded C:\Users\bowei paths across skill docs

Replace machine-specific C:\Users\bowei\... paths in 7 skill docs with
%USERPROFILE% / $env:USERPROFILE (or $USERPROFILE in Git Bash blocks).
Conda paths use a two-layout resolver (miniconda3\envs vs .conda\envs) or
reference ~\skills_env.md CONDA_LANGGRAPH_PYTHON, since the conda location
is machine-specific. Fixes paths that resolved wrong on non-bowei machines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
bowei
2026-07-20 20:35:43 +08:00
co-authored by Claude Opus 4.8
parent 2ad9206a88
commit fbfa060b67
7 changed files with 48 additions and 45 deletions
+6 -6
View File
@@ -160,7 +160,7 @@ Codex CLI 是 OpenAI 发布的命令行代码审查工具,以 npm 全局包形
在 PowerShell 中运行:
```powershell
$condaEnvPath = (C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph python -c "import sys; print(sys.prefix)").Trim()
$condaEnvPath = (& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph python -c "import sys; print(sys.prefix)").Trim()
$codexCmd = Join-Path $condaEnvPath "codex.cmd"
if (Test-Path $codexCmd) {
Write-Host "[OK] Codex CLI 已安装: $codexCmd"
@@ -176,12 +176,12 @@ if (Test-Path $codexCmd) {
首先确认 npm 可用(Node.js 需已安装在 conda 环境或系统 PATH 中):
```powershell
C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm --version
& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph npm --version
```
- **若 npm 可用**:执行安装:
```powershell
C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm install -g @openai/codex
& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph npm install -g @openai/codex
```
安装完成后,再次执行 2c-1 检查 `codex.cmd` 是否出现。若仍不存在,报告错误并停止,请用户手动检查 npm 全局安装路径。
@@ -192,7 +192,7 @@ C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm --version
### 2c-3. 验证 Codex CLI 可执行
```powershell
$env:CODEX_HOME = "C:\Users\bowei\.codex"
$env:CODEX_HOME = "$env:USERPROFILE\.codex"
cmd /c "$codexCmd" --version
```
@@ -203,7 +203,7 @@ cmd /c "$codexCmd" --version
### 2c-4. 验证 Codex Auth
Codex CLI 的认证 token 存储在 `$CODEX_HOME\auth.json`(默认 `C:\Users\bowei\.codex\auth.json`)。
Codex CLI 的认证 token 存储在 `$CODEX_HOME\auth.json`(默认 `%USERPROFILE%\.codex\auth.json`)。
```powershell
$codexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { "$env:USERPROFILE\.codex" }
@@ -226,7 +226,7 @@ if (Test-Path $authFile) {
- **若 `$authOk = $true`**:继续进入 Step 3。
- **若 `$authOk = $false`**:停止并提示:
> "Codex CLI 尚未完成认证,或认证已失效。请在终端运行 `codex` 并按提示完成 ChatGPT OAuth 登录,登录成功后 auth.json 将自动写入 `C:\Users\bowei\.codex\`。完成后重新触发本技能或手动继续到 Step 3。"
> "Codex CLI 尚未完成认证,或认证已失效。请在终端运行 `codex` 并按提示完成 ChatGPT OAuth 登录,登录成功后 auth.json 将自动写入 `%USERPROFILE%\.codex\`。完成后重新触发本技能或手动继续到 Step 3。"
**在用户确认认证完成之前,不继续后续步骤。**