1.3 KiB
1.3 KiB
Practice Notes
按工具 / 主题分节。跨工具的工作流放在前面(如 ## Locate workflow),单工具的具体实践放各自 ## <tool> 节下。
Locate workflow (for mature/unfamiliar repos)
repomix -o /tmp/x.xml(orrepomix <subdir>) — full-repo LLM pack; slice by subdir if > 100k tokenseza --tree --git-ignore --level=3 .for layout (path arg required)fd <pat>for files;rg <sym>for call sitesgit ls-fileswhen tokens are tight
lightpanda
- 关掉遥测:
export LIGHTPANDA_DISABLE_TELEMETRY=true - 快速抓 markdown(A 模式):
lightpanda fetch --dump markdown --obey-robots <url>;--wait-until/--wait-ms/--wait-selector调节等待 - 作 web-access skill 的 CDP 后端(B 模式):
lightpanda serve --host 127.0.0.1 --port 9222后台跑node ~/.claude/skills/web-access/scripts/cdp-proxy.mjs后台跑(自动扫 9222)- 用
curl http://localhost:3456/new?url=...等 API;/targets列 tab,/eval?target=ID执行 JS,/info?target=ID查标题/URL
- 区分 A vs B:公开静态页用 A(快、无状态);需要点击/上传/多 tab/交互取 DOM 用 B
- 不具备登录态(对比 web-access 连用户日常 Chrome);需要登录的站点仍走用户 Chrome 模式