Commit Graph
33 Commits
Author SHA1 Message Date
Myfro9andClaude Opus 5 48a4c5601f tools-sync: 传输故障时登录 gitea 自愈,并让"同步成功"包含"别人拉得到"
授权本 skill 在同步传输出问题时登录 gitea 服务器诊断并修复。连接参数走
skills_env.md 的 GITEA_* 段(模板同步给出占位符与填写要点),不写死在脚本里。

新增 scripts/gitea_doctor.ps1(Windows 侧驱动):
- 分两个面探测传输——refs 面(ls-remote) 与 pack 面(--filter=tree:0 的极小 clone)。
  两面独立坏,区别就是整个诊断:2026-08 那次只有 pack 面死了,push 和 ls-remote
  全程正常,故障因此藏了 8 天。两面都好就直接返回,不连服务器。
- 坏了才 ssh,tailscale 直连优先、frps 跳板兜底。
- 修完不采信服务端自述,回到客户端重新探一次 pack 面才算数。

新增 scripts/gitea_triage.sh(服务端执行):8 项检查各打 PASS/FAIL,--fix 只做
可逆修复(隔离被污染的 gitconfig 并重启让 gitea 重建、按 git 模板还原被篡改的
hook、删 /tmp 载荷、还原被包了一层的 git、拉起停掉的容器),破坏性操作另需
--allow-destructive。检查表把这次的两个坑固化下来:packgen 必须带 --stateless-rpc
(clone file:// 走的不是 HTTP 那条码路,假阴性把上一轮排查带偏成"gitea 版本 bug"),
以及全局 gitconfig 在 /data/gitea/home 而不是 /data/git。

sync_repos.ps1:
- pull/push 报传输类错误时自动调医生并重试一次(-NoDoctor 可关)。
- 收尾增加 fetchability 探针。push 成功不等于同步成功——服务端发不出 pack 时,
  刚推上去的东西别的机器照样拉不到,这轮就该判失败。ls-remote 闸门只验 ref 面,
  测试中确实出现过"同步报成功而服务器仍是故障态"。

脚本用 scp 送到服务端执行而不是管道进 sh -s:PS 5.1 会给管道内容加 UTF-8 BOM,
糊在 shebang 上,sh 报的错会指向解释器而不是真原因。

验证:注入真实故障(packObjectsHook 指向 /bin/true,同样产出空 pack)后整链跑通
5 次——检出→隔离→重启→重建→客户端复验,包括从同步主流程自动触发的那次。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tMFjKGgxdmxJ28dyXdx1u
2026-09-02 15:40:29 -05:00
Myfro9 f1d36bb082 sync: BOWEI_US 2026-09-02 2026-09-02 15:37:47 -05:00
Myfro9 67ca51b2c2 sync: BOWEI_US 2026-09-02 2026-09-02 15:37:08 -05:00
Myfro9 10f436cfde sync: BOWEI_US 2026-09-02 2026-09-02 15:35:47 -05:00
Myfro9andClaude Opus 5 e39e852853 tools-sync: 增加 ls-remote 同步闸门,并记下 gitea 空 pack 故障的排查法
这次同步事故的教训不是服务器坏了,而是坏了没人知道:pull --rebase 一失败脚本
就退出,push 从没走到,3 个 commit(含整个 bmem skill)在本机躺了 8 天,报告里
却算作"已知故障、待恢复"。而 ls-remote 这 8 天一直是好的。

- sync_repos.ps1 增 Assert-RemoteInSync:push 后(及 -DryRun 时)用 ls-remote 比对
  origin/<branch> 的实际 sha,不一致就 FAIL 并报出滞留/落后的 commit 数。
  远端分支不存在时单独报错,避免那两个计数被静默地按 HEAD 算出误导性数字。
- SKILL.md 阶段 1 写明闸门是硬性的:服务端故障是原因不是结果,不得报成已同步。
- SKILL.md 新增 bad pack header / early EOF 的排查阶梯(三步各排掉一层),并记下
  根因:全局 gitconfig 被注入 [uploadpack] packObjectsHook,把 pack-objects 换成
  了空转脚本。附带提醒 HOME 是 /data/gitea/home 而非 /data/git,以及这是一条
  完整 RCE 链、要连 hook 与 /tmp 载荷一起清。
- bmem/SKILL.md 的"已知边界"改为已修复,避免继续把普通的没 pull 误判成服务端故障。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tMFjKGgxdmxJ28dyXdx1u
2026-09-02 14:57:50 -05:00
Myfro9andClaude Opus 5 7d81f59ee0 zynq-imx6-flow: analyze 阶段增加频谱仪取证要求
RF/发射类验收不能只靠数字侧证据。analyze 节点新增一节,规定用已注册的
频谱仪 MCP(N9320B / DSA815)取证:需求点名哪台就用哪台,未点名默认
DSA815;只读抓图优先,改了设置要还原;artifact 路径、峰值频率/功率与
扫描设置一并写进 analysis_log。频谱仪连不上时报缺证,不得仅凭数字证据
判定 RF 需求通过。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tMFjKGgxdmxJ28dyXdx1u
2026-09-02 14:54:09 -05:00
Myfro9andClaude Opus 5 bb71470e07 sync: WIN11-BOWEI 2026-09-02 新增 bmem 记忆 skill;imx6-flow/plan-review 文档与脚本更新
远端 pack 服务仍故障(git-upload-pack 返回 0008NAK 后截断),push 待服务器恢复。
未跟踪的 5 个归档临时副本(rtl-ip-replace / sim-rtl-flow / simulink_rtl_dev /
simulink-rtl-redev / zynq-imx6-flow)刻意不入库,待 pull 后由远端提供。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0135YszNe4pwwJxwaLqKTCKG
2026-09-02 14:53:28 -05:00
Myfro9andClaude Opus 4.8 9c1012f5b8 sync: WIN11-BOWEI 2026-08-10 MCP审计脚本python回退到conda(MS Store存根修复)
sync_mcp_registrations.ps1 默认用 PATH 上的 python 解析 Codex TOML,
但 Windows 上常见的是 Microsoft Store python 存根(exit 49, 无 stdlib)。
新增 Resolve-PythonCommand: python 不带 tomllib 时自动回退到 skills_env.md
的 CONDA_LANGGRAPH_PYTHON, 再退到 python3/py。显式 -PythonCommand 仍优先。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 14:53:28 -05:00
Myfro9andClaude Opus 5 7a11bac29d fix(fpga_flash): 修复写入 Vivado cfgmem 器件表的 w25q128bv 行格式错误
check_flash_csv.py 里 NEW_ROW 是硬编码的 9 字段、从 NAME 开头,而 Vivado
2018.1 的 xicom_cfgmem_part_table.csv 是 14 列、首列为数字 CFGMEM_ID。
Vivado 于是拿 "w25q128bv-spi-x1_x2_x4" 去转 int,抛

    bad lexical cast: source type value could not be interpreted as target

这条错误同时打挂 get_cfgmem_parts 和 refresh_hw_device。后者最具误导性:
它报在硬件刷新阶段,看起来像 probe/.ltx/debug core 的问题,与 CSV 毫无关联,
实际上 refresh_hw_device 内部也读这张表。SMOD 板实测因此完全无法烧写 flash。

改为动态生成:克隆 Vivado 自带的 mt25ql128-spi-x1_x2_x4 行(同为 spi /
x1_x2_x4,COMPATIBLE_DEVICES 含 xc7a200t),只替换 Winbond 相关字段,
字段位置按表头列名定位而非写死下标,换 Vivado 版本 schema 变了也不会写出
畸形行。CFGMEM_ID 取现有最大值 +1。

MEM_DEVICE_ALIAS 指向 n25q128-3.3v-spi-x1_x2_x4 —— Vivado 真正带数据的那个
定义(mt25ql128 也别名到它)。不需要 Winbond 专属数据文件:flash loader
比特流按 FPGA 型号索引(bitfile.zip 里是 spi_xc7a200t_pullnone.bit),
与 flash 型号无关。

其它改动:
- 识别并替换旧版本留下的畸形行(退出码 2),而不是因为 "名字已出现在文件里"
  就误判为已安装直接返回 0
- 改写前自动备份 CSV
- 保留原文件的行尾风格,不整体改写 CRLF/LF

实测(Vivado 2018.1 + SMOD Artix-7 xc7a200t + 真实 W25Q128BV):
- 三条路径均正确:已存在且格式正确→exit 0 且不改文件;全新→exit 2;
  注入 9 字段畸形行→识别并修复→exit 2
- get_cfgmem_parts 可正常返回,属性 MEM_TYPE=spi / MEM_DENSITY=128
- 烧写读回 Mfg ID : ef  Memory Type : 40  Memory Capacity : 18(真实
  Winbond JEDEC ID),Erase / Program-Verify / completed successfully 全过

SKILL.md 排错表补上该症状,并注明报在 refresh_hw_device 上的误导性。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 22:19:56 +08:00
Myfro9 8eddd0985a sync: HP_BOWEI 2026-07-27 vivado-sim 去掉写死的 Vivado 盘符路径
SKILL.md 把 Vivado 安装路径写死成 C:\Xilinx\Vivado\2018.1,但各机器盘符不同
(HP_BOWEI 上实际是 D:\),照抄命令会直接失败。改为从 ~\skills_env.md 的
VIVADO_ROOT 取值,命令块统一用 $VIVADO_BIN / $VIVADO_DATA 变量。
2026-07-27 13:56:51 +08:00
Myfro9andClaude Opus 4.8 a7e20d807d imx6: document VM bootstrap, stop hardcoding the cross-compile VM's IP
The VMware segment changed, so the VM moved from 192.168.223.128 to
192.168.154.128 and every hardcoded reference was stale. A freshly-installed
VM also has neither sshd nor the toolchain, which previously only surfaced
half-way through a modify_imx6 iteration.

- fpga-imx6-flow: new "VM prerequisite check" section -- how to detect a
  missing sshd (Connection refused) and reach the guest over vmrun/VMware
  Tools when SSH is impossible, plus the Yocto SDK install + ARM-ELF
  verification step. Records the real gotchas hit during install:
  unattended-upgrades holding the dpkg lock, EOL xenial repos, and CRLF
  breaking scripts pushed into the guest.
- smod_atsc_dev SKILL/imx6.md: refer to CROSS_VM_HOST/USER/PASS, no literal IP.
- imx6_app.py: drop the stale 192.168.223.128 default so a missing
  CROSS_VM_HOST fails loudly instead of dialing the wrong host.

Machine-local values (IP, credentials, vmx/vmrun paths, toolchain prefix)
live in ~/skills_env.md, which stays out of git.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 08:11:51 -05:00
Myfro9andClaude Opus 4.8 88f96fa5fa vivado: resolve install path from ~/skills_env.md instead of hardcoding D:\Xilinx
The Vivado install root differs per machine (C:\Xilinx here, D:\Xilinx on the
box these skills were written on), so every hardcoded path was already wrong
on this machine.

- new fpga_flash/scripts/vivado_env.py: resolves --vivado-dir > env var >
  VIVADO_ROOT (falling back to VIVADO_PATH) from ~/skills_env.md
- gen_mcs / program_flash / check_flash_csv: --vivado-dir now optional
- fpga_update/gen_update_mcs.py: same precedence for --vivado
- fpga_flash / smod_atsc_dev / vivado-prj-create SKILL.md: document the
  lookup instead of naming a drive letter
- skills_env template: VIVADO_ROOT/VIVADO_PATH are now blanks to fill in,
  so a new machine can't inherit a wrong default

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 07:48:04 -05:00
Myfro9andClaude Opus 4.8 2ad9206a88 gitignore: ignore local-only skill dirs at directory level
Upstream only listed the vercel/claude-hud/find-skills/web-design files
individually, so newly added files under those dirs still showed up as
untracked. Ignore the whole directory for every skill that does not
exist upstream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 07:22:11 -05:00
Myfro9andClaude Opus 4.8 eedb92e9fe gitignore: exclude local-only skills from skills-win sync
BMSv4_pincfg and cubemx-min-prj were removed upstream but are still
used on this machine; keep them on disk and untracked. Also ignore
.stfolder (syncthing metadata) and .claude.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 07:10:06 -05:00
Myfro9 2b873a1f4d sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:28:34 +08:00
Myfro9 1334ad4a64 sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:26:14 +08:00
Myfro9 05c78c1cee sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:21:13 +08:00
Myfro9 c15c5c51e8 sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:20:36 +08:00
Myfro9 96b014edb3 sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:18:50 +08:00
Myfro9 2ef32a9dcc sync: WIN10-I9-64G 2026-07-20 2026-07-20 18:14:49 +08:00
Myfro9 bceafcd58c Update FPGA and Vivado skills 2026-07-14 18:18:17 +08:00
Myfro9 d20ec12fee Merge branch 'main' of https://github.com/Myfro9/claude_skills_win 2026-06-22 16:41:47 +08:00
Myfro9 814dbf1681 更新了skill 2026-06-22 16:41:44 +08:00
Myfro9 237e5d8925 更新了部分skill 2026-06-22 16:40:24 +08:00
Myfro9andClaude Opus 4.8 b44c6f6746 Remove cubemx-min-prj and BMSv4_pincfg skills
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 00:54:07 +08:00
Myfro9 48b965ec4e 更新了langgraph-plan-view,支持windows下使用 langgraph cli;更新了langgraph-vivado-install,要求安装langgraph cli,确定conda环境的名称为langgraph 2026-05-25 13:13:00 +08:00
Myfro9 fda6c9a114 常规归档 2026-05-24 21:20:26 -05:00
Myfro9 15e8c5efa3 加入 langgraph-vivado-install, langgraph-plan-view, 更新 fft-analyse 2026-05-22 17:18:38 -05:00
Myfro9 c7e4723d85 添加了langgraph-vivado-install 这个skill 2026-05-14 15:07:40 -05:00
Myfro9 3562ea9093 添加了BMSv4_pincfg, cubemx-min-prj两个skill 2026-05-09 01:41:39 -05:00
Myfro9 17fb1b213d 同步了 fpga_flash, vivado-prj-create 两个skill 2026-05-09 01:37:44 -05:00
Myfro9 9e700d10b7 delete vivado-sim-workspace 2026-05-09 01:16:55 -05:00
Myfro9 61b4731d06 Initial commit 2026-05-09 01:12:34 -05:00