ソース情報
- リポジトリ
- ag2ai/resource-hub
- ソースの最終更新活動
- 2026年3月19日 06:20
- 検出された SKILL.md の言語
- 英語
- スター
- 4
- フォーク
- 3
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/ag2ai/resource-hub --skill add-frontend-pageコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
REST and WebSocket endpoint patterns, error handling, and Pydantic schema conventions for the backend
Architecture, directory layout, communication protocol, and conventions for the full-stack multi-agent application
Step-by-step guide to add a new REST or WebSocket endpoint to the backend
SKILL.md を表示中
SOC 職業分類に基づく
| name | add-frontend-page |
| description | Step-by-step guide to add a new page or component to the React frontend |
| license | Apache-2.0 |
Create frontend/src/components/MyComponent.tsx:
import { useState } from "react";
interface Props {
title: string;
}
export function MyComponent({ title }: Props) {
const [data, setData] = useState<string>("");
return (
<div>
<h2>{title}</h2>
<p>{data || "No data yet."}</p>
</div>
);
}
Rules:
App.tsx)Props interface for all component propsfrontend/src/components/import { MyComponent } from "./components/MyComponent";
export default function App() {
return (
<div style={{ maxWidth: 800, margin: "0 auto", padding: "2rem" }}>
<h1>Project Name</h1>
<MyComponent title="Dashboard" />
<Chat />
</div>
);
}
import { useEffect, useState } from "react";
export function Dashboard() {
const [health, setHealth] = useState<{ status: string; agents: string[] } | null>(null);
useEffect(() => {
fetch("/api/health")
.then((r) => r.json())
.then(setHealth);
}, []);
if (!health) return <p>Loading...</p>;
return (
<div>
<p>Status: {health.status}</p>
<ul>
{health.agents.map((a) => (
<li key={a}>{a}</li>
))}
</ul>
</div>
);
}
Use the same pattern as Chat.tsx:
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const ws = new WebSocket(`${protocol}//${window.location.host}/ws/chat`);
ws.onopen = () => ws.send(JSON.stringify({ message: text }));
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
// Handle msg.type: "agent_message", "status", "error", "done"
};
This template uses inline styles for simplicity. When adding styles:
style={{}} for one-off stylingmaxWidth: 800, margin: "0 auto" for content sectionsMyComponent.module.cssfrontend/src/components/ with typed PropsApp.tsx/api/ or /ws/ prefix (Vite proxies to backend)