anthropics/skills180kfrontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
前端开发
Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json.
把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。
读取 https://funcoding.ai/skills/datopian/portaljs/portaljs-add-chart/install.md ,按里面的步骤帮我安装这个 Skill。
Add a visualization to a dataset's showcase in a PortalJS portal. The skill installs
recharts (added directly — never @portaljs/components), writes a reusable client-side
Chart component into components/, and renders a <Chart /> into the Views section
of the showcase route pages/[owner]/[slug].tsx for one chosen dataset. The chart reads the
same /public/data/<file> the showcase <Table /> already uses, so no data is duplicated.
Five chart types are supported: line, bar, area, pie, and scatter.
portaljs-new-portal).datasets.json (see portaljs-add-dataset).components/ui/parseCsv.ts present (ships with the template).The canonical, full step-by-step workflow is
.claude/commands/portaljs-add-chart.md —
the single source of truth. Read and follow it when executing. Summary:
line), portal
directory. If any is missing, interview the user; never dead-end on a missing value.datasets.json (namespace, file, format).Number()).npm install recharts@^2.15.0.components/Chart.tsx (idempotent — do not overwrite a customized component).<Chart /> into the Views section, gated on the dataset's (namespace, slug) so
other showcases are unaffected. Extend an existing view-dispatch block, do not overwrite.npx tsc --noEmit.components/Chart.tsx (recharts wrapper, if absent).pages/[owner]/[slug].tsx (import + gated <Chart /> in Views);
package.json (recharts@^2.15.0).npx tsc --noEmit passes./@<namespace>/<slug> under a "Views" heading.| Symptom | Cause | Fix |
|---|---|---|
| Missing dataset/columns | Slug or column not in manifest/header | List available slugs/headers and re-prompt; do not error out. |
| Gaps in the chart | Non-numeric cells coerced to NaN | Clean the source data or pick a numeric Y column. |
tsc failure | Bad column prop or import path | Fix the first reported error before reporting success. |
| Sluggish render | Over ~2,000 SVG points | Pre-aggregate the series (e.g. yearly buckets). |
/portaljs-add-chart co2-emissions x=year y=emissions type=line
/portaljs-add-chart trade x=year y=imports,exports type=bar
/portaljs-add-chart budget x=department y=amount type=pie
.claude/commands/portaljs-add-chart.mdreferences/reference.mdportaljs-add-dataset, portaljs-add-map, portaljs-define-schema
anthropics/skills180kGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
前端开发
anthropics/skills180kSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
前端开发
addyosmani/agent-skills103kGuides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
前端开发
addyosmani/agent-skills103kBuilds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.
前端开发
addyosmani/agent-skills103kOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.
前端开发
nexu-io/open-design100kOpenDesign's feature business case for the plugin marketplace: the user pain, options, tradeoffs, and the measure of success. Built as a decision-grade product management deck for PM, eng, design, leadership.
前端开发