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
+5 -5
View File
@@ -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/<script>.py" [参数...]
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/<script>.py" [参数...]
```
各脚本通过命令行参数接受变量(Vivado 安装目录、工程名、bit 文件路径、mcs 文件路径等),内部调用 Vivado `-mode batch -source <tcl模板> -tclargs <参数>` 完成执行,全程不产生临时文件。
@@ -52,7 +52,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/<script>.py" [参数...
调用 `check_flash_csv.py`,检查 `xicom_cfgmem_part_table.csv` 中是否已包含 `w25q128bv-spi-x1_x2_x4`:
```bash
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
--vivado-dir "D:/Xilinx/Vivado/2018.1"
```
@@ -87,7 +87,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
用户确认后,**Claude 自动调用**:
```bash
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \
--mcs-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_smod.mcs"
@@ -104,7 +104,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
确认板卡已上电并连接 JTAG 后,**Claude 自动调用**:
```bash
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/program_flash.py" \
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/program_flash.py" \
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
--flash-part "w25q128bv-spi-x1_x2_x4" \
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \