Langsung ke konten
Skillpedia
Website & UI (frontend)7.8k Β· #13055

full-stack-panel-authoring

Fungsinya

Skill ini memandu agent AI melalui satu alur kerja lengkap untuk menambahkan panel dasbor. Skill ini ditujukan untuk pengembang yang menginginkan backend, komponen, dan registrasi selesai bersama dengan cara yang konsisten.

Kapan dipakai

  • βœ“Saat Anda menambahkan jenis panel baru ke dasbor TypeScript biasa.
  • βœ“Saat sebuah fitur memerlukan rute server, layanan, komponen, dan registrasi.
  • βœ“Saat server memakai loop dispatch manual atau Express.

Link skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/full-stack-panel-authoring/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/full-stack-panel-authoring/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTambahkan panel baru ke dasbor TypeScript biasa saya, dari rute server sampai komponen yang terdaftar.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent pertama-tama menjelajahi struktur proyek dan pola dispatch server, lalu membuat file rute, layanan, komponen, dan registrasi secara berurutan. Agent menghubungkan rute baru ke server dan memeriksa daftar file dengan apa yang sudah dibangun.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Unified Full-Stack Panel Authoring

One guide for the complete workflow: backend route β†’ service β†’ server wiring β†’ Panel component with resilience β†’ registration. Eliminates the need to consult separate skills for what is always a single cohesive task.


When to Use

  • Adding a new panel type to a vanilla-TypeScript dashboard
  • Creating a feature that spans all layers: server route, service, component, registration
  • Ensuring pattern-consistency across the stack
  • Projects using a manual http.createServer dispatch loop or Express

Quick Reference β€” File Checklist

# File Action
1 server/routes/{feature}-route.ts Create
2 src/services/{feature}.ts Create
3 src/components/{Feature}Panel.ts Create
4 src/components/index.ts Update β€” add export
5 server/index.ts Update β€” import + dispatch case
6 src/utils/circuit-breaker.ts Create if absent
7 src/utils/sparkline.ts Create if absent

Step 1 β€” Explore Project Structure

Run these commands before writing a single line of code. Reading existing patterns prevents style drift and reveals the exact dispatch mechanism.

# Locate server entry point (critical for wiring)
find . -name "index.ts" -o -name "index.js" -o -name "server.ts" -o -name "server.js" \
  | grep -v node_modules | head -10

# Find existing route handlers to use as pattern files
find server/routes -name "*.ts" -o -name "*.js" 2>/dev/null | head -10

# Find existing service files
find src/services -name "*.ts" -o -name "*.js" 2>/dev/null | head -10

# Find existing Panel components
find src/components -name "*Panel.ts" 2>/dev/null | head -10

# Find the Panel base class
find src -name "Panel.ts" 2>/dev/null | head -5

# Find component registration index
find src/components -name "index.ts" 2>/dev/null | head -3

# Check for CircuitBreaker utility
find src/utils -name "circuit-breaker.ts" 2>/dev/null

# Check framework (should NOT find React in vanilla TS projects)
grep -s '"react"' package.json | head -3

Read 1-2 examples from each layer before generating any code:

cat server/routes/<existing>-route.ts
cat src/services/<existing>.ts
cat src/components/<existing>Panel.ts
cat src/components/index.ts
cat server/index.ts          # most important: reveals dispatch pattern

Step 2 β€” Detect Server Dispatch Pattern

Read server/index.ts (or server/index.js, src/server.ts) and classify:

# Express signals
grep -n "express\|app\.use\|router\." server/index.ts 2>/dev/null

# Manual http.createServer signals
grep -n "createServer\|switch.*url\|switch.*pathname\|req\.url\|case '/" server/index.ts 2>/dev/null
Pattern in file Wiring method (Step 5)
app.use('/api/x', xRouter) 5A - Express
switch(pathname) { case '/api/x': 5B - Manual switch/case
if (url.startsWith('/api/x')) 5C - Manual if/else chain
const handlers = { '/api/x': fn } 5D - Handler map

NOTE: Misidentifying the dispatch pattern is the most common cause of silent 404s. If unsure, read the full server entry point before proceeding.


Step 3 β€” Create the Server Route Handler

Use the manual dispatch template for http.createServer projects (most common in this codebase). Use the Express template only when Express is confirmed.

Manual dispatch (TypeScript) β€” preferred template

// server/routes/{feature}-route.ts
import { IncomingMessage, ServerResponse } from 'http';
import { fetch{Feature}Data } from '../../src/services/{feature}';

export async function handle{Feature}Request(
  req: IncomingMessage,
  res: ServerResponse,
  action?: string
): Promise<void> {
  try {
    const data = await fetch{Feature}Data(action);
    res.writeHead(200, { 'Content-Type': 'application/json' });
    res.end(JSON.stringify({ success: true, data }));
  } catch (err) {
    res.writeHead(500, { 'Content-Type': 'application/json' });
    res.end(JSON.stringify({
      success: false,
      error: err instanceof Error ? err.message : String(err)
    }));
  }
}

Express template (only when confirmed)

// server/routes/{feature}-route.ts
import { Router } from 'express';
import { fetch{Feature}Data } from '../../src/services/{feature}';

const router = Router();

router.get('/', async (req, res) => {
  try {
    const data = await fetch{Feature}Data(req.qu
Pertanyaan umum

File apa saja yang dibuat?

Daftar periksa skill mencakup file rute, layanan, komponen panel, ekspor, entri dispatch server, dan utilitas bersama.

Mengapa proyek dijelajahi dulu?

Skill ini menyatakan membaca pola yang ada mencegah pergeseran gaya dan menunjukkan cara permintaan dikirim.

Apakah ini mencakup ketahanan?

Ya. Komponen memakai circuit breaker dan menyimpan state panel di localStorage.

Detail

Deskripsi asli dari pembuat

Single cohesive workflow for creating complete dashboard panel features in vanilla TypeScript β€” covers project-structure exploration, server dispatch pattern detection and wiring (Express or manual http.createServer), Panel base class component authoring with CircuitBreaker resilience and localStorage persistence, panel registration in index.ts, and safe file writing (including emoji workarounds).

repo: HKUDS/AgentPilot

Popularitas

Bintang GitHub
7.8k
Peringkat
#13055
Lisensi
MIT
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa