Pular para o conteúdo
Skillpedia
Sites e telas (frontend)7,8 mil · #13055

full-stack-panel-authoring

O que ela faz

Esta skill orienta o agente de IA por um fluxo de trabalho completo para acrescentar um painel de dashboard. É para desenvolvedores que querem o backend, o componente e o registro feitos juntos, de forma consistente.

Quando usar

  • ✓Quando você está adicionando um novo tipo de painel a um dashboard em TypeScript puro.
  • ✓Quando uma funcionalidade precisa de uma rota no servidor, um serviço, um componente e registro.
  • ✓Quando o servidor usa um laço de despacho manual ou o Express.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/full-stack-panel-authoring/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Adicione um novo painel ao meu dashboard em TypeScript puro, desde a rota do servidor até o componente registrado.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente primeiro explora a estrutura do projeto e o padrão de despacho do servidor, depois cria, em ordem, os arquivos de rota, serviço, componente e registro. Liga a nova rota ao servidor e confere a lista de arquivos com o que foi construído.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

Quais arquivos ela cria?

A lista de verificação da skill inclui um arquivo de rota, um serviço, um componente de painel, uma exportação, uma entrada de despacho do servidor e utilitários compartilhados.

Por que explorar o projeto primeiro?

A skill diz que ler os padrões existentes evita desvios de estilo e mostra como as requisições são despachadas.

Inclui resiliência?

Sim. O componente usa um circuit breaker e salva o estado do painel no localStorage.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
7,8 mil
Posição no ranking
#13055
Licença
MIT
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas