[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XC63FY4ZKJMGA9B8VA9EJD":3,"skill-same:01M6XC63FY4ZKJMGA9B8VA9EJD":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":13,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6XC63FY4ZKJMGA9B8VA9EJD","create-full-stack-panel-feature-with-server-wiring",null,"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\u002Fcase patterns).","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fcreate-full-stack-panel-feature-with-server-wiring\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"wiring","create","server","create full stack panel feature","stack","create full stack panel feature with server wiring","full stack","full","feature","panel","with","express","features","layer","middleware","workflow","files","styling","analyzing","components","2026-11-10 10:12:30",false,"---\nname: create-full-stack-panel-feature-with-server-wiring\ndescription: 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\u002Fcase patterns).\n---\n\n# Create Full-Stack Panel Feature (with Server Wiring)\n\nThis 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.\n\n## When to Use\n\n- Adding a new panel type to a dashboard or admin interface\n- Creating a feature that spans multiple architectural layers\n- Ensuring consistency with existing codebase patterns across the stack\n- Projects that use a manual `http.createServer` dispatch loop instead of Express router mounting\n\n## Workflow Steps\n\n### 1. Identify Pattern Files\n\nLocate existing examples for each layer you need to implement:\n\n```bash\n# Find existing server routes\nfind . -name \"*route*.js\" -o -name \"*routes*.js\" -o -name \"*route*.ts\" -o -name \"*routes*.ts\" | grep -E \"(panel|dashboard|server)\"\n\n# Find service files\nfind . -name \"*service*.js\" -o -name \"*service*.ts\" | grep -E \"(panel|dashboard|server)\"\n\n# Find UI components\nfind . -name \"*.jsx\" -o -name \"*.tsx\" -o -name \"*.ts\" | grep -i panel\n\n# Find the server entry point (critical for wiring step)\nfind . -name \"index.ts\" -o -name \"index.js\" -o -name \"server.ts\" -o -name \"server.js\" | grep -v node_modules | head -10\n\n# Find registration\u002Fconfig files\nfind . -name \"*config*.js\" -o -name \"*registry*.js\" -o -name \"*config*.ts\" -o -name \"*registry*.ts\"\n\n# Find styling files\nfind . -name \"*.css\" -o -name \"*.scss\" | grep -i panel\n```\n\n### 2. Read and Analyze Patterns\n\nRead 1-2 representative examples from **each layer** to understand:\n\n- Naming conventions (e.g., `MetricsPanel`, `metrics-service.ts`)\n- Code structure and organization\n- Import\u002Fexport patterns\n- Registration mechanisms\n- API endpoint patterns\n- Error handling approaches\n- Styling conventions\n\n**Also read the server entry point** (`server\u002Findex.ts`, `src\u002Fserver.ts`, etc.) to determine which dispatch pattern is used:\n\n```bash\n# Read the server entry point to identify routing mechanism\ncat server\u002Findex.ts   # or server\u002Findex.js, src\u002Fserver.ts, etc.\n```\n\n**Example analysis checklist:**\n\n```\nServer Route Pattern:\n- ✓ Endpoint naming: \u002Fapi\u002Fpanels\u002F{type}\n- ✓ Authentication middleware\n- ✓ Response format: { success, data, error }\n\nService Pattern:\n- ✓ Export structure: class vs functions\n- ✓ Data transformation logic\n- ✓ Error propagation\n\nComponent Pattern:\n- ✓ Props interface\n- ✓ State management (hooks\u002Fclass)\n- ✓ Data fetching approach\n- ✓ Loading\u002Ferror states\n\nRegistration Pattern:\n- ✓ Registry file location\n- ✓ Registration format (array\u002Fobject)\n- ✓ Required metadata fields\n\nServer Dispatch Pattern:\n- ✓ Express app.use() \u002F router.use()  → Express routing\n- ✓ switch\u002Fcase on url\u002Fpathname       → Manual dispatch table\n- ✓ if\u002Felse if chain on url           → Manual dispatch chain\n- ✓ handler map object { '\u002Fpath': fn }→ Handler map pattern\n```\n\n### 3. Plan Your Feature Files\n\nBased on patterns, list the files you need to create **and** the existing files you need to update:\n\n**Typical full-stack panel structure:**\n1. **Server route handler** (e.g., `server\u002Froutes\u002Fsystem-health-route.ts`)\n2. **Service layer** (e.g., `server\u002Fservices\u002Fsystem-health-service.ts`)\n3. **UI component** (e.g., `client\u002Fpanels\u002FSystemHealthPanel.ts`)\n4. **Panel registration** (e.g., update `client\u002Fconfig\u002Fpanel-registry.ts`)\n5. **Styling** (e.g., `client\u002Fstyles\u002Fsystem-health-panel.css`)\n6. **Type definitions** (if TypeScript, e.g., `types\u002Fsystem-health.ts`)\n7. **⚠️ Server wiring** (update `server\u002Findex.ts` to import and dispatch to the new handler)\n\n### 3b. Detect Project Framework\n\n**Before selecting templates in Step 4, determine the frontend framework in use:**\n\n```bash\n# Check for React\ngrep -s \"react\" package.json | head -5\n\n# Check for TypeScript without React (vanilla TS)\nls client\u002Fcomponents\u002F*.ts 2>\u002Fdev\u002Fnull | head -3\nls client\u002Fpanels\u002F*.ts 2>\u002Fdev\u002Fnull | head -3\n\n# Check for a Panel base class (common in vanilla TS dashboards)\ngrep -r \"class.*Panel\" client\u002F --include=\"*.ts\" -l | head -3\ngrep -r \"extends Panel\" client\u002F --include=\"*.ts\" -l | head -3\n```\n\n**Decision rule:**\n- If `react` or `react-dom` is present in `package.json` → use the **React\u002FJSX template** (Step 4C-React).\n- If components are `.ts` files extending a `Panel` base class → use the **Vanilla TS template** (Step 4C-Vanilla).\n- When in doubt, read one or two existing component files to confirm before proceeding.\n\n### 3c. Detect Server Dispatch Pattern\n\n**Read the server entry point and classify it:**\n\n```bash\n# Look for Express usage\ngrep -n \"express\\|app\\.use\\|router\\.\" server\u002Findex.ts 2>\u002Fdev\u002Fnull || \\\ngrep -n \"express\\|app\\.use\\|router\\.\" server\u002Findex.js 2>\u002Fdev\u002Fnull || \\\ngrep -n \"express\\|app\\.use\\|router\\.\" src\u002Fserver.ts 2>\u002Fdev\u002Fnull\n\n# Look for manual http.createServer dispatch\ngrep -n \"createServer\\|switch.*url\\|switch.*pathname\\|req\\.url\\|req\\.pathname\" server\u002Findex.ts 2>\u002Fdev\u002Fnull || \\\ngrep -n \"createServer\\|switch.*url\\|switch.*pathname\\|req\\.url\\|req\\.pathname\" server\u002Findex.js 2>\u002Fdev\u002Fnull\n```\n\n**Decision rule:**\n- `app.use('\u002Fapi\u002Ffeature', featureRouter)` style → **Express pattern** (Step 5A)\n- `switch(pathname) { case '\u002Fapi\u002Ffeature': ... }` style → **Manual switch\u002Fcase pattern** (Step 5B)\n- `if (url.startsWith('\u002Fapi\u002Ffeature'))` style → **Manual if\u002Felse chain** (Step 5C)\n- `{ '\u002Fapi\u002Ffeature': handlerFn }` map style → **Handler map pattern** (Step 5D)\n\n### 4. Create Files in Order\n\nGenerate files in dependency order (backend → frontend → registration):\n\n> ⚠️ **Unicode \u002F multi-byte character warning**\n> `write_file` may fail with `'unknown error'` (or silently produce a truncated file) when\n> the content contains multi-byte Unicode characters such as emoji (e.g. document\u002Fchart icons)\n> or box-drawing characters (e.g. ─ │ ╔).\n> **Prevention:** prefer ASCII-safe equivalents in generated source code — e.g. `[OK]`\n> instead of a checkmark emoji, `->` instead of an arrow, plain hyphens\u002Fpipes instead of\n> box-drawing chars.\n> **Recovery:** if a `write_file` call returns an error or the resulting file is empty or\n> truncated, fall back to `run_shell` with a heredoc:\n>\n> ```bash\n> # Recovery path -- write file content via shell heredoc (avoids write_file Unicode bug)\n> cat > path\u002Fto\u002Ffile.ts \u003C\u003C 'HEREDOC'\n> \u002F\u002F file content here -- ensure no raw emoji or box-drawing chars are present\n> HEREDOC\n> ```\n>\n> Verify the file was written correctly with `wc -l path\u002Fto\u002Ffile.ts` or\n> `head -5 path\u002Fto\u002Ffile.ts` after every write that previously failed.\n\n\n#### A. Server Route Handler\n\n**Express style:**\n```javascript\n\u002F\u002F server\u002Froutes\u002F{feature}-route.js\nconst express = require('express');\nconst router = express.Router();\nconst featureService = require('..\u002Fservices\u002F{feature}-service');\n\nrouter.get('\u002Fapi\u002Fpanels\u002F{feature}', async (req, res) => {\n  try {\n    const data = await featureService.getData();\n    res.json({ success: true, data });\n  } catch (error) {\n    res.status(500).json({ success: false, error: error.message });\n  }\n});\n\nmodule.exports = router;\n```\n\n**Manual dispatch style (TypeScript):**\n```typescript\n\u002F\u002F server\u002Froutes\u002F{feature}-route.ts\nimport { IncomingMessage, ServerResponse } from 'http';\nimport { featureService } from '..\u002Fservices\u002F{feature}-service';\n\nexport async function handle{Feature}Request(\n  req: IncomingMessage,\n  res: ServerResponse,\n  action?: string\n): Promise\u003Cvoid> {\n  try {\n    const data = await featureService.getData(action);\n    res.writeHead(200, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ success: true, data }));\n  } catch (err) {\n    res.writeHead(500, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));\n  }\n}\n```\n\n#### B. Service Layer\n\n```typescript\n\u002F\u002F server\u002Fservices\u002F{feature}-service.ts\nexport interface {Feature}Data {\n  \u002F\u002F Define your data shape\n}\n\nexport async function getData(action?: string): Promise\u003C{Feature}Data> {\n  \u002F\u002F Implementation following existing service patterns\n  \u002F\u002F - Data fetching\n  \u002F\u002F - Business logic\n  \u002F\u002F - Data transformation\n  return {} as {Feature}Data;\n}\n```\n\n#### C-React. UI Component (React\u002FJSX projects)\n\n*Use this template only when React is confirmed in Step 3b.*\n\n```javascript\n\u002F\u002F client\u002Fcomponents\u002F{Feature}Panel.jsx\nimport React, { useState, useEffect } from 'react';\nimport '.\u002Fstyles\u002F{feature}-panel.css';\n\nconst FeaturePanel = () => {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    fetch('\u002Fapi\u002Fpanels\u002F{feature}')\n      .then(res => res.json())\n      .then(result => {\n        setData(result.data);\n        setLoading(false);\n      })\n      .catch(err => {\n        setError(err.message);\n        setLoading(false);\n      });\n  }, []);\n\n  if (loading) return \u003Cdiv>Loading...\u003C\u002Fdiv>;\n  if (error) return \u003Cdiv>Error: {error}\u003C\u002Fdiv>;\n\n  return (\n    \u003Cdiv className=\"{feature}-panel\">\n      {\u002F* Render data following UI patterns *\u002F}\n    \u003C\u002Fdiv>\n  );\n};\n\nexport default FeaturePanel;\n```\n\n#### C-Vanilla. UI Component (Vanilla TypeScript \u002F Panel base-class projects)\n\n*Use this template when components extend a Panel base class (no React).*\n\n```typescript\n\u002F\u002F client\u002Fpanels\u002F{Feature}Panel.ts\nimport { Panel } from '..\u002Fcore\u002FPanel';\n\nexport class FeaturePanel extends Panel {\n  private intervalId: number | null = null;\n\n  constructor(id: string) {\n    super(id);\n    this.setTitle('Feature Display Name');\n  }\n\n  async onLoad(): Promise\u003Cvoid> {\n    if (this.isFetching) return;\n    this.isFetching = true;\n    try {\n      const res = await fetch('\u002Fapi\u002Fpanels\u002F{feature}', {\n        headers: { Authorization: `Bearer ${localStorage.getItem('token') ?? ''}` }\n      });\n      if (!res.ok) throw new Error(`HTTP ${res.status}`);\n      const { data } = await res.json();\n      this.render(data);\n    } catch (err) {\n      this.showError(err instanceof Error ? err.message : String(err), () => this.onLoad());\n    } finally {\n      this.isFetching = false;\n    }\n  }\n\n  private render(data: unknown): void {\n    const container = document.createElement('div');\n    container.className = '{feature}-panel';\n    \u002F\u002F Build DOM nodes from data instead of JSX:\n    \u002F\u002F const item = document.createElement('p');\n    \u002F\u002F item.textContent = String(data);\n    \u002F\u002F container.appendChild(item);\n    this.setContent(container);\n  }\n\n  \u002F\u002F Call this to start polling (optional)\n  startPolling(intervalMs = 60_000): void {\n    this.onLoad();\n    this.intervalId = window.setInterval(() => this.onLoad(), intervalMs);\n  }\n\n  destroy(): void {\n    if (this.intervalId !== null) clearInterval(this.intervalId);\n    super.destroy();\n  }\n}\n```\n\n**Key differences from React template:**\n- Extends `Panel` base class; uses `setContent()` \u002F `showError()` \u002F `setTitle()` \u002F `setCount()` instead of React state.\n- DOM construction via `document.createElement` \u002F `innerHTML` instead of JSX.\n- No `useState` \u002F `useEffect`; lifecycle is `onLoad()` + `destroy()`.\n- File extension is `.ts`, not `.jsx`\u002F`.tsx`.\n- Registration passes a factory function or class constructor, not a JSX component.\n\n#### D. Panel Registration\n\n**React projects** — import the component directly:\n\n```javascript\n\u002F\u002F client\u002Fconfig\u002Fpanel-registry.js (update existing)\nimport FeaturePanel from '..\u002Fcomponents\u002FFeaturePanel';\n\nexport const panels = [\n  \u002F\u002F ... existing panels\n  {\n    id: '{feature}',\n    name: 'Feature Display Name',\n    component: FeaturePanel,\n    icon: 'icon-name',\n    category: 'appropriate-category'\n  }\n];\n```\n\n**Vanilla TS projects** — register via factory:\n\n```typescript\n\u002F\u002F client\u002Fconfig\u002Fpanel-registry.ts (update existing)\nimport { FeaturePanel } from '..\u002Fpanels\u002FFeaturePanel';\n\nexport const panels = [\n  \u002F\u002F ... existing panels\n  {\n    id: '{feature}',\n    name: 'Feature Display Name',\n    factory: (id: string) => new FeaturePanel(id),\n    icon: 'icon-name',\n    category: 'appropriate-category'\n  }\n];\n```\n\n#### E. Styling\n\n```css\n\u002F* client\u002Fstyles\u002F{feature}-panel.css *\u002F\n.{feature}-panel {\n  \u002F* Follow existing panel styling conventions *\u002F\n  padding: 1rem;\n  border-radius: 4px;\n}\n\n.{feature}-panel__header {\n  \u002F* Consistent header styling *\u002F\n}\n```\n\n### 5. Wire the Route Handler into the Server\n\n**This step is frequently missed and causes features to silently return 404.** After creating the route handler, you must register it with the server's request dispatcher.\n\nFirst, re-read the server entry point to confirm the exact dispatch pattern:\n\n```bash\ncat server\u002Findex.ts    # adjust path as needed\n```\n\n---\n\n#### 5A. Express Pattern\n\nAdd a `require`\u002F`import` and an `app.use()` call alongside the existing routes:\n\n```typescript\n\u002F\u002F server\u002Findex.ts  — Express style\nimport featureRouter from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Place with other app.use() route registrations\napp.use('\u002Fapi\u002Fpanels\u002F{feature}', featureRouter);\n```\n\n**Checklist:**\n- [ ] Import is at the top of the file with other route imports\n- [ ] `app.use()` call is placed before any catch-all `404` handler\n- [ ] Path prefix matches what the client fetches\n\n---\n\n#### 5B. Manual switch\u002Fcase Pattern\n\nThis is the pattern used when the server is built with `http.createServer` and routes are dispatched via a `switch` on the URL pathname. Read the existing cases to match the exact style, then add a new `case`:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — manual switch\u002Fcase dispatch\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Inside the createServer callback, find the switch block:\nconst url = new URL(req.url ?? '\u002F', `http:\u002F\u002F${req.headers.host}`);\nconst pathname = url.pathname;\nconst action = url.searchParams.get('action') ?? undefined;\n\nswitch (pathname) {\n  \u002F\u002F ... existing cases ...\n\n  case '\u002Fapi\u002Fpanels\u002F{feature}':\n    await handle{Feature}Request(req, res, action);\n    break;\n\n  \u002F\u002F ... keep the default\u002F404 case last ...\n  default:\n    res.writeHead(404, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ error: 'Not found' }));\n}\n```\n\n**Checklist:**\n- [ ] Import is at the top of the file with other handler imports\n- [ ] New `case` is placed **before** the `default` case\n- [ ] `break` (or `return`) statement is present after the handler call\n- [ ] The path string exactly matches the client's `fetch('\u002Fapi\u002Fpanels\u002F{feature}')` call\n- [ ] `action` \u002F query-param forwarding matches the handler's signature\n\n---\n\n#### 5C. Manual if\u002Felse Chain Pattern\n\nIf the server uses an `if\u002Felse if` chain instead of `switch`:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — if\u002Felse chain\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Inside the createServer callback:\nif (pathname === '\u002Fapi\u002Fpanels\u002Fexisting-a') {\n  await handleExistingA(req, res);\n} else if (pathname === '\u002Fapi\u002Fpanels\u002Fexisting-b') {\n  await handleExistingB(req, res);\n\u002F\u002F ↓ Add your new branch before the final else\u002F404 block\n} else if (pathname === '\u002Fapi\u002Fpanels\u002F{feature}') {\n  await handle{Feature}Request(req, res, action);\n} else {\n  res.writeHead(404, { 'Content-Type': 'application\u002Fjson' });\n  res.end(JSON.stringify({ error: 'Not found' }));\n}\n```\n\n**Checklist:**\n- [ ] New `else if` branch is before the final `else` (404) block\n- [ ] Import is at the top of the file\n\n---\n\n#### 5D. Handler Map Pattern\n\nIf the server uses a map object to look up handlers:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — handler map\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\nconst handlers: Record\u003Cstring, RequestHandler> = {\n  '\u002Fapi\u002Fpanels\u002Fexisting-a': handleExistingA,\n  '\u002Fapi\u002Fpanels\u002Fexisting-b': handleExistingB,\n  \u002F\u002F ↓ Add your new entry\n  '\u002Fapi\u002Fpanels\u002F{feature}': handle{Feature}Request,\n};\n```\n\n**Checklist:**\n- [ ] New entry key matches client fetch URL exactly\n- [ ] Import is at the top of the file\n\n---\n\n#### 5E. Verify Wiring\n\nAfter updating the server entry point, confirm the wiring is complete:\n\n```bash\n# Confirm the import exists\ngrep -n \"handle{Feature}Request\\|{feature}-route\" server\u002Findex.ts\n\n# Confirm the dispatch entry exists\ngrep -n \"{feature}\" server\u002Findex.ts\n\n# Confirm no syntax errors (TypeScript projects)\nnpx tsc --noEmit 2>&1 | head -20\n\n# Quick smoke test: start the server and curl the endpoint\n# curl http:\u002F\u002Flocalhost:PORT\u002Fapi\u002Fpanels\u002F{feature}\n```\n\n### 6. Verify Pattern Consistency\n\nAfter creating all files and wiring the server, check:\n\n- [ ] Naming follows project conventions across all layers\n- [ ] Import\u002Fexport statements are consistent\n- [ ] Error handling matches existing patterns\n- [ ] API response format is uniform\n- [ ] Component structure mirrors other panels\n- [ ] Registration metadata is complete\n- [ ] CSS class naming follows BEM or project convention\n- [ ] Server entry point updated (new route is reachable)\n\n### 7. Test Integration Points\n\nVerify that all pieces connect:\n\n```bash\n# Server route handler file exists\nls server\u002Froutes\u002F{feature}-route.*\n\n# Server entry point imports and dispatches the new handler\ngrep -n \"{feature}\" server\u002Findex.ts   # or server\u002Findex.js\n\n# Component is imported in registry\ngrep -r \"import.*{Feature}Panel\" client\u002Fconfig\u002F\n\n# Styles are imported\ngrep -r \"import.*{feature}-panel.css\" client\u002F\n```\n\n## Key Principles\n\n1. **Pattern before implementation**: Always read existing code first — especially the server entry point\n2. **Maintain consistency**: Match naming, structure, and style exactly\n3. **Complete the stack**: Don't leave layers incomplete — the server wiring step is as important as creating the handler file\n4. **Follow the chain**: Backend service → Route handler → **Server wiring** → Frontend component → Registration → Styling\n5. **Verify integration**: Ensure all pieces connect properly; a missing `case` in a switch block causes silent 404s\n\n## Common Pitfalls\n\n- ❌ Creating a route handler file but forgetting to add it to the server's dispatch table → **silent 404 on every request**\n- ❌ Creating component before verifying API endpoint works\n- ❌ Inconsistent naming across layers (camelCase vs kebab-case)\n- ❌ Forgetting to register the panel in the frontend config\n- ❌ Missing error handling in any layer\n- ❌ Skipping styling, leading to broken UI\n- ❌ Placing a new `case` after the `default` case in a switch (unreachable code)\n- ❌ Path string mismatch between server case and client fetch URL\n\n## Variations\n\n**For simple features**: May omit service layer if route logic is trivial\n\n**For complex features**: May need additional files:\n- Database migrations\u002Fmodels\n- Redux actions\u002Freducers (if using Redux)\n- Test files for each layer\n- Documentation files\n\n**For TypeScript projects**: Add `.d.ts` or `.ts` type definition files\n\n**For Express projects**: Step 5A covers the wiring; it is usually straightforward (`app.use()`).\n\n**For manual http.createServer projects**: Steps 5B–5D are critical. Always read the server entry point before assuming the pattern — projects vary between switch\u002Fcase, if\u002Felse chains, and handler maps.\n","# Create Full-Stack Panel Feature (with Server Wiring)\n\nThis 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.\n\n## When to Use\n\n- Adding a new panel type to a dashboard or admin interface\n- Creating a feature that spans multiple architectural layers\n- Ensuring consistency with existing codebase patterns across the stack\n- Projects that use a manual `http.createServer` dispatch loop instead of Express router mounting\n\n## Workflow Steps\n\n### 1. Identify Pattern Files\n\nLocate existing examples for each layer you need to implement:\n\n```bash\n# Find existing server routes\nfind . -name \"*route*.js\" -o -name \"*routes*.js\" -o -name \"*route*.ts\" -o -name \"*routes*.ts\" | grep -E \"(panel|dashboard|server)\"\n\n# Find service files\nfind . -name \"*service*.js\" -o -name \"*service*.ts\" | grep -E \"(panel|dashboard|server)\"\n\n# Find UI components\nfind . -name \"*.jsx\" -o -name \"*.tsx\" -o -name \"*.ts\" | grep -i panel\n\n# Find the server entry point (critical for wiring step)\nfind . -name \"index.ts\" -o -name \"index.js\" -o -name \"server.ts\" -o -name \"server.js\" | grep -v node_modules | head -10\n\n# Find registration\u002Fconfig files\nfind . -name \"*config*.js\" -o -name \"*registry*.js\" -o -name \"*config*.ts\" -o -name \"*registry*.ts\"\n\n# Find styling files\nfind . -name \"*.css\" -o -name \"*.scss\" | grep -i panel\n```\n\n### 2. Read and Analyze Patterns\n\nRead 1-2 representative examples from **each layer** to understand:\n\n- Naming conventions (e.g., `MetricsPanel`, `metrics-service.ts`)\n- Code structure and organization\n- Import\u002Fexport patterns\n- Registration mechanisms\n- API endpoint patterns\n- Error handling approaches\n- Styling conventions\n\n**Also read the server entry point** (`server\u002Findex.ts`, `src\u002Fserver.ts`, etc.) to determine which dispatch pattern is used:\n\n```bash\n# Read the server entry point to identify routing mechanism\ncat server\u002Findex.ts   # or server\u002Findex.js, src\u002Fserver.ts, etc.\n```\n\n**Example analysis checklist:**\n\n```\nServer Route Pattern:\n- ✓ Endpoint naming: \u002Fapi\u002Fpanels\u002F{type}\n- ✓ Authentication middleware\n- ✓ Response format: { success, data, error }\n\nService Pattern:\n- ✓ Export structure: class vs functions\n- ✓ Data transformation logic\n- ✓ Error propagation\n\nComponent Pattern:\n- ✓ Props interface\n- ✓ State management (hooks\u002Fclass)\n- ✓ Data fetching approach\n- ✓ Loading\u002Ferror states\n\nRegistration Pattern:\n- ✓ Registry file location\n- ✓ Registration format (array\u002Fobject)\n- ✓ Required metadata fields\n\nServer Dispatch Pattern:\n- ✓ Express app.use() \u002F router.use()  → Express routing\n- ✓ switch\u002Fcase on url\u002Fpathname       → Manual dispatch table\n- ✓ if\u002Felse if chain on url           → Manual dispatch chain\n- ✓ handler map object { '\u002Fpath': fn }→ Handler map pattern\n```\n\n### 3. Plan Your Feature Files\n\nBased on patterns, list the files you need to create **and** the existing files you need to update:\n\n**Typical full-stack panel structure:**\n1. **Server route handler** (e.g., `server\u002Froutes\u002Fsystem-health-route.ts`)\n2. **Service layer** (e.g., `server\u002Fservices\u002Fsystem-health-service.ts`)\n3. **UI component** (e.g., `client\u002Fpanels\u002FSystemHealthPanel.ts`)\n4. **Panel registration** (e.g., update `client\u002Fconfig\u002Fpanel-registry.ts`)\n5. **Styling** (e.g., `client\u002Fstyles\u002Fsystem-health-panel.css`)\n6. **Type definitions** (if TypeScript, e.g., `types\u002Fsystem-health.ts`)\n7. **⚠️ Server wiring** (update `server\u002Findex.ts` to import and dispatch to the new handler)\n\n### 3b. Detect Project Framework\n\n**Before selecting templates in Step 4, determine the frontend framework in use:**\n\n```bash\n# Check for React\ngrep -s \"react\" package.json | head -5\n\n# Check for TypeScript without React (vanilla TS)\nls client\u002Fcomponents\u002F*.ts 2>\u002Fdev\u002Fnull | head -3\nls client\u002Fpanels\u002F*.ts 2>\u002Fdev\u002Fnull | head -3\n\n# Check for a Panel base class (common in vanilla TS dashboards)\ngrep -r \"class.*Panel\" client\u002F --include=\"*.ts\" -l | head -3\ngrep -r \"extends Panel\" client\u002F --include=\"*.ts\" -l | head -3\n```\n\n**Decision rule:**\n- If `react` or `react-dom` is present in `package.json` → use the **React\u002FJSX template** (Step 4C-React).\n- If components are `.ts` files extending a `Panel` base class → use the **Vanilla TS template** (Step 4C-Vanilla).\n- When in doubt, read one or two existing component files to confirm before proceeding.\n\n### 3c. Detect Server Dispatch Pattern\n\n**Read the server entry point and classify it:**\n\n```bash\n# Look for Express usage\ngrep -n \"express\\|app\\.use\\|router\\.\" server\u002Findex.ts 2>\u002Fdev\u002Fnull || \\\ngrep -n \"express\\|app\\.use\\|router\\.\" server\u002Findex.js 2>\u002Fdev\u002Fnull || \\\ngrep -n \"express\\|app\\.use\\|router\\.\" src\u002Fserver.ts 2>\u002Fdev\u002Fnull\n\n# Look for manual http.createServer dispatch\ngrep -n \"createServer\\|switch.*url\\|switch.*pathname\\|req\\.url\\|req\\.pathname\" server\u002Findex.ts 2>\u002Fdev\u002Fnull || \\\ngrep -n \"createServer\\|switch.*url\\|switch.*pathname\\|req\\.url\\|req\\.pathname\" server\u002Findex.js 2>\u002Fdev\u002Fnull\n```\n\n**Decision rule:**\n- `app.use('\u002Fapi\u002Ffeature', featureRouter)` style → **Express pattern** (Step 5A)\n- `switch(pathname) { case '\u002Fapi\u002Ffeature': ... }` style → **Manual switch\u002Fcase pattern** (Step 5B)\n- `if (url.startsWith('\u002Fapi\u002Ffeature'))` style → **Manual if\u002Felse chain** (Step 5C)\n- `{ '\u002Fapi\u002Ffeature': handlerFn }` map style → **Handler map pattern** (Step 5D)\n\n### 4. Create Files in Order\n\nGenerate files in dependency order (backend → frontend → registration):\n\n> ⚠️ **Unicode \u002F multi-byte character warning**\n> `write_file` may fail with `'unknown error'` (or silently produce a truncated file) when\n> the content contains multi-byte Unicode characters such as emoji (e.g. document\u002Fchart icons)\n> or box-drawing characters (e.g. ─ │ ╔).\n> **Prevention:** prefer ASCII-safe equivalents in generated source code — e.g. `[OK]`\n> instead of a checkmark emoji, `->` instead of an arrow, plain hyphens\u002Fpipes instead of\n> box-drawing chars.\n> **Recovery:** if a `write_file` call returns an error or the resulting file is empty or\n> truncated, fall back to `run_shell` with a heredoc:\n>\n> ```bash\n> # Recovery path -- write file content via shell heredoc (avoids write_file Unicode bug)\n> cat > path\u002Fto\u002Ffile.ts \u003C\u003C 'HEREDOC'\n> \u002F\u002F file content here -- ensure no raw emoji or box-drawing chars are present\n> HEREDOC\n> ```\n>\n> Verify the file was written correctly with `wc -l path\u002Fto\u002Ffile.ts` or\n> `head -5 path\u002Fto\u002Ffile.ts` after every write that previously failed.\n\n\n#### A. Server Route Handler\n\n**Express style:**\n```javascript\n\u002F\u002F server\u002Froutes\u002F{feature}-route.js\nconst express = require('express');\nconst router = express.Router();\nconst featureService = require('..\u002Fservices\u002F{feature}-service');\n\nrouter.get('\u002Fapi\u002Fpanels\u002F{feature}', async (req, res) => {\n  try {\n    const data = await featureService.getData();\n    res.json({ success: true, data });\n  } catch (error) {\n    res.status(500).json({ success: false, error: error.message });\n  }\n});\n\nmodule.exports = router;\n```\n\n**Manual dispatch style (TypeScript):**\n```typescript\n\u002F\u002F server\u002Froutes\u002F{feature}-route.ts\nimport { IncomingMessage, ServerResponse } from 'http';\nimport { featureService } from '..\u002Fservices\u002F{feature}-service';\n\nexport async function handle{Feature}Request(\n  req: IncomingMessage,\n  res: ServerResponse,\n  action?: string\n): Promise\u003Cvoid> {\n  try {\n    const data = await featureService.getData(action);\n    res.writeHead(200, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ success: true, data }));\n  } catch (err) {\n    res.writeHead(500, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));\n  }\n}\n```\n\n#### B. Service Layer\n\n```typescript\n\u002F\u002F server\u002Fservices\u002F{feature}-service.ts\nexport interface {Feature}Data {\n  \u002F\u002F Define your data shape\n}\n\nexport async function getData(action?: string): Promise\u003C{Feature}Data> {\n  \u002F\u002F Implementation following existing service patterns\n  \u002F\u002F - Data fetching\n  \u002F\u002F - Business logic\n  \u002F\u002F - Data transformation\n  return {} as {Feature}Data;\n}\n```\n\n#### C-React. UI Component (React\u002FJSX projects)\n\n*Use this template only when React is confirmed in Step 3b.*\n\n```javascript\n\u002F\u002F client\u002Fcomponents\u002F{Feature}Panel.jsx\nimport React, { useState, useEffect } from 'react';\nimport '.\u002Fstyles\u002F{feature}-panel.css';\n\nconst FeaturePanel = () => {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    fetch('\u002Fapi\u002Fpanels\u002F{feature}')\n      .then(res => res.json())\n      .then(result => {\n        setData(result.data);\n        setLoading(false);\n      })\n      .catch(err => {\n        setError(err.message);\n        setLoading(false);\n      });\n  }, []);\n\n  if (loading) return \u003Cdiv>Loading...\u003C\u002Fdiv>;\n  if (error) return \u003Cdiv>Error: {error}\u003C\u002Fdiv>;\n\n  return (\n    \u003Cdiv className=\"{feature}-panel\">\n      {\u002F* Render data following UI patterns *\u002F}\n    \u003C\u002Fdiv>\n  );\n};\n\nexport default FeaturePanel;\n```\n\n#### C-Vanilla. UI Component (Vanilla TypeScript \u002F Panel base-class projects)\n\n*Use this template when components extend a Panel base class (no React).*\n\n```typescript\n\u002F\u002F client\u002Fpanels\u002F{Feature}Panel.ts\nimport { Panel } from '..\u002Fcore\u002FPanel';\n\nexport class FeaturePanel extends Panel {\n  private intervalId: number | null = null;\n\n  constructor(id: string) {\n    super(id);\n    this.setTitle('Feature Display Name');\n  }\n\n  async onLoad(): Promise\u003Cvoid> {\n    if (this.isFetching) return;\n    this.isFetching = true;\n    try {\n      const res = await fetch('\u002Fapi\u002Fpanels\u002F{feature}', {\n        headers: { Authorization: `Bearer ${localStorage.getItem('token') ?? ''}` }\n      });\n      if (!res.ok) throw new Error(`HTTP ${res.status}`);\n      const { data } = await res.json();\n      this.render(data);\n    } catch (err) {\n      this.showError(err instanceof Error ? err.message : String(err), () => this.onLoad());\n    } finally {\n      this.isFetching = false;\n    }\n  }\n\n  private render(data: unknown): void {\n    const container = document.createElement('div');\n    container.className = '{feature}-panel';\n    \u002F\u002F Build DOM nodes from data instead of JSX:\n    \u002F\u002F const item = document.createElement('p');\n    \u002F\u002F item.textContent = String(data);\n    \u002F\u002F container.appendChild(item);\n    this.setContent(container);\n  }\n\n  \u002F\u002F Call this to start polling (optional)\n  startPolling(intervalMs = 60_000): void {\n    this.onLoad();\n    this.intervalId = window.setInterval(() => this.onLoad(), intervalMs);\n  }\n\n  destroy(): void {\n    if (this.intervalId !== null) clearInterval(this.intervalId);\n    super.destroy();\n  }\n}\n```\n\n**Key differences from React template:**\n- Extends `Panel` base class; uses `setContent()` \u002F `showError()` \u002F `setTitle()` \u002F `setCount()` instead of React state.\n- DOM construction via `document.createElement` \u002F `innerHTML` instead of JSX.\n- No `useState` \u002F `useEffect`; lifecycle is `onLoad()` + `destroy()`.\n- File extension is `.ts`, not `.jsx`\u002F`.tsx`.\n- Registration passes a factory function or class constructor, not a JSX component.\n\n#### D. Panel Registration\n\n**React projects** — import the component directly:\n\n```javascript\n\u002F\u002F client\u002Fconfig\u002Fpanel-registry.js (update existing)\nimport FeaturePanel from '..\u002Fcomponents\u002FFeaturePanel';\n\nexport const panels = [\n  \u002F\u002F ... existing panels\n  {\n    id: '{feature}',\n    name: 'Feature Display Name',\n    component: FeaturePanel,\n    icon: 'icon-name',\n    category: 'appropriate-category'\n  }\n];\n```\n\n**Vanilla TS projects** — register via factory:\n\n```typescript\n\u002F\u002F client\u002Fconfig\u002Fpanel-registry.ts (update existing)\nimport { FeaturePanel } from '..\u002Fpanels\u002FFeaturePanel';\n\nexport const panels = [\n  \u002F\u002F ... existing panels\n  {\n    id: '{feature}',\n    name: 'Feature Display Name',\n    factory: (id: string) => new FeaturePanel(id),\n    icon: 'icon-name',\n    category: 'appropriate-category'\n  }\n];\n```\n\n#### E. Styling\n\n```css\n\u002F* client\u002Fstyles\u002F{feature}-panel.css *\u002F\n.{feature}-panel {\n  \u002F* Follow existing panel styling conventions *\u002F\n  padding: 1rem;\n  border-radius: 4px;\n}\n\n.{feature}-panel__header {\n  \u002F* Consistent header styling *\u002F\n}\n```\n\n### 5. Wire the Route Handler into the Server\n\n**This step is frequently missed and causes features to silently return 404.** After creating the route handler, you must register it with the server's request dispatcher.\n\nFirst, re-read the server entry point to confirm the exact dispatch pattern:\n\n```bash\ncat server\u002Findex.ts    # adjust path as needed\n```\n\n---\n\n#### 5A. Express Pattern\n\nAdd a `require`\u002F`import` and an `app.use()` call alongside the existing routes:\n\n```typescript\n\u002F\u002F server\u002Findex.ts  — Express style\nimport featureRouter from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Place with other app.use() route registrations\napp.use('\u002Fapi\u002Fpanels\u002F{feature}', featureRouter);\n```\n\n**Checklist:**\n- [ ] Import is at the top of the file with other route imports\n- [ ] `app.use()` call is placed before any catch-all `404` handler\n- [ ] Path prefix matches what the client fetches\n\n---\n\n#### 5B. Manual switch\u002Fcase Pattern\n\nThis is the pattern used when the server is built with `http.createServer` and routes are dispatched via a `switch` on the URL pathname. Read the existing cases to match the exact style, then add a new `case`:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — manual switch\u002Fcase dispatch\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Inside the createServer callback, find the switch block:\nconst url = new URL(req.url ?? '\u002F', `http:\u002F\u002F${req.headers.host}`);\nconst pathname = url.pathname;\nconst action = url.searchParams.get('action') ?? undefined;\n\nswitch (pathname) {\n  \u002F\u002F ... existing cases ...\n\n  case '\u002Fapi\u002Fpanels\u002F{feature}':\n    await handle{Feature}Request(req, res, action);\n    break;\n\n  \u002F\u002F ... keep the default\u002F404 case last ...\n  default:\n    res.writeHead(404, { 'Content-Type': 'application\u002Fjson' });\n    res.end(JSON.stringify({ error: 'Not found' }));\n}\n```\n\n**Checklist:**\n- [ ] Import is at the top of the file with other handler imports\n- [ ] New `case` is placed **before** the `default` case\n- [ ] `break` (or `return`) statement is present after the handler call\n- [ ] The path string exactly matches the client's `fetch('\u002Fapi\u002Fpanels\u002F{feature}')` call\n- [ ] `action` \u002F query-param forwarding matches the handler's signature\n\n---\n\n#### 5C. Manual if\u002Felse Chain Pattern\n\nIf the server uses an `if\u002Felse if` chain instead of `switch`:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — if\u002Felse chain\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\n\u002F\u002F Inside the createServer callback:\nif (pathname === '\u002Fapi\u002Fpanels\u002Fexisting-a') {\n  await handleExistingA(req, res);\n} else if (pathname === '\u002Fapi\u002Fpanels\u002Fexisting-b') {\n  await handleExistingB(req, res);\n\u002F\u002F ↓ Add your new branch before the final else\u002F404 block\n} else if (pathname === '\u002Fapi\u002Fpanels\u002F{feature}') {\n  await handle{Feature}Request(req, res, action);\n} else {\n  res.writeHead(404, { 'Content-Type': 'application\u002Fjson' });\n  res.end(JSON.stringify({ error: 'Not found' }));\n}\n```\n\n**Checklist:**\n- [ ] New `else if` branch is before the final `else` (404) block\n- [ ] Import is at the top of the file\n\n---\n\n#### 5D. Handler Map Pattern\n\nIf the server uses a map object to look up handlers:\n\n```typescript\n\u002F\u002F server\u002Findex.ts — handler map\nimport { handle{Feature}Request } from '.\u002Froutes\u002F{feature}-route';\n\nconst handlers: Record\u003Cstring, RequestHandler> = {\n  '\u002Fapi\u002Fpanels\u002Fexisting-a': handleExistingA,\n  '\u002Fapi\u002Fpanels\u002Fexisting-b': handleExistingB,\n  \u002F\u002F ↓ Add your new entry\n  '\u002Fapi\u002Fpanels\u002F{feature}': handle{Feature}Request,\n};\n```\n\n**Checklist:**\n- [ ] New entry key matches client fetch URL exactly\n- [ ] Import is at the top of the file\n\n---\n\n#### 5E. Verify Wiring\n\nAfter updating the server entry point, confirm the wiring is complete:\n\n```bash\n# Confirm the import exists\ngrep -n \"handle{Feature}Request\\|{feature}-route\" server\u002Findex.ts\n\n# Confirm the dispatch entry exists\ngrep -n \"{feature}\" server\u002Findex.ts\n\n# Confirm no syntax errors (TypeScript projects)\nnpx tsc --noEmit 2>&1 | head -20\n\n# Quick smoke test: start the server and curl the endpoint\n# curl http:\u002F\u002Flocalhost:PORT\u002Fapi\u002Fpanels\u002F{feature}\n```\n\n### 6. Verify Pattern Consistency\n\nAfter creating all files and wiring the server, check:\n\n- [ ] Naming follows project conventions across all layers\n- [ ] Import\u002Fexport statements are consistent\n- [ ] Error handling matches existing patterns\n- [ ] API response format is uniform\n- [ ] Component structure mirrors other panels\n- [ ] Registration metadata is complete\n- [ ] CSS class naming follows BEM or project convention\n- [ ] Server entry point updated (new route is reachable)\n\n### 7. Test Integration Points\n\nVerify that all pieces connect:\n\n```bash\n# Server route handler file exists\nls server\u002Froutes\u002F{feature}-route.*\n\n# Server entry point imports and dispatches the new handler\ngrep -n \"{feature}\" server\u002Findex.ts   # or server\u002Findex.js\n\n# Component is imported in registry\ngrep -r \"import.*{Feature}Panel\" client\u002Fconfig\u002F\n\n# Styles are imported\ngrep -r \"import.*{feature}-panel.css\" client\u002F\n```\n\n## Key Principles\n\n1. **Pattern before implementation**: Always read existing code first — especially the server entry point\n2. **Maintain consistency**: Match naming, structure, and style exactly\n3. **Complete the stack**: Don't leave layers incomplete — the server wiring step is as important as creating the handler file\n4. **Follow the chain**: Backend service → Route handler → **Server wiring** → Frontend component → Registration → Styling\n5. **Verify integration**: Ensure all pieces connect properly; a missing `case` in a switch block causes silent 404s\n\n## Common Pitfalls\n\n- ❌ Creating a route handler file but forgetting to add it to the server's dispatch table → **silent 404 on every request**\n- ❌ Creating component before verifying API endpoint works\n- ❌ Inconsistent naming across layers (camelCase vs kebab-case)\n- ❌ Forgetting to register the panel in the frontend config\n- ❌ Missing error handling in any layer\n- ❌ Skipping styling, leading to broken UI\n- ❌ Placing a new `case` after the `default` case in a switch (unreachable code)\n- ❌ Path string mismatch between server case and client fetch URL\n\n## Variations\n\n**For simple features**: May omit service layer if route logic is trivial\n\n**For complex features**: May need additional files:\n- Database migrations\u002Fmodels\n- Redux actions\u002Freducers (if using Redux)\n- Test files for each layer\n- Documentation files\n\n**For TypeScript projects**: Add `.d.ts` or `.ts` type definition files\n\n**For Express projects**: Step 5A covers the wiring; it is usually straightforward (`app.use()`).\n\n**For manual http.createServer projects**: Steps 5B–5D are critical. Always read the server entry point before assuming the pattern — projects vary between switch\u002Fcase, if\u002Felse chains, and handler maps.\n",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","showcase\u002Fskills\u002Fcreate-full-stack-panel-feature-with-server-wiring","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill create-full-stack-panel-feature-with-server-wiring",{"tool":60,"command":61},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill create-full-stack-panel-feature-with-server-wiring",{"tool":63,"command":64},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill create-full-stack-panel-feature-with-server-wiring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fcreate-full-stack-panel-feature-with-server-wiring\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},".skill_id","OTHER","其他",54,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fcreate-full-stack-panel-feature-with-server-wiring\u002F.skill_id",[75,99,115,124,152,168],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":43},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[82,83,84,85,86,87,88,89,90,91,92,93,94,39,95,96,97,98],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","only","template","file","python",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":43},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[106,107,83,97,108,98,109,110,111,112,113,96,114,33,87,90,92],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":43},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[122,83,87,123,92,110,96,97,98,90],"write special chars heredoc","shell",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":135,"publishedAt":43},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[130],{"categoryNo":131,"categoryName":132,"taxonomyType":133,"taxonomyTypeDesc":134},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[136,137,138,139,140,85,141,142,36,143,144,90,145,32,146,147,148,149,150,151],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","hierarchy","source","extracting","patterns","edge functions","integrations","open","api","data",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":43},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[159,160,161,162,90,163,33,164,165,166,167],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":43},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[175,176,177,178,179,180,97,181,182,183],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]