chatgpt-app:add-widget
БесплатноБез исполняемых скриптовНе проверенAdd a new inline widget to your ChatGPT App with Tailwind CSS and Apps SDK integration.
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Add Inline Widget
You are helping the user add a new inline HTML widget with Tailwind CSS to their ChatGPT App.
Widget Patterns Available
Choose from these polished widget patterns:
1. Card Grid Widget
- Modern cards with hover effects and badges
- Responsive grid layout
- Best for: task lists, product catalogs, search results
2. Stats Dashboard Widget
- Colorful stat cards with icons
- Trend indicators (up/down arrows)
- Best for: analytics, dashboards, KPIs
3. Table Widget
- Clean data table with hover rows
- Column alignment support
- Best for: data tables, reports, logs
4. Bar Chart Widget
- Animated bars with smooth transitions
- Auto-scaling height
- Best for: comparisons, distributions
5. Comparison Cards Widget
- Side-by-side cards with "recommended" badge
- Great for pricing or scenario comparison
- Best for: mortgages, plans, options
6. Timeline Widget
- Vertical timeline with dots
- Scrollable container
- Best for: schedules, amortization, history
Workflow
Gather Information Ask the user:
- What data will this widget display?
- What actions should users be able to take?
- Which pattern fits best?
Define Data Shape Create TypeScript interface for tool output.
Add Widget Config Add to the
widgetsarray inserver/index.ts:{ id: "my-widget", name: "My Widget", description: "Displays data visually", templateUri: "ui://widget/my-widget.html", invoking: "Loading...", invoked: "Ready", mockData: { /* sample data for preview */ }, },Add Widget HTML with Tailwind Add case to
generateWidgetHtml()function using Tailwind CSS:if (widgetId === "my-widget") { return `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Widget</title> <script src="https://cdn.tailwindcss.com"></script> ${previewScript} </head> <body class="bg-gradient-to-br from-gray-50 to-gray-100 text-gray-900 p-4 font-sans antialiased"> <div id="root"> <div class="flex items-center justify-center min-h-[200px] text-gray-400"> <svg class="animate-spin h-6 w-6 mr-2" fill="none" viewBox="0 0 24 24"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> Loading... </div> </div> <script> (function() { let rendered = false; function render(data) { if (rendered || !data) return; rendered = true; document.getElementById('root').innerHTML = '...'; } function tryRender() { if (window.PREVIEW_DATA) { render(window.PREVIEW_DATA); return; } if (window.openai?.toolOutput) { render(window.openai.toolOutput); } } window.addEventListener('openai:set_globals', tryRender); const poll = setInterval(() => { if (window.openai?.toolOutput || window.PREVIEW_DATA) { tryRender(); clearInterval(poll); } }, 100); setTimeout(() => clearInterval(poll), 10000); tryRender(); })(); </script> </body> </html>`; }Create/Update Tool Add tool that returns widget data with
widgetId.Test Widget
npm run dev open http://localhost:3000/preview/my-widget
Tailwind Widget Patterns
Card Grid
function render(data) {
if (rendered || !data?.items) return;
rendered = true;
const statusColors = {
active: 'bg-emerald-100 text-emerald-700 ring-1 ring-emerald-600/20',
pending: 'bg-amber-100 text-amber-700 ring-1 ring-amber-600/20',
inactive: 'bg-gray-100 text-gray-600 ring-1 ring-gray-500/20',
};
document.getElementById('root').innerHTML = `
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
${data.items.map(item => `
<div class="group bg-white rounded-xl shadow-sm hover:shadow-md transition-all duration-200 border border-gray-200 hover:border-gray-300 overflow-hidden">
<div class="p-5">
<div class="flex items-start justify-between mb-3">
<h3 class="font-semibold text-gray-900 group-hover:text-blue-600 transition-colors">${item.title}</h3>
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${statusColors[item.status] || statusColors.inactive}">
${item.status}
</span>
</div>
<p class="text-sm text-gray-500">${item.description || ''}</p>
</div>
</div>
`).join('')}
</div>
`;
}
Stats Dashboard
Установить chatgpt-app:add-widget в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл chatgpt-app:add-widget?
Add a new inline widget to your ChatGPT App with Tailwind CSS and Apps SDK integration.
Как установить скилл chatgpt-app:add-widget?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл chatgpt-app:add-widget запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic