agentleFS
veritas501veritas501/ida-hub-agent-skills/CLAUDE.md

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…

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
  1. Distinctive:

    Read before modifying — check module-level CLAUDE.md before diving into source

    line 134

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 artifacts

No 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

PackageLanguageRoleEntry
apps/apiTypeScript (Bun)Hono HTTP + WebSocket serversrc/server.ts → src/app.ts
apps/webTypeScript/ReactVite SPA frontendsrc/main.tsx
packages/sharedTypeScriptShared types, Zod validators, Drizzle ORM, CLI config, consola loggersrc/index.ts
ida_pluginsPythonIDA plugin: WebSocket connection + script executionida_multi_chat_entry.py
skillsMarkdownAgent 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 fallback
  • app.ts: middleware/route assembly, DB/Registry/network probe initialization
  • registry/index.ts: IDA instance registration, execute request dispatch with timeout, user isolation
  • ws/handler.ts: WebSocket connection state machine (auth → register → execute_result), managed via WeakMap<WSContext, ConnState>
  • middleware/auth.ts: Bearer token authentication

Frontend Key Paths

  • Routing: react-router-dom v7, 4 pages (/login, /, /ida_config, /agent_config), AuthGuard component 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 in localStorage (ida_hub_locale)
  • Auth state: localStorage (ida_hub_token/ida_hub_username), auto-redirect to /login on API 401
  • API client: centralized in lib/api.ts, supports VITE_HUB_URL env 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):

ColumnTypeConstraints
idINTEGERPRIMARY KEY AUTOINCREMENT
usernameTEXTNOT NULL UNIQUE
password_hashTEXTNOT NULL
tokenTEXTNOT NULL UNIQUE
created_atTEXTNOT 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

MethodPathDescription
POST/api/auth/registerRegister user
POST/api/auth/loginLogin, returns token
GET/api/instancesList current user's IDA instances
POST/api/executeExecute code on a specific instance
GET/api/network/interfacesList server network interfaces
GET/api/agent_configGet Agent config as Markdown
GET/api/ida_configGet IDA plugin config string
GET/healthzHealth 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):

FlagDefaultDescription
--host0.0.0.0Listen address
--port10086Listen port
--timeout30Execute timeout in seconds
--db~/.ida_hub/hub_users.dbSQLite database path
--debugfalseEnable debug logging

Coding Conventions

  • TypeScript: strict mode, ESM, type annotations
  • packages/shared built with tsc, re-exports must use .js extension
  • postcss.config and tailwind.config must use .cjs extension ("type": "module")
  • bun:sqlite pragma via sqlite.exec("PRAGMA ..."), not .pragma()
  • Drizzle ORM uses drizzle-orm/bun-sqlite driver
  • 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.md before 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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.