本文へ移動
cccskills
無料GitHub で公開

quantum-router-bugfix

Diagnoses and fixes routing errors in the Quantum C2 framework — missing enum values, 500 errors on API endpoints, FastAPI type mismatches, and React build failures. Use when a feature crashes with 500 errors, when new code references undefined enums, or when frontend builds fail after adding new pages.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstationスター 5(GitHub 5 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Quantum Router Bugfix

Diagnoses and repairs routing/endpoint failures in the Quantum C2 framework.

Common Failure Modes

1. Missing Enum Value (500 on API call)

Symptom: assess_device or similar endpoint returns 500. Check gateway code for RouterVulnType references.

Root cause: A vulnerability record or code path references an enum value not defined in the enum class.

Fix:

# In router_gateway.py, add missing value to RouterVulnType
class RouterVulnType(str, Enum):
    # ... existing values ...
    INJECTION = "injection"  # Add missing enum

2. FastAPI Router Not Registered

Symptom: 404 on /api/router-exploit/* endpoints.

Root cause: Router not imported/registered in app/main.py.

Fix:

# In main.py or app initialization
from app.routers.router_exploit import router as router_exploit_router
app.include_router(router_exploit_router)

3. Pydantic Model Mismatch

Symptom: 422 Validation Error on POST requests.

Root cause: Request body schema doesn't match Pydantic model.

Fix: Verify CustomExploitRequest and DisclosureRequest models match frontend payload.

4. React Build Failure

Symptom: npx vite build fails with import errors.

Root cause: Page component not exported, route not added, or syntax error in JSX.

Fix:

# Check for syntax errors
python -m py_compile path/to/file.py

# Check frontend build
cd frontend && npx vite build 2>&1 | tail -20

Diagnostic Workflow

# Step 1: Reproduce the error
curl -s -X POST https://localhost:4433/api/router-exploit/assess/DEVICE_ID \
  -H "Content-Type: application/json"

# Step 2: Check backend logs
# Look for: AttributeError, KeyError, ValueError

# Step 3: Verify enum completeness
python -c "
from app.gateways.router_exploit.router_gateway import RouterVulnType
print([e.value for e in RouterVulnType])
"

# Step 4: Check all vulnerability records reference valid enums
python -c "
from app.gateways.router_exploit.router_gateway import get_router_vuln_db
db = get_router_vuln_db()
for vuln in db.VULNERABILITIES.values():
    try:
        t = RouterVulnType(vuln['type'])
    except ValueError as e:
        print(f'INVALID type for {vuln[\"cve\"]}: {vuln[\"type\"]}')
"

# Step 5: Rebuild frontend
cd frontend && npx vite build

Fix Patterns

Adding Missing Enum Value

# File: backend/app/gateways/router_exploit/router_gateway.py
class RouterVulnType(str, Enum):
    # existing values...
    INJECTION = "injection"  # NEW

Adding New API Endpoint

# File: backend/app/routers/router_exploit.py
from pydantic import BaseModel

class NewRequest(BaseModel):
    field1: str
    field2: int = 0

@router.post("/new/endpoint")
async def new_endpoint(req: NewRequest):
    mgr = get_router_exploit_manager()
    return mgr.new_method(req.field1, req.field2)

Adding Frontend Page

// File: frontend/src/pages/NewPage.jsx
export default function NewPage() {
  return (
    <div className="q-page-shell">
      <header className="q-page-header">
        <div>
          <div className="q-eyebrow">Section</div>
          <h1>Page Title</h1>
          <p>Description.</p>
        </div>
      </header>
      {/* Content */}
    </div>
  );
}
// File: frontend/src/router/routes.jsx
const NewPage = lazy(() => import('../pages/NewPage'));
// ...
<Route path="/new-page" element={<NewPage />} />
// File: frontend/src/components/layout/Sidebar.jsx
{ label: "New Page", to: "/new-page" },

Verification Checklist

  • Backend compiles: python -m py_compile <file>.py
  • Frontend builds: npx vite build exits 0
  • API endpoint responds: curl returns JSON, not 500
  • Enum values match all references
  • New routes registered in routes.jsx
  • New navigation item added to Sidebar.jsx
  • Tests pass: python -m pytest tests/unit/ -q

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

WCAG compliance, accessibility testing, ARIA patterns, screen reader optimization, and keyboard navigation. Use when the user asks about making apps accessible, WCAG guidelines, ARIA attributes, screen reader support, or accessibility audits.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

ace-music

無料

Generate AI music using ACE-Step 1.5 via ACE Music's free API. Use when the user asks to create, generate, or compose music, songs, beats, instrumentals, or audio tracks. Supports lyrics, style prompts, covers, and repainting. Free API, no cost.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

A continuously adaptive skill suite that empowers Clawdbot to act as a versatile coder, business analyst, project manager, web developer, data analyst, and NAS metadata scraper. It intelligently discovers free resources, adapts to user context, and ensures reliable, proven guidance across multiple domains.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

High-fidelity intelligence gathering and data assimilation. Focuses on synthesizing fragmented data into a comprehensive target operational picture.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

Use when Codex needs proactive task queues, heartbeat routines, scheduled follow-up, or continuous work loops instead of waiting for prompts.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

日本語の概要は準備中です。原文の説明を表示しています。

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026年9月4日 更新

ProjectZeroDays のスキルをすべて見る

このスキルの問題を報告する