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

create-full-stack-panel-feature-with-server-wiring

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

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

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

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

Skill का लिंक

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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

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

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

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

“मेरे डैशबोर्ड में एक नया मेट्रिक्स पैनल जोड़िए, उसका सर्वर रूट और सर्विस भी बनाइए, और रूट को सर्वर से जोड़िए ताकि वह चले।”

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

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

एजेंट रूट, सर्विस, कंपोनेंट और सर्वर एंट्री पॉइंट के मौजूदा उदाहरण खोजता है। उन्हें पढ़कर नियम समझने के बाद वह नई फ़ाइलें बनाता है और नया रूट हैंडलर सर्वर की dispatch तालिका में जोड़ता है।

तकनीकी सामग्री (मूल 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.createServer dispatch 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:

  1. Server route handler (e.g., server/routes/system-health-route.ts)
  2. Service layer (e.g., server/services/system-health-service.ts)
  3. UI component (e.g., client/panels/SystemHealthPanel.ts)
  4. Panel registration (e.g., update client/config/panel-registry.ts)
  5. Styling (e.g., client/styles/system-health-panel.css)
  6. Type definitions (if TypeScript, e.g., types/system-health.ts)
  7. ⚠️ Server wiring (update server/index.ts to 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 react or react-dom is present in package.json → use the React/JSX template (Step 4C-React).
  • If components are .ts files extending a Panel base 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
अपडेट की गई
1/11/2026

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

0

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

कमेंट

  • …

इस repository की और skills

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