ida-hub-agent-skills
CLAUDE.md25 starsChanged 8 months agoMITView on GitHub
Distributed IDA Chat architecture: multiple IDA Pro instances connect to a central Hub via WebSocket; external Agents/frontends interact with specific IDA instances through HTTP API. No test framework or linter configured. Turborepo test/lint tasks are defined but no-op. Type safety relies on TypeScript strict mode. Module-level CLAUDE.md files: ida_plugins/CLAUDE.md (plugin architecture, data models, FAQ), skills/CLAUDE.md (skill installation & maintenance). Read these before modifying the corresponding module. Single users table (SQLite, bun:sqlite + Drizzle ORM): Schema: packages/shared/src/db/schema.ts. No Drizzle migration files…
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ida_plugins/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- ida-hubSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 134
Read before modifying — check module-level CLAUDE.md before diving into source
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Distributed IDA Chat architecture: multiple IDA Pro instances connect to a central Hub via WebSocket; external Agents/frontends interact with specific IDA instances through HTTP API.
Common Commands
# Install dependencies
bun install
# Development (API + frontend separately)
bun run dev:api # Hono backend http://0.0.0.0:10086
bun run dev:web # Vite frontend http://localhost:5173 (proxies /api, /ws → 10086)
# Run source directly (dev/debug)
bun apps/api/src/server.ts --host 0.0.0.0 --port 10086 --debug
# Build (Turborepo topological order: shared → api + web)
bun run build
# Bundle for deployment
bun run bundle # build + minify JS + embed web assets into apps/api/web/
bun run bundle:bin # bundle + standalone binary: apps/api/dist/ida-hub
bun run start # run built artifact dist/server.js
# Clean
bun run clean # remove all build artifactsNo test framework or linter configured. Turborepo test/lint tasks are defined but no-op. Type safety relies on TypeScript strict mode.
Architecture Overview
IDA Plugin ──WebSocket(/ws)──▶ Hub API (apps/api) ◀──HTTP(/api/*)── Agent / Frontend (apps/web)
│
packages/shared (types, validators, DB, config, logger)Monorepo Structure
| Package | Language | Role | Entry |
apps/api | TypeScript (Bun) | Hono HTTP + WebSocket server | src/server.ts → src/app.ts |
apps/web | TypeScript/React | Vite SPA frontend | src/main.tsx |
packages/shared | TypeScript | Shared types, Zod validators, Drizzle ORM, CLI config, consola logger | src/index.ts |
ida_plugins | Python | IDA plugin: WebSocket connection + script execution | ida_multi_chat_entry.py |
skills | Markdown | Agent skill docs (npx skills add compatible) | ida-hub/SKILL.md |
Module-level CLAUDE.md files: ida_plugins/CLAUDE.md (plugin architecture, data models, FAQ), skills/CLAUDE.md (skill installation & maintenance). Read these before modifying the corresponding module.
Backend Key Paths
server.ts: Bun.serve() startup + static file hosting + SPA fallbackapp.ts: middleware/route assembly, DB/Registry/network probe initializationregistry/index.ts: IDA instance registration, execute request dispatch with timeout, user isolationws/handler.ts: WebSocket connection state machine (auth → register → execute_result), managed viaWeakMap<WSContext, ConnState>middleware/auth.ts: Bearer token authentication
Frontend Key Paths
- Routing:
react-router-domv7, 4 pages (/login,/,/ida_config,/agent_config),AuthGuardcomponent protects non-login pages - Data fetching: SWR, Dashboard instance list polls every 5s (
refreshInterval: 5000) - i18n: custom
I18nProvider+useI18n()hook, zh/en, type-safe keys, locale stored inlocalStorage(ida_hub_locale) - Auth state:
localStorage(ida_hub_token/ida_hub_username), auto-redirect to/loginon API 401 - API client: centralized in
lib/api.ts, supportsVITE_HUB_URLenv var for remote Hub address - Styling: Tailwind CSS v3 + CSS variable design tokens (orange brand color, custom radius/animations/font stacks)
Database
Single users table (SQLite, bun:sqlite + Drizzle ORM):
| Column | Type | Constraints |
id | INTEGER | PRIMARY KEY AUTOINCREMENT |
username | TEXT | NOT NULL UNIQUE |
password_hash | TEXT | NOT NULL |
token | TEXT | NOT NULL UNIQUE |
created_at | TEXT | NOT NULL DEFAULT datetime('now') |
Schema: packages/shared/src/db/schema.ts. No Drizzle migration files — table created imperatively in initDB() via sqlite.exec(). PRAGMA: journal_mode = WAL.
HTTP API
| Method | Path | Description |
| POST | /api/auth/register | Register user |
| POST | /api/auth/login | Login, returns token |
| GET | /api/instances | List current user's IDA instances |
| POST | /api/execute | Execute code on a specific instance |
| GET | /api/network/interfaces | List server network interfaces |
| GET | /api/agent_config | Get Agent config as Markdown |
| GET | /api/ida_config | Get IDA plugin config string |
| GET | /healthz | Health check |
WebSocket Protocol
Connection: ws://<host>:10086/ws?token=<token>
Message flow: register → register_ack → (execute ↔ execute_result)
Close codes: 4000 REPLACED / 4001 REGISTER_REQUIRED / 4002 REGISTER_TIMEOUT / 4003 AUTH_FAILED
Configuration
No environment variables — all config via CLI args (node:util parseArgs + Zod validation):
| Flag | Default | Description |
--host | 0.0.0.0 | Listen address |
--port | 10086 | Listen port |
--timeout | 30 | Execute timeout in seconds |
--db | ~/.ida_hub/hub_users.db | SQLite database path |
--debug | false | Enable debug logging |
Coding Conventions
- TypeScript: strict mode, ESM, type annotations
packages/sharedbuilt withtsc, re-exports must use.jsextensionpostcss.configandtailwind.configmust use.cjsextension ("type": "module")bun:sqlitepragma viasqlite.exec("PRAGMA ..."), not.pragma()- Drizzle ORM uses
drizzle-orm/bun-sqlitedriver - Frontend uses
@/path alias (Vite resolve.alias →src/) - React components: single responsibility, API calls centralized in
lib/api.ts - Python (plugin): type annotations, clear module boundaries
- Code comments: keep consistent with existing codebase language (Chinese)
AI Usage Guide
- Read before modifying — check module-level
CLAUDE.mdbefore diving into source - For cross-component debugging, trace the full chain: Frontend → Hub API → WS → Plugin
- For large output tasks, prefer summaries — avoid returning full datasets from IDA (output budget 200k chars)
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
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.

