xiaohongshu
xiaohongshu
debug-coffee-ahk
查询 coffee-ahk 编译架构、bug 定位方法、调试技巧,use when debugging/fixing bugs or need to understand compilation flow
Full skill instructions
何时更新本 skill:
效率优先:Read/Grep/Glob > Task · 优先使用本 skill 提供的路径信息,避免重复探索
entry/index.ts:18-67:
processors/index.ts:19-37: newLine → validate → for/array/object/logicalOr/ifExpression/chainedCompare → typeof/instanceof/variable → builtInLoader/class/function
function 内部顺序 (function/index.ts:13-34): mark → class → implicit-return → anonymous → count → parameter → do → ctx-transform
| 路径 | 职责 | 关键逻辑 |
|---|---|---|
| models/Content.ts:52 | reload() 过滤 void | filter(it => !it.is('void')) |
| processors/function/anonymous/pick-item.ts:27 | 提取嵌套函数 | 标记原位置为 void |
| processors/function/class/prepend-this.ts:20 | 类方法添加 ℓthis | constructor 特殊处理 |
| processors/function/ctx-transform/params.ts:11-15 | 收集参数+类方法标记 | classMethods: Set<string> |
| processors/function/ctx-transform/bind.ts:12-15 | Bind() 添加 this 参数 | 检测 classMethods 传递 this |
| formatters/property.ts:42 | this.prop 处理 | 检查 lastType 插入 . |
| renderer/index.ts:102 | mapMethod 映射 | type → 渲染函数 |
定位:
{verbose:true, ast:true} 确认 Processor 后 Item[]定位:
{coffeeAst:true}THIS/SUPER/新语法未处理定位:检查 processors/function/ctx-transform/ 的 collectParams/transformVars/addBind,验证 λ 对象传递链
Class method arrow functions 特殊处理:
collectParams() 检测 ℓthis 参数,记录到 classMethods SetaddBind() 为 class method 内部的 .Bind(λ) 添加 this 参数 → .Bind(λ, this)this(通过 ℓthis 传递)# 查看完整编译流程
node -e "import('./dist/index.js').then(m=>m.default('file.coffee', {verbose:true, ast:true}))"
# 仅查看 CoffeeScript tokens
node -e "import('./dist/index.js').then(m=>m.default('file.coffee', {coffeeAst:true}))"
# 编译单文件(仅非测试文件)
node dist/index.js file.coffee
测试文件规则:
script/test/*.ahkpnpm test overwrite 自动生成.coffee → 运行 pnpm test overwrite -- <name>| 问题 | 原因 | 解决 |
|---|---|---|
| Formatter 未消费 token | 忘记 return true | 添加 return |
| this 被过滤 | formatters 缺少处理 | 添加 formatter |
| void 未过滤 | Content.reload() 依赖 | 调用 reload() |
| 嵌套函数 scope 错误 | pick-item.ts scope 调整 | 验证 scope.shift() |
| Class method arrow 缺少 this | addBind() 未检测 classMethods | 更新 params.ts + bind.ts |
pnpm test 或 pnpm test overwrite -- <name>✓ Bug 已定位于 {文件}:{行号} 或 ✓ 修复完成并通过测试xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience