create-full-stack-panel-feature
预览截图
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "create-full-stack-panel-feature":https://skillpi.com/zh/skills/deepskill-0c24e79c97f699e81da29997dbee789a07910b5197420c4ffd04f78a43281a8d。安装前核对上游来源和版本:https://github.com/HKUDS/OpenSpace。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
通过分析现有模式,生成协调的服务器路由、服务、UI 组件、注册和样式文件,构建完整面板功能的多层工作流。
介绍来源: third_party · HKUDS · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 多层工作流程,通过分析现有模式和生成协调的服务器路由,服务,UI组件,注册,以及造型文件来创建完整的面板特性.
- 适合谁
- 在仪表板或管理界面中添加新的面板类型 创建跨越多个建筑层的特性,确保与整个堆栈的现有代码库模式保持一致
- 实测状态
- 未测试
文件浏览
Frontmatter
name: create-full-stack-panel-feature
description: Multi-layer workflow for creating complete panel features by analyzing existing patterns and generating coordinated server routes, services, UI components, registration, and styling files.Create Full-Stack Panel Feature
This skill guides you through creating a complete, pattern-consistent panel feature across all application layers: backend API routes, service logic, frontend components, registration, and styling.
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
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" | grep -E "(panel|dashboard)"
# Find service files
find . -name "*service*.js" | grep -E "(panel|dashboard)"
# Find UI components
find . -name "*.jsx" -o -name "*.tsx" | grep -i panel
# Find registration/config files
find . -name "*config*.js" -o -name "*registry*.js"
# 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.js) - Code structure and organization
- Import/export patterns
- Registration mechanisms
- API endpoint patterns
- Error handling approaches
- Styling conventions
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
3. Plan Your Feature Files
Based on patterns, list the files you need to create:
Typical full-stack panel structure:
- Server route (e.g.,
server/routes/system-health-route.js) - Service layer (e.g.,
server/services/system-health-service.js) - UI component (e.g.,
client/components/SystemHealthPanel.jsx) - Panel registration (e.g., update
client/config/panel-registry.js) - Styling (e.g.,
client/styles/system-health-panel.css) - Type definitions (if TypeScript, e.g.,
types/system-health.ts)
4. Create Files in Order
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
reactorreact-domis present inpackage.json→ use the React/JSX template (Step 4C-React). - If components are
.tsfiles extending aPanelbase class → use the Vanilla TS template (Step 4C-Vanilla). - When in doubt, read one or two existing component files to confirm before proceeding.
4. Create Files in Order
Generate files in dependency order (backend → frontend → registration):
A. Server Route
// server/routes/{feature}-route.js
const express = require('express');
const router = express.Router();
const featureService = require('../services/{feature}-service');
router.get('/api/panels/{feature}', async (req, res) => {
try {
const data = await featureService.getData();
res.json({ success: true, data });
} catch (error) {
res.status(500).json({ success: false, error: error.message });
}
});
module.exports = router;
B. Service Layer
// server/services/{feature}-service.js
class FeatureService {
async getData() {
// Implementation following existing service patterns
// - Data fetching
// - Business logic
// - Data transformation
return processedData;
}
}
module.exports = new FeatureService();
C-React. UI Component (React/JSX projects)
Use this template only when React is confirmed in Step 3b.
// client/components/{Feature}Panel.jsx
import React, { useState, useEffect } from 'react';
import './styles/{feature}-panel.css';
const FeaturePanel = () => {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
fetch('/api/panels/{feature}')
.then(res => res.json())
.then(result => {
setData(result.data);
setLoading(false);
})
.catch(err => {
setError(err.message);
setLoading(false);
});
}, []);
if (loading) return <div>Loading...</div>;
if (error) return <div>Error: {error}</div>;
return (
<div className="{feature}-panel">
{/* Render data following UI patterns */}
</div>
);
};
export default FeaturePanel;
C-Vanilla. UI Component (Vanilla TypeScript / Panel base-class projects)
Use this template when components extend a Panel base class (no React).
// client/panels/{Feature}Panel.ts
import { Panel } from '../core/Panel';
export class FeaturePanel extends Panel {
private intervalId: number | null = null;
constructor(id: string) {
super(id);
this.setTitle('Feature Display Name');
}
async onLoad(): Promise<void> {
if (this.isFetching) return;
this.isFetching = true;
try {
const res = await fetch('/api/panels/{feature}', {
headers: { Authorization: `Bearer ${localStorage.getItem('token') ?? ''}` }
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { data } = await res.json();
this.render(data);
} catch (err) {
this.showError(err instanceof Error ? err.message : String(err), () => this.onLoad());
} finally {
this.isFetching = false;
}
}
private render(data: unknown): void {
const container = document.createElement('div');
container.className = '{feature}-panel';
// Build DOM nodes from data instead of JSX:
// const item = document.createElement('p');
// item.textContent = String(data);
// container.appendChild(item);
this.setContent(container);
}
// Call this to start polling (optional)
startPolling(intervalMs = 60_000): void {
this.onLoad();
this.intervalId = window.setInterval(() => this.onLoad(), intervalMs);
}
destroy(): void {
if (this.intervalId !== null) clearInterval(this.intervalId);
super.destroy();
}
}
Key differences from React template:
- Extends
Panelbase class; usessetContent()/showError()/setTitle()/setCount()instead of React state. - DOM construction via
document.createElement/innerHTMLinstead of JSX. - No
useState/useEffect; lifecycle isonLoad()+destroy(). - File extension is
.ts, not.jsx/.tsx. - Registration passes a factory function or class constructor, not a JSX component.
D. Panel Registration
React projects — import the component directly:
// client/config/panel-registry.js (update existing)
import FeaturePanel from '../components/FeaturePanel';
export const panels = [
// ... existing panels
{
id: '{feature}',
name: 'Feature Display Name',
component: FeaturePanel,
icon: 'icon-name',
category: 'appropriate-category'
}
];
Vanilla TS projects — register via factory:
// client/config/panel-registry.ts (update existing)
import { FeaturePanel } from '../panels/FeaturePanel';
export const panels = [
// ... existing panels
{
id: '{feature}',
name: 'Feature Display Name',
factory: (id: string) => new FeaturePanel(id),
icon: 'icon-name',
category: 'appropriate-category'
}
];
E. Styling
/* client/styles/{feature}-panel.css */
.{feature}-panel {
/* Follow existing panel styling conventions */
padding: 1rem;
border-radius: 4px;
}
.{feature}-panel__header {
/* Consistent header styling */
}
5. Verify Pattern Consistency
After creating all files, check:
- [ ] Naming follows project conventions across all layers
- [ ] Import/export statements are consistent
- [ ] Error handling matches existing patterns
- [ ] API response format is uniform
- [ ] Component structure mirrors other panels
- [ ] Registration metadata is complete
- [ ] CSS class naming follows BEM or project convention
6. Test Integration Points
Verify that:
# Server route is registered
grep -r "require.*{feature}-route" server/
# Component is imported in registry
grep -r "import.*{Feature}Panel" client/config/
# Styles are imported
grep -r "import.*{feature}-panel.css" client/
Key Principles
- Pattern before implementation: Always read existing code first
- Maintain consistency: Match naming, structure, and style exactly
- Complete the stack: Don't leave layers incomplete
- Follow the chain: Backend → Service → Frontend → Registration → Styling
- Verify integration: Ensure all pieces connect properly
Common Pitfalls
- Creating component before verifying API endpoint works
- Inconsistent naming across layers (camelCase vs kebab-case)
- Forgetting to register the panel in the appropriate config
- Missing error handling in any layer
- Skipping styling, leading to broken UI
Variations
For simple features: May omit service layer if route logic is trivial
For complex features: May need additional files:
- Database migrations/models
- Redux actions/reducers (if using Redux)
- Test files for each layer
- Documentation files
For TypeScript projects: Add .d.ts or .ts type definition files
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的前后端面板功能创建工作流,覆盖服务器路由、服务、UI组件、注册和样式文件
- 支持多种技术栈(React/TypeScript/Vanilla TS),适配性强
- 强调模式一致性,确保与现有代码库风格统一
亮点
- description 精准描述多层级工作流,覆盖多种变体场景
- 触发边界清晰,适用于添加新面板类型的明确需求
待提升项
-
When to Use 章节标题格式不一致 原报告严重程度:轻微
When to Use 内容存在但未使用标准二级标题格式(## When to Use),而是直接写在段落中
改进建议:建议将 When to Use 内容调整为标准二级标题格式,与其他章节保持一致
亮点
- Phase/步骤清晰,分阶段引导用户完成全流程
- 包含端到端示例和具体代码模板
- frontmatter 完整,单文件长度合理
亮点
- 工具来源明确(标准 shell 命令和常见文件结构)
- 参数正确,覆盖主要异常场景(try/catch、错误处理)
- 提供验证步骤确保各层集成正确
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。