Best for
- Your change touches Python under backend/app/,
- You are doing a maintenance triage round over the existing codebase
bytedance/deer-flow/.agent/skills/blocking-io-guard/SKILL.md
Ensure async-path backend code that could block the asyncio event loop is protected by a teeth-verified runtime anchor in tests/blocking_io/. Use when changing backend Python under app/, packages/harness/deerflow/, or scripts/, when running a blocking-IO triage round over the whole repo, or when a reviewer/CI asks for blocking-IO coverage. Runs a deterministic scan (changed-lines or full-repo), routes each candidate, drafts/extends an anchor, and proves it fails when the blocking IO regresses.
Decision brief
Help a contributor ship backend async changes together with the runtime anchor that lets DeerFlow's blocking-IO CI gate actually see the new code. The dynamic detector only catches blocking IO on paths a test executes — this skill closes that gap, either for your own diff or for…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/bytedance/deer-flow --skill ".agent/skills/blocking-io-guard"Inspect the Agent Skill "blocking-io-guard" from https://github.com/bytedance/deer-flow/blob/bec6277930d6ee73c58156689f1556780724e35d/.agent/skills/blocking-io-guard/SKILL.md at commit bec6277930d6ee73c58156689f1556780724e35d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Mode A — your own diff (default, pre-PR). From repo root:
Read the code around each candidate and route it:
Offload the blocking call in production code, then re-run the Step 0 scan and confirm the candidate no longer appears. If the offloaded call sits in a finally / cleanup path, keep it best-effort and bounded (swallow-and-log, asyncio.waitfor) so a failing or hung cleanup cannot m…
Look in backend/tests/blockingio/ for a test that drives the production async entry point reaching this candidate's branch.
Follow references/good-anchor-rules.md. Drive the specific branch (e.g. force the create failure that hits the cleanup shutil.rmtree). Never bypass the blocking surface with a test-only asyncio.tothread wrapper.
Permission review
The documentation asks the agent to run terminal commands or scripts.
make detect-blocking-ioEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 79,261 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Help a contributor ship backend async changes together with the runtime anchor that lets DeerFlow's blocking-IO CI gate actually see the new code. The dynamic detector only catches blocking IO on paths a test executes — this skill closes that gap, either for your own diff or for a repo-wide triage round.
Read references/good-anchor-rules.md before writing any anchor.
Only read references/sop-skeleton.md when generalizing this SOP to another
detector domain — it is not needed to execute the steps below.
backend/app/,
backend/packages/harness/deerflow/, or backend/scripts/ and may run on
the async event loop (Mode A). If unsure, run Step 0 — it answers
deterministically.Mode A — your own diff (default, pre-PR). From repo root:
uv run --project backend python scripts/scan_changed_blocking_io.py --base origin/main
Lists blocking-IO candidates your change introduces: findings on lines the
diff added, plus findings that are new versus the merge base — the latter
catches a new async caller exposing an old sync helper whose blocking line is
not in the diff. The diff is <base>...HEAD, so commit your work first —
uncommitted lines are not selected.
If the list is empty, this change introduces no blocking-IO surface that the
static detector can see in the changed files. One residual blind spot
remains: reachability is same-file only, so a new async caller of a sync
helper defined in another file is invisible to both selections. If your
diff adds an async call into a helper that lives elsewhere, check that helper
manually (codegraph or git grep) before stopping.
Mode B — full-repo triage round. From repo root:
make detect-blocking-io
Prints a summary and writes the complete structured finding list to
.deer-flow/blocking-io-findings.json. Work HIGH priority first; do not start
MEDIUM until every HIGH is dispositioned (fixed, guarded, or recorded
NO-ACTION).
Batching policy (PR sizing). One fix unit per PR while any HIGH remains: a fix unit is one root cause — usually a single HIGH, but two HIGHs resolved by the same one-place fix belong together. Once no HIGH remains, MEDIUM/LOW may be batched (about five per round, grouped by module or by disposition) so each PR stays reviewable. A new Blockbuster rule is never batched with anything — it always ships alone (see Step 5).
Both modes emit the same JSON shape per finding: priority, location
(path/line/function), blocking_call (category/operation/symbol),
event_loop_exposure, reason, code. Priority is a deterministic review
ordering, not proof of a bug — Step 1 makes the actual call.
Read the code around each candidate and route it:
asyncio.to_thread, run_in_executor, async client) →
GUARD: add/extend an anchor that locks the offload so a future edit cannot
move it back onto the loop.ASYNC_REACHABLE_SAME_FILE). If the candidate is a sync helper, check for
async callers in other files (codegraph or git grep) before deciding
NO-ACTION.Offload the blocking call in production code, then re-run the Step 0 scan and
confirm the candidate no longer appears. If the offloaded call sits in a
finally / cleanup path, keep it best-effort and bounded (swallow-and-log,
asyncio.wait_for) so a failing or hung cleanup cannot mask the primary
exception. Match by the stable key
(path, function, symbol) — line numbers shift after edits, so never
compare by line.
This is pattern-level feedback in seconds; it complements but never replaces Step 5 — only the runtime gate proves the event loop is actually protected.
Look in backend/tests/blocking_io/ for a test that drives the production async
entry point reaching this candidate's branch.
templates/anchor.template.py.Follow references/good-anchor-rules.md. Drive the specific branch (e.g. force
the create failure that hits the cleanup shutil.rmtree). Never bypass the
blocking surface with a test-only asyncio.to_thread wrapper.
cd backend && make test-blocking-io (or target the one test). It must
go RED.A real block that stays GREEN means Blockbuster has no rule for that
primitive — that is the RULE route; see references/good-anchor-rules.md
for the admission criteria before adding one.
Commit the anchor(s) with your change; make test-blocking-io green. In the PR,
note: candidates found, each disposition, the re-scan result (Step 2), and
the teeth evidence (red→green). Include the reason for any NO-ACTION. A new
Blockbuster rule, if any, goes in its own commit with the evidence from Step 5.
Alternatives
K-Dense-AI/scientific-agent-skills
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
K-Dense-AI/scientific-agent-skills
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
trailofbits/skills
Detects timing side-channel vulnerabilities in cryptographic code. Use when implementing or reviewing crypto code, encountering division on secrets, secret-dependent branches, or constant-time programming questions in C, C++, Go, Rust, Swift, Java, Kotlin, C#, PHP, JavaScript, TypeScript, Python, or Ruby.