Skip to content

Commit dd0bd74

Browse files
Add 6 new agent skills + GitHub Actions npm publish workflow
1 parent 5a92830 commit dd0bd74

28 files changed

Lines changed: 5300 additions & 31 deletions

File tree

.github/workflows/publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish numb-design to npm
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "packages/numb-design/**"
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: packages/numb-design
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- run: npm ci
25+
continue-on-error: true
26+
27+
- name: Bump version
28+
run: |
29+
git config user.name "github-actions"
30+
git config user.email "github-actions@github.com"
31+
npm version patch -m "Bump to %s [skip ci]"
32+
33+
- name: Publish to npm
34+
run: npm publish --access public
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
- name: Push version bump
39+
run: git push origin main --follow-tags
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# dependencies
44
/node_modules
5+
packages/numb-design/node_modules
56
/.pnp
67
.pnp.*
78
.yarn/*
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Anthropic Brand Guidelines
2+
3+
Official brand guidelines for Anthropic-fronted interfaces. Establishes the visual identity system including color, typography, and usage rules.
4+
5+
## Brand Colors
6+
7+
### Primary Palette
8+
| Token | Hex | Usage |
9+
|-------|-----|-------|
10+
| `brand-primary` | `#D4A574` | Primary accent, highlights, key CTAs |
11+
| `brand-primary-dark` | `#B8894F` | Primary on dark backgrounds |
12+
| `brand-bg` | `#FFFFFF` | Light background |
13+
| `brand-bg-dark` | `#1A1A1A` | Dark background |
14+
| `brand-text` | `#1A1A1A` | Light mode text |
15+
| `brand-text-dark` | `#F5F5F5` | Dark mode text |
16+
17+
### Accent Colors
18+
| Token | Hex | Usage |
19+
|-------|-----|-------|
20+
| `accent-green` | `#4ADE80` | Success states |
21+
| `accent-amber` | `#FBBF24` | Warning states |
22+
| `accent-red` | `#F87171` | Error states |
23+
| `accent-blue` | `#60A5FA` | Info states |
24+
25+
### Neutral Scale
26+
| Token | Hex | Usage |
27+
|-------|-----|-------|
28+
| `neutral-50` | `#F9FAFB` | Backgrounds (lightest) |
29+
| `neutral-100` | `#F3F4F6` | Card backgrounds |
30+
| `neutral-200` | `#E5E7EB` | Borders |
31+
| `neutral-300` | `#D1D5DB` | Disabled text |
32+
| `neutral-400` | `#9CA3AF` | Placeholder text |
33+
| `neutral-500` | `#6B7280` | Secondary text |
34+
| `neutral-600` | `#4B5563` | Body text |
35+
| `neutral-700` | `#374151` | Strong text |
36+
| `neutral-800` | `#1F2937` | Headings |
37+
| `neutral-900` | `#111827` | Darkest text |
38+
39+
## Typography
40+
41+
### Primary Font: Poppins
42+
- **Weights**: 300 (Light), 400 (Regular), 500 (Medium), 600 (Semi-Bold), 700 (Bold)
43+
- **Usage**: Headlines, titles, navigation, buttons
44+
- **Fallback**: sans-serif
45+
46+
### Secondary Font: Lora
47+
- **Weights**: 400 (Regular), 500 (Medium), 600 (Semi-Bold), 700 (Bold)
48+
- **Usage**: Body text, descriptions, long-form content
49+
- **Fallback**: serif
50+
51+
### Type Scale
52+
| Token | Size | Weight | Line Height | Usage |
53+
|-------|------|--------|-------------|-------|
54+
| `text-xs` | 12px | 400 | 1.5 | Captions, footnotes |
55+
| `text-sm` | 14px | 400 | 1.5 | Body, descriptions |
56+
| `text-base` | 16px | 400 | 1.5 | Default body |
57+
| `text-lg` | 18px | 500 | 1.4 | Lead text |
58+
| `text-xl` | 20px | 500 | 1.4 | Subheadings |
59+
| `text-2xl` | 24px | 600 | 1.3 | Section headings |
60+
| `text-3xl` | 30px | 600 | 1.25 | Page headings |
61+
| `text-4xl` | 36px | 700 | 1.2 | Hero headings |
62+
| `text-5xl` | 48px | 700 | 1.15 | Large hero |
63+
| `text-6xl` | 60px | 700 | 1.1 | Display |
64+
65+
## Usage Rules
66+
67+
1. **Always** use Poppins for headings and buttons. Never use Lora for UI elements.
68+
2. **Always** use Lora for body text in marketing/content pages. System UI can use Poppins at text-sm.
69+
3. **Primary accent** (#D4A574) is for key interactive elements only — not for decorative use.
70+
4. **Neutral scale** handles 95% of UI surface area. Accent colors are highlights.
71+
5. **Dark mode** is required for any production interface. Use `-dark` variants.
72+
6. **Do not** add additional colors to the brand palette without design review.
73+
7. **Do not** use brand colors at low opacity for text — use the neutral scale instead.
74+
8. **Do not** stretch or distort Poppins or Lora typefaces.
75+
76+
## Accessibility
77+
- All text on brand backgrounds must meet WCAG AA (4.5:1 for body, 3:1 for large text)
78+
- Brand accent #D4A574 passes AA on #1A1A1A but not on #FFFFFF — use darker variant (#B8894F) on light backgrounds
79+
- Focus indicators must use 2px offset ring with brand or accent color
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Canvas Design — Anthropic Skills
2+
3+
AI-assisted visual art and philosophy creation skill. Specializes in generating beautiful, thought-provoking visuals (.png, .pdf) using canvas rendering techniques.
4+
5+
## Core Capabilities
6+
7+
1. **Visual Art Creation** — Generate abstract art, data visualizations, diagrams, and illustrations using canvas rendering
8+
2. **Philosophical Visualization** — Create visual representations of abstract concepts, ideas, and philosophies
9+
3. **Data Visualization** — Transform data into compelling visual narratives
10+
4. **Diagram Generation** — Create system diagrams, flowcharts, architecture diagrams, and relationship maps
11+
5. **Poster/Print Design** — Generate printable artwork with proper resolution and layout
12+
13+
## Techniques
14+
15+
### Canvas Rendering
16+
- Use HTML Canvas 2D API for programmatic art generation
17+
- Support for shapes, paths, gradients, patterns, and text
18+
- Anti-aliased rendering for crisp output
19+
- Export to PNG at 72-300 DPI depending on use case
20+
21+
### Visual Styles
22+
- **Abstract/Surreal** — Generative shapes, color fields, organic forms
23+
- **Minimalist** — Clean lines, ample whitespace, restrained palette
24+
- **Data-Driven** — Charts, graphs, networks, trees
25+
- **Diagrammatic** — Boxes, arrows, connections, annotations
26+
- **Typographic** — Text as visual element, expressive typography
27+
28+
### Color Theory
29+
- Complementary, analogous, triadic, monochromatic schemes
30+
- Gradient generation with smooth color transitions
31+
- Opacity and blending modes for depth
32+
- Dark/light background adaptation
33+
34+
## Output Formats
35+
36+
- **PNG** — Best for screens, social media, web (lossless, transparency support)
37+
- **PDF** — Best for printing, documents, high-resolution output (vector text, scalable)
38+
39+
## Use Cases
40+
41+
1. **Philosophical diagrams** — Visualize frameworks, mental models, systems thinking
42+
2. **Concept art** — Abstract representations of ideas, metaphors, concepts
43+
3. **Data storytelling** — Narrative-driven data visualization
44+
4. **Visual essays** — Combine text and imagery in a single canvas
45+
5. **Infographics** — Information-dense visual communication
46+
6. **Abstract posters** — Generate printable artwork
47+
7. **System architecture** — Diagram complex system relationships
48+
8. **Mind maps** — Hierarchical concept visualization
49+
50+
## Best Practices
51+
52+
1. **Always set canvas resolution** for the intended output (2x for retina)
53+
2. **Use `window.devicePixelRatio`** scaling for sharp rendering
54+
3. **Organize drawing into layers** (background → shapes → text → overlays)
55+
4. **Use `save()`/`restore()`** for isolated transformations
56+
5. **Pre-define color palettes** before starting to ensure harmony
57+
6. **Export at appropriate DPI** — 72 for web, 300 for print
58+
7. **Test output** for legibility at intended display size
59+
60+
## Anti-Patterns
61+
- Don't use canvas for standard UI layouts (use DOM/CSS)
62+
- Don't forget devicePixelRatio scaling (results in blurry output)
63+
- Don't hardcode pixel values without considering output resolution
64+
- Don't ignore text legibility (ensure sufficient size and contrast)
65+
- Don't render at larger than needed resolution (performance issue)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Frontend Design — Anthropic Skills
2+
3+
Production-grade frontend UI design skill created by Anthropic. Build beautiful, responsive, accessible user interfaces with a bold aesthetic.
4+
5+
## Core Principles
6+
7+
1. **Bold, Intentional Design** — Avoid generic layouts. Use asymmetric grids, overlapping elements, and clear visual hierarchy.
8+
2. **Accessibility is Not Optional** — Every component must meet WCAG 2.2 AA minimum. Forms need labels, buttons need aria attributes, colors need contrast verification.
9+
3. **Performance is Design** — Every component must be performant. Use CSS transforms and opacity for animations. Lazy load images. Avoid layout shifts.
10+
4. **Responsive by Default** — Mobile-first approach. Think in terms of breakpoints: single column on mobile, multi-column on desktop.
11+
5. **Dark Mode is Standard** — Every component needs a dark mode variant. Use CSS variables for theme switching.
12+
13+
## Design Approach
14+
15+
### Visual Hierarchy
16+
- Use size, weight, and color to create clear hierarchy
17+
- Stack headings, not inline them
18+
- White space is a design tool
19+
20+
### Color System
21+
- Start with neutral palette: gray-50 through gray-950
22+
- Add one primary accent color
23+
- Add one secondary accent for variety
24+
- Keep semantic meaning: success (green), warning (amber), error (red)
25+
26+
### Typography
27+
- Sans-serif for UI (Inter, SF Pro, or system-ui)
28+
- Limit to 2 families max: one for headings, one for body
29+
- Use integer font sizes: 14, 16, 18, 20, 24, 30, 36, 48
30+
- Line height: 1.5 body, 1.25 headings
31+
32+
### Spacing
33+
- Use consistent 4px or 8px base unit
34+
- Common values: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64
35+
36+
### Motion Design
37+
- Keep animations under 300ms for functional UI
38+
- Use CSS transitions: `transition-all duration-200 ease-out`
39+
- Add micro-interactions: hover scale, focus ring entrance, button press
40+
41+
## Page Sections and Implementation Strategies
42+
43+
### Hero Sections
44+
- Full-width, bold headline, clear CTA
45+
- Background options: gradient mesh, abstract shapes, product screenshots
46+
- Keep headline focused on value proposition
47+
- Use large (60-80px) bold headings with tight line height
48+
49+
### Feature Grids
50+
- 3-column grid on desktop, 1 column on mobile
51+
- Each feature: icon + short headline + 1-2 sentence description
52+
- Consistent card design: rounded corners, subtle shadow, hover elevation
53+
- Use 3D tilt or hover lift for interactivity
54+
55+
### Pricing Tables
56+
- 3 tiers: Basic, Pro, Enterprise
57+
- Highlight recommended tier with accent border/shadow
58+
- Feature checklist for each tier
59+
- Annual vs monthly toggle
60+
61+
### Testimonials
62+
- Social proof with real names, titles, avatars
63+
- Quote + attribution pattern
64+
- Grid layout or carousel for many testimonials
65+
66+
### Footer
67+
- Multi-column link layout
68+
- Copyright, social links, legal links
69+
- Newsletter signup in footer
70+
71+
## Component States Checklist
72+
- **Rest** → Default appearance
73+
- **Hover** → Subtle visual change (bg shift, shadow lift, underline)
74+
- **Active/Pressed** → Inset shadow or scale down
75+
- **Focus** → Visible focus ring (2px offset, matching accent)
76+
- **Disabled** → Reduced opacity (50%), no pointer events
77+
- **Loading** → Skeleton or spinner
78+
- **Error** → Red border on inputs, error messages below
79+
- **Empty** → Illustration + message + CTA
80+
81+
## Accessibility Requirements
82+
- All images need descriptive alt text
83+
- Forms: labels on every input, error messages with aria-describedby
84+
- Links: distinguishable from surrounding text (underline or sufficient contrast)
85+
- Color contrast: 4.5:1 body, 3:1 large text
86+
- Focus indicators: never remove outline without replacement
87+
- Reduced motion: respect prefers-reduced-motion
88+
- Semantic HTML: use nav, main, section, article, aside correctly
89+
90+
## Performance Guidelines
91+
- Images: lazy loading, WebP format, responsive srcset
92+
- Fonts: font-display: swap, subset if possible, preload key fonts
93+
- CSS: purge unused styles, use CSS variables for theming
94+
- JavaScript: code-split by route, lazy load non-critical components
95+
- Animations: use GPU-accelerated properties (transform, opacity)
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Build Dashboard — Anthropic Knowledge Work Plugins
2+
3+
Interactive HTML dashboard builder for creating live, data-driven dashboards with charts, filters, and real-time updates. Generates standalone HTML files with embedded JavaScript.
4+
5+
## Overview
6+
7+
Build beautiful, interactive dashboards as single HTML files. Each dashboard includes:
8+
- Data grid/table views with sorting and filtering
9+
- Interactive charts (bar, line, pie, area, scatter)
10+
- Filter controls that update charts in real-time
11+
- Clean, modern design system
12+
- Export to standalone HTML file
13+
14+
## Quick Start
15+
16+
```typescript
17+
import { DashboardBuilder } from "./dashboard-builder";
18+
19+
const dashboard = new DashboardBuilder({
20+
title: "Sales Dashboard",
21+
theme: "light", // 'light' | 'dark'
22+
});
23+
24+
// Add data
25+
dashboard.addTable("Sales Data", [
26+
{ month: "Jan", revenue: 12000, expenses: 8000, profit: 4000 },
27+
{ month: "Feb", revenue: 15000, expenses: 9000, profit: 6000 },
28+
// ...
29+
]);
30+
31+
// Add chart
32+
dashboard.addChart("Monthly Revenue", {
33+
type: "bar",
34+
xKey: "month",
35+
yKeys: ["revenue", "expenses", "profit"],
36+
});
37+
38+
// Add filter
39+
dashboard.addFilter("dateRange", "date", {
40+
label: "Date Range",
41+
});
42+
43+
// Generate HTML
44+
const html = dashboard.build();
45+
```
46+
47+
## Chart Types
48+
49+
| Type | Description | Best For |
50+
|------|-------------|----------|
51+
| `bar` | Vertical or horizontal bars | Comparing categories |
52+
| `line` | Connected data points | Trends over time |
53+
| `pie` | Circular segments | Part-to-whole relationships |
54+
| `area` | Filled line chart | Magnitude over time |
55+
| `scatter` | X/Y data points | Correlation analysis |
56+
| `stacked-bar` | Stacked bars | Part-to-whole over categories |
57+
58+
## Filter Types
59+
60+
| Type | Description |
61+
|------|-------------|
62+
| `date` | Date range picker |
63+
| `select` | Dropdown with options |
64+
| `multi-select` | Multi-selection dropdown |
65+
| `slider` | Numeric range slider |
66+
| `search` | Text search input |
67+
68+
## Layout Options
69+
70+
- **Grid layout**: 1, 2, 3, or 4 columns
71+
- **Full width**: Single chart/table spanning entire width
72+
- **Sidebar**: Filters panel on left or right
73+
- **Tabs**: Multiple dashboard views
74+
- **Header**: Title, description, and action buttons
75+
76+
## Design Guidelines
77+
78+
1. **Keep it focused** — Each dashboard should answer a specific question
79+
2. **Guide the eye** — Place the most important chart top-left or most prominent
80+
3. **Consistent colors** — Use a single color palette across all charts
81+
4. **Interactive by default** — Let users filter, sort, and explore
82+
5. **Mobile responsive** — Charts should reflow for smaller screens
83+
6. **Loading states** — Show skeleton/spinner while data loads
84+
7. **Empty states** — Show helpful message when filters return no data
85+
8. **Limit visual noise** — Remove gridlines, borders, legends where possible
86+
87+
## Best Practices
88+
89+
1. **Pre-aggregate data client-side** — Dashboards should be fast to render
90+
2. **Use semantic colors** — Green for positive, red for negative, blue for neutral
91+
3. **Sort data** — Sort chart data before rendering (chronological, descending value, etc.)
92+
4. **Label clearly** — Every chart needs a title, every axis needs a label
93+
5. **Export functionality** — Let users download charts as PNG or data as CSV
94+
6. **Auto-refresh** — Poll data source every N seconds for live dashboards
95+
7. **URL state** — Persist filters in URL query params for shareability
96+
8. **Performance** — Lazy-load chart libraries, virtualize large tables

0 commit comments

Comments
 (0)