AGENT SKILL

server-backends-and-async

Use for Dash backend selection, async callbacks, WebSocket callbacks, background callbacks, hooks, and MCP server configuration.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
server-backends-and-async
license
MIT
metadata
{ "disco-role": "operating" }
description
Use for Dash backend selection, async callbacks, WebSocket callbacks, background callbacks, hooks, and MCP server configuration.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Dash Server Backends and Async Workflows

Use this sub-skill when a task depends on Dash's server runtime rather than the layout/callback API alone: backend selection, async callbacks, background callbacks, WebSocket callbacks, hooks, or MCP exposure.

Start here

  1. Read references/backend-workflows.md for backend selection, adapters, and constructor/runtime facts.
  2. Read references/background-and-websocket-callbacks.md for async, background, and WebSocket behavior.
  3. Read references/mcp-and-hooks.md for hooks and MCP configuration.
  4. Read references/troubleshooting.md when a backend import or optional-extra path fails.
  5. Run scripts/inspect_backends.py for a safe optional-backend diagnostic before promising backend coverage.

Main routes

Choose or inspect a backend

Dash defaults to Flask but can also run on FastAPI or Quart. Use this sub-skill when you need to know which backend constructor to use, which extras are needed, or how to create a Dash app around an existing server instance.

Write async or background callbacks

Use this sub-skill for async def callbacks, background=True, DiskcacheManager, CeleryManager, progress, running, cancel, and cache keys.

Use WebSocket callbacks

Route WebSocket tasks here when the callback depends on websocket_callbacks, websocket=True, persistent=True, ctx.websocket, set_props, or browser/ server disconnect behavior. FastAPI is the backend surface that exposes the WebSocket path in Dash.

Expose hooks or MCP content

Use this sub-skill for hooks.setup, hooks.layout, hooks.route, hooks.error, hooks.callback, hooks.websocket_connect, hooks.websocket_message, configure_mcp_server, and mcp_enabled.

Route elsewhere

Validation checklist

Before marking a backend workflow solved:

  • The installed extra or backend package is present.
  • If the workflow requires Flask async, dash[async] is installed.
  • If the workflow requires FastAPI or Quart, the relevant extra is installed and a safe app/backend construction check passes.
  • If the workflow requires Diskcache or Celery, the corresponding dependency set is installed and the service requirement is called out when applicable.
  • If the workflow uses WebSocket callbacks, the backend and browser/runtime prerequisites are explicitly named.
  • If a hook or MCP change alters route exposure, the sub-skill references explain the request/session/content-type rules and the expected failure modes.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351