.claude/skills/xrk-infrastructure/SKILL.md
当需要理解或扩展基础设施层(加载器、基类、路径、错误处理)等底层开发时使用。
npx skillsauth add sunflowermm/XRK-AGT xrk-infrastructureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
docs/框架可扩展性指南.mddocs/ 对应同名 md。| 扩展点 | 基类路径 | 加载器路径 | 扫描目录 |
|--------|----------|------------|----------|
| 插件 | #infrastructure/plugins/plugin.js | #infrastructure/plugins/loader.js | core/*/plugin/*.js |
| HTTP API | #infrastructure/http/http.js | #infrastructure/http/loader.js | core/*/http/*.js |
| 工作流 | #infrastructure/aistream/aistream.js | #infrastructure/aistream/loader.js | core/*/stream/*.js |
| Tasker | - | #infrastructure/tasker/loader.js | core/*/tasker/*.js |
| 事件监听器 | #infrastructure/listener/base.js | #infrastructure/listener/loader.js | core/*/events/*.js |
| 配置 | #infrastructure/commonconfig/commonconfig.js | #infrastructure/commonconfig/loader.js | core/*/commonconfig/*.js |
| 渲染器 | #infrastructure/renderer/Renderer.js | #infrastructure/renderer/loader.js | src/renderers/* + 配置 |
#utils/* → src/utils/*#infrastructure/* → src/infrastructure/*#factory/* → src/factory/*#config/* → config/*#data/* → data/*#core/* → core/*#renderers/* → src/renderers/*#modules/* → src/modules/*#oicq → src/modules/oicq/index.js(业务层用全局 segment,无需从此导入)根路径与 core 目录解析:#utils/paths.js(getCoreDirs、root 等)。
cfg.aistream 对应 data/server_bots/{port}/aistream.yaml(getServerConfig),不在 server_bots 根目录;与 docs/app-dev.md、docs/aistream.md 一致。#utils/error-handler.jserrorHandler.handle(error, options) 统一记录与分类;HTTP 层用 HttpResponse.error(),内部会调 error-handler。ErrorCodes(WORKFLOW_、PLUGIN_、INPUT_VALIDATION_FAILED、SYSTEM_ERROR、NOT_FOUND、CONFIG_* 等);自定义错误可用 BotError。routes、deal(e)、process(e, msg))变更需与文档和现有 core 兼容。BotUtil.makeLog / #utils/botutil.js,错误用 error-handler,不直接 console 打业务日志。PROJECT_OVERVIEW.mdsrc/ 与 core/ 对应子目录docs/ 下对应主题文档tools
助手向通用“做事/回复”技能:先结论后步骤,给关键路径与验证方法
development
统一“回答格式”约束工具:减少长篇空话,让输出可复制
tools
助手向通用“做事/回复”技能:先结论后步骤,给关键路径与验证方法
development
统一“回答格式”约束工具:减少长篇空话,让输出可复制