ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้ว
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Blast Scope

โดย Atharva-Jayappaรุ่น 0.6.1i★ 0iรันบนเครื่อง
ชื่อใน registryio.github.Atharva-Jayappa/blast-scope

วิธีติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Contextual blast-radius scoring for shell commands an AI agent is about to run

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  3. วางค่าตั้งนี้แล้วบันทึกไฟล์

    {
      "mcpServers": {
        "blast-scope": {
          "command": "uvx",
          "args": [
            "blast-scope"
          ]
        }
      }
    }
  4. ปิดแอป Claude แล้วเปิดใหม่

  5. ลองเลย

    ใช้ Blast Scope บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ Blast Scope หรือมีชื่อเครื่องมือของ Blast Scope ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ Blast Scope ไม่ได้

Blast Scope ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ Blast Scope ได้

  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด เครื่องมือนักพัฒนา ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  3. วางคำสั่งนี้แล้วกด Enter

    claude mcp add blast-scope -- uvx blast-scope
  4. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น Blast Scope ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  5. ลองเลย

    ใช้ Blast Scope บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ Blast Scope หรือมีชื่อเครื่องมือของ Blast Scope ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  3. เปิดแชตของ AI ใน Cursor โหมด Agent

  4. ลองเลย

    ใช้ Blast Scope บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ Blast Scope หรือมีชื่อเครื่องมือของ Blast Scope ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องลง Python (uv) ในเครื่องก่อน (ทำครั้งเดียว)

  1. ลง Python (uv) ในเครื่อง

    ทำครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Python (uv)

    เปิดหน้าดาวน์โหลด Python (uv) ↗

  2. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  3. เปิดแชตของ AI ใน VS Code โหมด Agent

  4. ลองเลย

    ใช้ Blast Scope บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ Blast Scope หรือมีชื่อเครื่องมือของ Blast Scope ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ Blast Scope อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

claude mcp add blast-scope -- uvx blast-scope

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "blast-scope": {
      "command": "uvx",
      "args": [
        "blast-scope"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "blast-scope": {
      "command": "uvx",
      "args": [
        "blast-scope"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "blast-scope": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "blast-scope"
      ]
    }
  }
}

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
33/สัปดาห์
licensei
Apache-2.0
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
0.6.1
ส่งเข้า registryi
9 ส.ค. 2569
แก้โค้ดล่าสุดi
9 ส.ค. 2569
ผู้ทำ
Atharva-Jayappa
แพ็กเกจ
pypi: blast-scope
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 11 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub Atharva-Jayappa ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 3 เดือนที่ผ่านมา

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ Apache-2.0

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบด้วย Google เพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 5763 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 27% ของอีก 5763 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5763 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Blast Scope ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 3 เดือนที่ผ่านมา และส่งรุ่นล่าสุด (0.6.1) เข้า registry 3 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี REA, Netdata, Front-End Checklist

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

REA

แกะการทำงานของโปรแกรมและแอปจากเทอร์มินัลหรือจาก AI

โดย morlutoใช้กันมาก↓ 388.7K/สัปดาห์★ 451.3Kอัปเดต 17 วันที่ผ่านมา

รันบนเครื่อง

Netdata

ดูสถานะเซิร์ฟเวอร์แบบเรียลไทม์ ทั้งตัวเลข log การแจ้งเตือน และจุดผิดปกติ

โดย netdataใช้กันมาก★ 81.4Kอัปเดต 7 วันที่ผ่านมา

รันบนคลาวด์

Front-End Checklist

ตรวจโค้ดหน้าเว็บและเว็บจริงกับกฎคุณภาพงานหน้าบ้าน 386 ข้อ

โดย thedaviddiasใช้กันมาก★ 74.7Kอัปเดต 38 วันที่ผ่านมา

รันบนคลาวด์

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Blast Scope

A consequence engine for shell commands. Blast Scope scores what a command would actually *do* — before an AI agent (or you) runs it. It doesn't pattern-match syntax into a blocklist; it figures out the command's real target, observes that target with a safe, read-only probe, and returns a structured risk score with evidence.

The whole point is *contextual* blast radius. The same command gets a completely different score depending on what it would actually hit:

COMMAND                            SEVERITY   WHY                                          ADVICE

───────────────────────────────── ──────── ────────────────────────────────────────── ─────── rm -rf ./logs LOW 0 importers · regenerable · outside src proceed rm -rf ./config CRITICAL 8 modules import it · high PageRank hub block git reset --hard (clean tree) LOW nothing uncommitted to discard proceed git reset --hard (4 dirty files) HIGH would throw away 4 files of uncommitted work confirm git push --force (protected) CRITICAL would orphan commits on a protected branch block docker volume rm cache (absent) LOW volume doesn't exist — nothing to remove proceed docker volume rm pgdata (in use) CRITICAL holds data · in use · no image to rebuild block pip uninstall flask (uv.lock) LOW regenerable — exact version pinned in lock proceed DROP TABLE users (42 rows) CRITICAL schema + 42 rows · irreversible block DELETE FROM logs (in txn) HIGH no WHERE — but inside a txn, ROLLBACK-able confirm

Two commands can be byte-identical and score four bands apart. That gap is the product.

Not a blocklist. Not a replacement for Shellfirm. Not a syscall monitor. It

scores *structural consequence* — advisory, never blocking — and for the rare

critical command it captures an undo snapshot first.


How it works

A command flows through a cheap funnel: almost everything is recognized as non-destructive in microseconds and exits silent. Only a flagged *destructive candidate* pays for a probe.

  shell command

│ split chains (&& || ; |) · de-alias PowerShell · parse flags/targets ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ STAGE 1 · triage (near-free regex — runs on every command) │ │ which class? git · docker · pip/uv · sql · else filesystem │ │ destructive? git status → no. git reset --hard → yes ↓ │ └───────────────────────────────┬──────────────────────────────────────┘ destructive candidate │ (everything else exits here, silent) ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ ELIGIBILITY FILTER safe read-only probe? AND undo authorable? │ └──────────────┬──────────────────────────────────────┬─────────────────┘ yes, probe it │ no probe here / now │ ▼ ▼ STAGE 2 · safe probe (read-only) heuristic estimate git status · reflog · rev-list from a static per-class docker inspect · ps · ls table — and LABELED sqlite SELECT count(*) [mode=ro] "(estimated)" so you pip/uv read lockfiles know it wasn't probed │ │ └─────────────────────┬─────────────────────┘ ▼ blast radius × reversibility (combined PER CLASS — no global formula) filesystem also folds in: dependency-graph centrality + recoverability ▼ score 0.0–1.0 → severity (low / medium / high / critical) ▼ PreToolUse hook: silent (low/med) · advise (high) · advise + snapshot (critical)

The eligibility filter is the design boundary. A command class earns a *live probe* only when both hold: (1) its impact is observable by a strictly side-effect-free read (HTTP-GET sense — never mutate state to assess state), and (2) its undo story is well-known enough to encode in a static table. When a probe can't run here and now (no docker daemon, no DB driver, no creds), the tool degrades to a labeled estimate — it never guesses silently, and it never blocks.

See docs/heuristics.md for the per-class tables, the exact filesystem formula, and calibration.

The five command classes
ClassDestructive ops it scoresSafe (read-only) probeReversibility signal
Filesystemrm -rf, mv, > truncatedependency graph + git statusgit-tracked? regenerable? secret? precious?
Gitreset --hard, push --force, branch -D, clean -fdxstatus · reflog · rev-list · rev-parse @{u}reflog window · remote ahead · protected branch
Dockervolume rm, system prune -a, rm -fvolume inspect · ps -a · volume lsvolume → none · container → recreatable from image
pip / uvpip uninstall, uv pip uninstallread lockfile / manifest (no subprocess)lockfile present → fully regenerable
SQLDROP, TRUNCATE, DELETE without WHERESQLite: SELECT count(*) mode=ro; transaction checkinside a transaction? backup posture?

New classes drop in behind one protocol (triage / assess) in src/blast_scope/classes/; each class confines assess to strictly side-effect-free reads.


Status

Calibrated multi-class guardrail with command resolution and a precise dependency graph.

CapabilityModule
Flag/operand-sensitive command model (POSIX and PowerShell)command_effects.py, command_parser.py
Command resolution — env/tilde/brace/glob expansion, unset-var hazards, script transparency (sh -c, npm run + pre/post hooks, script files, Makefile targets), read-only $(...) substitutionresolution.py
Dry-run oracles — git clean -n exact lists, reset divergence, checkout clobber preview, find -delete→-print rewrite, sqlite scoped-DELETE counts, rsync --dry-run; oracle targets feed the undo snapshotclasses/git.py, classes/find.py, classes/rsync.py, classes/sql.py
Recoverability classification (git state, secrets, regenerable, precious data)recoverability.py
Dependency graph + weighted PageRank centrality, incremental indexinggraph_resolver.py, centrality.py
Two-axis, evidence-based filesystem scoringrisk_scorer.py
Command-class probes — git / docker / pip·uv / SQL, behind one protocolclasses/
Out-of-graph path analyzers (infra / config-by-path) + git baseconsequences.py, vcs.py, infra.py, config_refs.py
PreToolUse hook + tarball snapshot/undohook.py, snapshot.py
Eval harness + labeled corpus + calibrationeval.py, tests/fixtures/eval_corpus.jsonl

Calibration. Two harnesses, both run-it-yourself:

  • In-repo corpus (tests/fixtures/eval_corpus.jsonl, 58 cases spanning every recoverability category, git working-tree state, infra/config, rm -rf .git, a graph-indexed central module, the git/docker/pip/SQL classes, and the resolution layer — unset-var collapses, glob/env-var targets, sh -c payloads, npm pre-hooks, opaque wrappers, mass destruction of tracked source) — 58/58 exact severity, gate F1 1.00, pinned by tests/test_eval.py with headroom so changes can't silently regress.
  • [SABER](https://github.com/sssr-lab/saber) — 716 real coding-agent workspaces. Against ~1725 safe commands, blast-scope's false-positive rate is 0.58%; on its core competency (data_destruction) it catches 82.4% of injected attacks on realistic workspaces — on the fast hook path, no graph required, thanks to command resolution (env/glob binding + script transparency). Wrapper transparency also lifts code_tampering from ~0% to 50%. The per-category recall is deliberately uneven, and the table says so: blast-scope scores *destructive consequence* — filesystem/data loss plus git/docker/pip/SQL state. Network exfiltration and persistence are a different threat model, out of scope by design — not an unfinished corner. That's the boundary, drawn on purpose. See bench/.
uv run python -m blast_scope.eval                 # in-repo corpus

python bench/saber_eval.py --tasks /dataset/data/tasks.jsonl # SABER


Installation

The fastest path for any MCP client is zero-install via uvx (no clone, no venv):

uvx blast-scope        # runs the MCP server on stdio

Claude Code users — one line wires up both the MCP tools and the advisory hook:

/plugin marketplace add Atharva-Jayappa/blast-scope

/plugin install blast-scope

For development, or to pin a checkout:

git clone https://github.com/Atharva-Jayappa/blast-scope.git

cd blast-scope && uv sync --all-extras


Usage

As an MCP server

Add to your MCP client config (e.g. Claude Code settings.json):

{

"mcpServers": { "blast-scope": { "command": "uvx", "args": ["blast-scope"], "type": "stdio" } } }

Tools exposed:

ToolPurpose
assess_command(command, cwd?, project_root?)Score a (possibly chained) command. Returns score, severity, rationale, evidence, recoverability, affected nodes, and a per-segment chain breakdown.
index_project(project_root)Force a dependency-graph rebuild (auto-built on first use otherwise).
list_snapshots(project_root)List undo snapshots, newest first.
restore_snapshot(snapshot_id, project_root)Undo a risky command by restoring its snapshot.
As a hook (tiered advice + auto-snapshot)

Intercept Bash commands *before* they run — advisory, never blocking. Volume scales with stakes: silent on low/medium, advise on high, advise + snapshot on critical. The snapshot skips what's already recoverable (git-clean, regenerable) and warns rather than tars anything over a hard size cap, so the undo net stays fast and trustworthy.

The hooks also keep the dependency graph alive on their own — no MCP call needed: SessionStart cold-builds it in a detached background process, and every PreToolUse refreshes it incrementally before scoring (a ~20 ms stat sweep when nothing changed), so verdicts track the current tree even after a burst of agent edits. Add to .claude/settings.json:

{

"hooks": { "SessionStart": [ { "hooks": [{ "type": "command", "command": "python -m blast_scope.hook" }] } ], "PreToolUse": [ { "matcher": "Bash", "hooks": [{ "type": "command", "command": "python -m blast_scope.hook" }] } ] } }

Full details and the undo flow: docs/hook.md.


Example output

A filesystem command, scored against the dependency graph:

// assess_command("rm -rf ./config", project_root="/proj")

{ "score": 0.93, "severity": "critical", "recommendation": "block", "recoverability": "untracked", "rationale": "rm targets config. 8 direct importer(s), 14 total affected. not git-tracked. recursive deletion. CRITICAL risk.", "evidence": [ "8 importer(s), 14 affected node(s)", "high centrality (PageRank 0.91) — a hub other code routes through", "untracked — not in git history", "recursive — applies to every file underneath" ], "affected_nodes": [ /* ... */ ], "chain": [ /* per-segment breakdown */ ] }

A command class

ตัดมาแค่ช่วงต้น อ่านต่อใน repo