agentleFS
sunflowermmsunflowermm/XRK-AGT/.cursor/skills/xrk-infrastructure/SKILL.md

xrk-infrastructure

Skill140 starsChanged 8 months agoMITView on GitHub

当需要理解或扩展基础设施层(加载器、基类、路径、错误处理)等底层开发时使用。

The file

Files
SKILL.md

文档

  • 分层与工具模块:docs/底层架构设计.md
  • 运行时挂载与裸名约定:docs/runtime-surface.md
  • 扩展点总览:docs/框架可扩展性指南.md

基类与加载器

扩展点基类加载器扫描目录
插件#infrastructure/plugins/plugin-base.jsplugins/loader.jscore/*/plugin/*.js
HTTP#infrastructure/http/http.jshttp/loader.jscore/*/http/*.js
工作流#infrastructure/ai-workflow/ai-workflow.jsai-workflow/loader.jscore/*/workflow/*.js
Tasker—tasker/loader.jscore/*/tasker/*.js
事件#infrastructure/listener/base.jslistener/loader.jscore/*/events/*.js
配置#infrastructure/commonconfig/commonconfig.jscommonconfig/loader.jscore/*/commonconfig/*.js
渲染器#infrastructure/renderer/Renderer.jsrenderer/loader.jssrc/renderers/*

浏览器截图实现继承 src/infrastructure/renderer/browser-renderer-base.js(Puppeteer/Playwright 共用 lock、Redis WS、截图槽位等)。

工具与专题

模块路径说明
DB 连接#utils/db-connect-utils.jsRedis/Mongo 共用 retry、URL 脱敏、ARM64 检测
HTTP 业务 API 约定docs/http-api.md路由、HttpResponse、InputValidator
Loader 共享约定docs/infrastructure-shared.md热重载、FileLoader、批加载
基类契约docs/base-classes.mdplugin/HttpApi/AiWorkflow/ConfigBase/Event
配置种子src/infrastructure/config/config-seed.js端口配置模板复制
事件键匹配#utils/event-keys.jsmatchPluginEvent / resolveTaskerId;见 docs/事件系统标准化文档.md
运行时挂载#utils/runtime-globals.jssetRuntimeGlobal / getRuntimeGlobal

# 别名

#utils/*、#infrastructure/*、#factory/*、#config/*、#data/*、#core/*、#renderers/*、#modules/*。业务用裸名 msgSegment、AgentRuntime(勿 global.);Core 业务用裸名,框架内可 import { msgSegment } from '#utils/msg-segment.js'。

约定

  • 业务只放 core/;改 src/ 仅限基类/加载器/工具。
  • 日志:RuntimeUtil.makeLog;HTTP 响应:HttpResponse(#utils/http-utils.js);错误:#utils/error-handler.js + normalizeError。
  • runtimeConfig.aiWorkflow → data/server_bots/{port}/ai-workflow.yaml(非 server_bots 根目录)。

Node 26(改 Core 时)

  • 必读 skill xrk-node-runtime;禁止在 Core 中引入 node-fetch、promisify(exec)、instanceof Error 判错等旧写法。
  • 复用底层:exec-async.js、normalize-error.js、proxy-utils.js,勿在 Core 重复封装。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.