create-full-stack-panel-feature-with-server-wiring
できること
このスキルは、バックエンド、フロントエンド、サーバーの接続にまたがる新しいダッシュボードのパネルを追加するよう、AIエージェントに導きます。新しいパネルを既存のコードに合わせたい開発者向けです。
使う場面
- ✓ダッシュボードや管理画面に、新しいパネルの種類を追加するとき。
- ✓機能がサーバーのルート、サービス、UIコンポーネントにまたがるとき。
- ✓サーバーがExpressのルーティングではなく、手動のリクエストの振り分けを使っているとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/create-full-stack-panel-feature-with-server-wiring/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ダッシュボードに新しいメトリクスのパネルを、サーバーのルートとサービスを含めて追加してください。動くようにルートをサーバーに接続してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、既存のルート、サービス、コンポーネント、サーバーのエントリーポイントの例を探します。それを読んで規約を理解し、新しいファイルを作成して、サーバーの振り分けの表に新しいルートのハンドラーを追加します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Create Full-Stack Panel Feature (with Server Wiring)
This skill guides you through creating a complete, pattern-consistent panel feature across all application layers: backend API routes, service logic, frontend components, registration, styling — and crucially, wiring the new route handler into the server's dispatch table, whether that uses Express or a manual http.createServer pattern.
When to Use
- Adding a new panel type to a dashboard or admin interface
- Creating a feature that spans multiple architectural layers
- Ensuring consistency with existing codebase patterns across the stack
- Projects that use a manual
http.createServerdispatch loop instead of Express router mounting
Workflow Steps
1. Identify Pattern Files
Locate existing examples for each layer you need to implement:
# Find existing server routes
find . -name "*route*.js" -o -name "*routes*.js" -o -name "*route*.ts" -o -name "*routes*.ts" | grep -E "(panel|dashboard|server)"
# Find service files
find . -name "*service*.js" -o -name "*service*.ts" | grep -E "(panel|dashboard|server)"
# Find UI components
find . -name "*.jsx" -o -name "*.tsx" -o -name "*.ts" | grep -i panel
# Find the server entry point (critical for wiring step)
find . -name "index.ts" -o -name "index.js" -o -name "server.ts" -o -name "server.js" | grep -v node_modules | head -10
# Find registration/config files
find . -name "*config*.js" -o -name "*registry*.js" -o -name "*config*.ts" -o -name "*registry*.ts"
# Find styling files
find . -name "*.css" -o -name "*.scss" | grep -i panel
2. Read and Analyze Patterns
Read 1-2 representative examples from each layer to understand:
- Naming conventions (e.g.,
MetricsPanel,metrics-service.ts) - Code structure and organization
- Import/export patterns
- Registration mechanisms
- API endpoint patterns
- Error handling approaches
- Styling conventions
Also read the server entry point (server/index.ts, src/server.ts, etc.) to determine which dispatch pattern is used:
# Read the server entry point to identify routing mechanism
cat server/index.ts # or server/index.js, src/server.ts, etc.
Example analysis checklist:
Server Route Pattern:
- ✓ Endpoint naming: /api/panels/{type}
- ✓ Authentication middleware
- ✓ Response format: { success, data, error }
Service Pattern:
- ✓ Export structure: class vs functions
- ✓ Data transformation logic
- ✓ Error propagation
Component Pattern:
- ✓ Props interface
- ✓ State management (hooks/class)
- ✓ Data fetching approach
- ✓ Loading/error states
Registration Pattern:
- ✓ Registry file location
- ✓ Registration format (array/object)
- ✓ Required metadata fields
Server Dispatch Pattern:
- ✓ Express app.use() / router.use() → Express routing
- ✓ switch/case on url/pathname → Manual dispatch table
- ✓ if/else if chain on url → Manual dispatch chain
- ✓ handler map object { '/path': fn }→ Handler map pattern
3. Plan Your Feature Files
Based on patterns, list the files you need to create and the existing files you need to update:
Typical full-stack panel structure:
- Server route handler (e.g.,
server/routes/system-health-route.ts) - Service layer (e.g.,
server/services/system-health-service.ts) - UI component (e.g.,
client/panels/SystemHealthPanel.ts) - Panel registration (e.g., update
client/config/panel-registry.ts) - Styling (e.g.,
client/styles/system-health-panel.css) - Type definitions (if TypeScript, e.g.,
types/system-health.ts) - ⚠️ Server wiring (update
server/index.tsto import and dispatch to the new handler)
3b. Detect Project Framework
Before selecting templates in Step 4, determine the frontend framework in use:
# Check for React
grep -s "react" package.json | head -5
# Check for TypeScript without React (vanilla TS)
ls client/components/*.ts 2>/dev/null | head -3
ls client/panels/*.ts 2>/dev/null | head -3
# Check for a Panel base class (common in vanilla TS dashboards)
grep -r "class.*Panel" client/ --include="*.ts" -l | head -3
grep -r "extends Panel" client/ --include="*.ts" -l | head -3
Decision rule:
- If
reactorreact-domis present inpackage.json→ use the React/JSX template (Step 4C-React). - If components are
.tsfiles extending aPanelbase class → use the Vanilla TS template (Step 4C-Vanilla). - When in doubt, read one or two existing component files to conf
よくある質問
なぜ最初にサーバーのエントリーポイントを探すのですか?
接続の手順は、サーバーがリクエストを振り分ける方法によって決まるため、先に確認する必要があるからです。
Expressでも動きますか?
はい。スキルは、Expressのミドルウェアと、手動のhttp.createServerによるswitchやcaseの両方を扱います。
既存のスタイルに合いますか?
はい。エージェントは既存の例を読み、新しいコードが同じパターンに従うようにします。
詳細
作者による元の説明
Multi-layer workflow for creating complete panel features by analyzing existing patterns and generating coordinated server routes, services, UI components, registration, styling files, AND explicitly wiring new handlers into the server's dispatch table (supports both Express middleware and manual http.createServer switch/case patterns).
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #13041
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
agentpilot
7.8kエージェントが、作業を準備し、変更案を提案してテストし、評価するAgentPilotのループを実行することで、プロジェクトを段階的に改善できるよう支援します。
openspace
7.8kエージェントが、スキルを保存し取り出すツールであるOpenSpaceをセットアップし、MCPを通じてAIアプリに接続できるよう支援します。
rsi-arena
7.8kエージェントが、AIMEやTerminal-Benchなどの標準的なAIベンチマークテストをセットアップして実行し、異なる改善方法を比較できるよう支援します。
experiment-guide
7.8kエージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。