मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)7.8k · #13055

full-stack-panel-authoring

यह क्या करती है

यह स्किल AI एजेंट को डैशबोर्ड पैनल जोड़ने के लिए एक पूरा वर्कफ़्लो देती है। यह उन डेवलपर्स के लिए है जो बैकएंड, कंपोनेंट और रजिस्ट्रेशन एक साथ, एक सुसंगत तरीके से करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप सादे TypeScript डैशबोर्ड में नया पैनल प्रकार जोड़ रहे हों।
  • ✓जब किसी फ़ीचर में सर्वर रूट, सर्विस, कंपोनेंट और रजिस्ट्रेशन की ज़रूरत हो।
  • ✓जब सर्वर मैन्युअल डिस्पैच लूप या Express इस्तेमाल करता हो।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/full-stack-panel-authoring/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे सादे TypeScript डैशबोर्ड में नया पैनल जोड़िए, सर्वर रूट से लेकर रजिस्टर्ड कंपोनेंट तक।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट पहले प्रोजेक्ट संरचना और सर्वर डिस्पैच पैटर्न खोजता है, फिर क्रम से रूट, सर्विस, कंपोनेंट और रजिस्ट्रेशन फ़ाइलें बनाता है। वह नए रूट को सर्वर से जोड़ता है और बनाई गई फ़ाइलों की सूची को जो बना था उससे मिलाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल

कौन सी फ़ाइलें बनती हैं?

स्किल की चेकलिस्ट में रूट फ़ाइल, सर्विस, पैनल कंपोनेंट, एक्सपोर्ट, सर्वर डिस्पैच एंट्री और साझा यूटिलिटी शामिल हैं।

पहले प्रोजेक्ट क्यों खंगालें?

स्किल के अनुसार मौजूदा पैटर्न पढ़ने से स्टाइल में बदलाव नहीं होता और दिखता है कि अनुरोध कैसे डिस्पैच होते हैं।

क्या इसमें रेज़िलिएंस भी शामिल है?

हां, कंपोनेंट सर्किट ब्रेकर इस्तेमाल करता है और पैनल की स्थिति localStorage में सहेजता है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
7.8k
रैंकिंग में स्थान
#13055
लाइसेंस
MIT
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills