xiaohongshu
xiaohongshu
collaboration-hub
Develop and modify the AILANG Collaboration Hub UI. Use when user asks to add features to the monitoring dashboard, modify the approval queue, update the message center, or make changes to the React frontend.
Full skill instructions
Build and modify the AILANG Collaboration Hub - a React-based UI for multi-agent coordination.
Starting the server:
ailang serve # Start on default port 1957
ailang serve --port 8080 # Use custom port
After making UI changes:
cd ui && npm run build # Build React app
cp -r ui/dist/* internal/server/dist/ # Copy to server
ailang serve # Restart server
Use this skill when the user asks to:
Backend (Go):
internal/server/server.go - HTTP server, REST API, WebSocketinternal/server/monitor.go - Process monitoring endpointsinternal/server/telemetry.go - Real-time telemetry WebSocketFrontend (React + TypeScript + Vite):
ui/
├── src/
│ ├── App.tsx # Main app, tabs, agent selector
│ ├── main.tsx # React entry point
│ ├── types/index.ts # TypeScript interfaces
│ ├── styles/ # CSS variables and themes
│ └── components/
│ ├── MessageCenter/ # Thread-based messaging
│ │ ├── MessageCenter.tsx # Main container, WebSocket
│ │ ├── ThreadList.tsx # Conversation list sidebar
│ │ └── ConversationView.tsx # Message display and input
│ ├── ApprovalQueue/ # Effect approval workflow
│ │ └── ApprovalQueue.tsx # Pending + history
│ └── Monitor/ # Process monitoring
│ └── Monitor.tsx # Live stats, telemetry
├── dist/ # Built assets (after npm run build)
└── package.json
Database:
~/.ailang/state/collaboration.dbThe UI uses CSS custom properties defined in ui/src/styles/:
/* Colors */
--color-primary: #25C2A0;
--color-success: #10B981;
--color-warning: #F59E0B;
--color-danger: #EF4444;
/* Backgrounds */
--bg-base: #0D1117;
--bg-surface: #161B22;
--bg-elevated: #21262D;
--bg-hover: #30363D;
/* Text */
--text-primary: #E6EDF3;
--text-secondary: #8B949E;
--text-tertiary: #6E7681;
/* Spacing */
--space-1 through --space-8
/* Typography */
--text-xs through --text-xl
--font-medium, --font-semibold, --font-bold
Threads:
GET /api/threads - List all threadsPOST /api/threads - Create threadGET /api/threads/:id/messages - Get messagesMessages:
POST /api/messages - Send messageApprovals:
GET /api/approvals?status=pending - Pending approvalsGET /api/approvals?status=approved - Approved historyGET /api/approvals?status=rejected - Rejected historyPOST /api/approvals/:id/approve - Approve with notesPOST /api/approvals/:id/reject - Reject with notesMonitor:
GET /api/monitor - Process stats + historyWebSocket:
ws://localhost:1957/ws - Real-time events
new_message - New message in threadthread_state - Thread status changetelemetry - Live process metricsKey types in ui/src/types/index.ts:
interface Thread {
id: string;
title: string;
status: 'active' | 'paused' | 'resolved' | 'archived';
target_agent?: string;
last_seq: number;
// ...
}
interface Message {
id: string;
thread_id: string;
kind: 'directive' | 'status' | 'result' | 'approval_request';
content: string;
sender_type: 'human' | 'agent';
// ...
}
interface Approval {
id: string;
status: 'pending' | 'approved' | 'rejected';
proposal: string;
impact: 'low' | 'medium' | 'high';
estimated_cost: number;
effect_delta_json: string;
reviewed_by?: string;
review_notes?: string;
// ...
}
Add tab state in App.tsx:
const [activeTab, setActiveTab] = useState<'messages' | 'approvals' | 'monitor' | 'newtab'>
Add tab button in nav:
<button className={`tab ${activeTab === 'newtab' ? 'active' : ''}`}
onClick={() => setActiveTab('newtab')}>
New Tab
</button>
Add component render:
{activeTab === 'newtab' && <NewComponent />}
internal/server/server.gosetupRoutes()Use CSS-in-JS pattern with <style> tags:
<div className="my-component">
{/* content */}
<style>{`
.my-component {
background: var(--bg-surface);
padding: var(--space-4);
border-radius: var(--radius-md);
}
`}</style>
</div>
ui/src/cd ui && npm run buildcp -r ui/dist/* internal/server/dist/ailang serve and open browserFor hot reload during development:
cd ui && npm run dev # Runs Vite dev server on :5173
# But you'll need to proxy API calls - easier to just rebuild
Server won't start:
lsof -i :1957ailang serve --port 8080UI changes not appearing:
cd ui && npm run buildcp -r ui/dist/* internal/server/dist/WebSocket not connecting:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience