diff --git a/fft-analyse/SKILL.md b/fft-analyse/SKILL.md index a358302..ef55e4c 100644 --- a/fft-analyse/SKILL.md +++ b/fft-analyse/SKILL.md @@ -164,7 +164,7 @@ sign-extended and require no bit-width guess. When using hex columns, pass ## Skill Script Location ``` -C:\Users\bowei\.claude\skills\fft-analyse\scripts\fft_analyse.py +%USERPROFILE%\.claude\skills\fft-analyse\scripts\fft_analyse.py ``` Always use the **absolute path** when invoking from any working directory. diff --git a/fpga-goldenref-flow/SKILL.md b/fpga-goldenref-flow/SKILL.md index 9a16b6b..bc8e5f3 100644 --- a/fpga-goldenref-flow/SKILL.md +++ b/fpga-goldenref-flow/SKILL.md @@ -25,7 +25,7 @@ description: > ```powershell conda run -n langgraph python ` - "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` + "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` start --input-dir "E:\\Notes" --output-dir "E:\\fpga_runs" ``` @@ -41,10 +41,10 @@ conda run -n langgraph python ` | Item | Value | |---|---| | Root | `E:\LangGraph_Design\fpga-goldenref-flow` | -| Conda env | `langgraph` (`C:\Users\bowei\.conda\envs\langgraph`) | +| Conda env | `langgraph` (path 见 `~\skills_env.md` 的 `CONDA_LANGGRAPH_PYTHON`) | | Graph name | `fpga_goldenref_flow` (在 `langgraph.json` 里声明;进程内驱动直接 `build_graph()`) | | Default input dir | `Notes/` (contains PR00.md, Task00.md) | -| Helper script | `C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py` | +| Helper script | `%USERPROFILE%\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py` | --- @@ -63,7 +63,7 @@ conda run -n langgraph python ` Run the helper script using the `langgraph` conda environment: ```powershell conda run -n langgraph python ` - "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` + "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` start ` --input-dir "E:\\Notes" ` --output-dir "E:\\fpga_runs" @@ -100,7 +100,7 @@ Ask the user which model (use AskUserQuestion), offering **Opus 4.8 (default/rec **Fable 5**, **Sonnet 4.6**. Then resume with the choice: ```powershell conda run -n langgraph python ` - "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` + "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` resume --output-dir "E:\\fpga_runs" ` --plan-model opus # or: fable | sonnet | a full id like claude-opus-4-8 ``` @@ -137,7 +137,7 @@ Wait for the user's answer before proceeding to Step 3. **If the user approves:** ```powershell conda run -n langgraph python ` - "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` + "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` resume --output-dir "E:\\fpga_runs" ``` (Default behaviour is approved — no extra flag needed.) @@ -145,7 +145,7 @@ conda run -n langgraph python ` **If the user rejects:** ```powershell conda run -n langgraph python ` - "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` + "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` resume --output-dir "E:\\fpga_runs" ` --rejected --feedback "" ``` @@ -161,7 +161,7 @@ exit code 2 again with new plans — repeat Step 2. > 额度被占满,工作流已停在断点(状态已存 SQLite,不降级)。等 codex 空出来后从断点续跑: > ```powershell > conda run -n langgraph python ` -> "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` +> "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" ` > continue --output-dir "E:\\fpga_runs" > ``` diff --git a/fpga-imx6-flow/SKILL.md b/fpga-imx6-flow/SKILL.md index 02b5956..073f00b 100644 --- a/fpga-imx6-flow/SKILL.md +++ b/fpga-imx6-flow/SKILL.md @@ -29,9 +29,9 @@ file, so `start`/`resume` survive across separate process calls. | Item | Value | |---|---| | Project root | `E:\LangGraph_Design\FPGA-imx6-flow` | -| Conda env | `langgraph` (`C:\Users\bowei\.conda\envs\langgraph`) | +| Conda env | `langgraph` (path 见 `~\skills_env.md` 的 `CONDA_LANGGRAPH_PYTHON`) | | Graph | `app.main_graph:build_graph` (in-process; no langgraph dev) | -| Driver | `C:\Users\bowei\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py` | +| Driver | `%USERPROFILE%\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py` | | Checkpoint | `\runs\skill_checkpoint.sqlite` (keyed by `--thread-id`) | | Design source | `Notes/fpga-imx6-flow.excalidraw`, plan `Notes/Task00.md` | @@ -72,8 +72,8 @@ USB-Blast 处于连接状态时给板卡上电或断电(保护 JTAG 适配器 > `conda run --no-capture-output`. The driver also re-configures its stdout to UTF-8. ``` -PY = C:\Users\bowei\.conda\envs\langgraph\python.exe -RUN = C:\Users\bowei\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py +PY = +RUN = %USERPROFILE%\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py ``` ## Step 0 — Confirm the environment (REQUIRED before driving) @@ -83,8 +83,8 @@ Verify it before starting, so a missing env surfaces as a clear instruction rath than a cryptic import error mid-run: ```powershell -$py = "C:\Users\bowei\.conda\envs\langgraph\python.exe" -if (-not (Test-Path $py)) { Write-Host "[MISSING] langgraph env" } else { +$py = @("$env:USERPROFILE\miniconda3\envs\langgraph\python.exe","$env:USERPROFILE\.conda\envs\langgraph\python.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1 +if (-not $py) { Write-Host "[MISSING] langgraph env" } else { & $py -c "import langgraph; from langgraph.checkpoint.sqlite import SqliteSaver; from langgraph.types import Command; print('[OK] langgraph + checkpoint-sqlite')" } ``` diff --git a/fpga_flash/SKILL.md b/fpga_flash/SKILL.md index 9f80834..bb526b7 100644 --- a/fpga_flash/SKILL.md +++ b/fpga_flash/SKILL.md @@ -24,7 +24,7 @@ Claude 在执行前需先确认脚本的完整路径。使用 Glob 工具查找 ``` C:/Users/<当前用户>/.claude/skills/fpga_flash/scripts/gen_mcs.py ``` -或直接使用默认路径:`C:/Users/bowei/.claude/skills/fpga_flash/scripts/` +或直接使用默认路径:`%USERPROFILE%/.claude/skills/fpga_flash/scripts/` **scripts/ 目录内容:** ``` @@ -38,7 +38,7 @@ scripts/ **调用方式(Bash 工具):** ```bash -python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/