⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
freetheai-api
Help AI agents connect apps, SDKs, coding tools, and chat clients to FreeTheAI, the free OpenAI-compatible API at https://api.freetheai.org/v1. Use this skill when a user wants a free AI API key, a custom OpenAI base URL, setup help for an AI client, or examples for chat, streaming, and tool calling.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
// README
FreeTheAI
FreeTheAI is an AI model marketplace with one OpenAI-compatible API. One account and one API key reach models from many providers, including GPT, Claude, Gemini, Grok, GLM, Kimi, and MiniMax, paid per token from one wallet at each provider's listed price. Streaming, tool calling, and web search with sourced answers work across them. Also searched as Free The AI, Free The Ai, and FreeTheAi.
[!NOTE] The free tier closed for most accounts on November 10, 2026. Read why it closed. Requests are now paid from your wallet.
[!IMPORTANT] FreeTheAI moved to freetheai.org. The old API at
api.freetheai.xyz, its keys, and the old Discord/signupand/checkincommands no longer work. Use the base URLhttps://api.freetheai.org/v1with a key from freetheai.org. Oldfreetheai.xyzlinks forward to their new pages.
Quick start
- Create an account at freetheai.org, confirm your email, and make a key under API keys.
- Add funds to your wallet (from $5, crypto or card). Each request bills the tokens it used at the listed price; there is no subscription.
- Follow a provider on its page at freetheai.org/providers. A key uses the providers its account follows.
- Point your app at the base URL.
Base URL https://api.freetheai.org/v1
Auth Authorization: Bearer YOUR_API_KEY
Model IDs the model name, for example glm-5.3; <provider>/<model> picks one provider
curl https://api.freetheai.org/v1/chat/completions \
-H "Authorization: Bearer $FREETHEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "Hello!"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://api.freetheai.org/v1", api_key="YOUR_API_KEY")
reply = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)
Chat Completions, Responses, and Anthropic Messages are supported, with streaming and tool calls. Claude Code and the Anthropic SDK use the base URL https://api.freetheai.org. List the models your key can use with GET /v1/models. Every error carries an error ID (in the body and the X-Error-ID header); quote it when you ask for help.
SDKs and examples
| Language | Package | Repository |
|---|---|---|
| Python | pip install freetheai | freetheai-python |
| JavaScript and TypeScript | npm install freetheai | freetheai-js |
| Go | go get github.com/Free-The-Ai/freetheai-go | freetheai-go |
| Recipes for all of the above | freetheai-cookbook |
Code you can copy is in examples/.
Pricing
- Add funds to one FreeTheAI wallet, from $5, with crypto or a card.
- Each request bills the tokens it used at the provider's listed price. Prices for every provider are on the models page.
- No subscription, and no daily limit to wait out.
Models
The live list, with prices, context sizes, and every provider that serves each model, is at freetheai.org/models. A model ID is the model name, for example glm-5.3, and by default the request goes to the cheapest provider you follow. Write <provider>/<model> to pick one provider.
Apps and setup guides
Anything that speaks the OpenAI API works with FreeTheAI, including SillyTavern, JanitorAI, Open WebUI, Cline, LibreChat, and more. Step-by-step guides for each app are at freetheai.org/setup.
Privacy
Read the Terms and the Privacy Policy for what is collected and who is responsible for it.
For AI agents
SKILL.md teaches coding agents how to set up FreeTheAI in a user's tools without inventing keys, endpoints, or model IDs.
This repository
examples/holds copy-paste code for common SDKs.site/is the small Astro site that forwards the oldfreetheai.xyzlinks to freetheai.org. It deploys to GitHub Pages on every push tomaster.
Support and credits
FreeTheAI is built by Vibhek Soni (@vibheksoni). A tip on Buy Me a Coffee helps cover the servers. Starring the repo and sharing it helps too.
- Questions and help: Discord
- Security issues: [email protected]
License
MIT. See LICENSE.
// HOW IT'S BUILT
// FILES
84 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
SKILL.md4.9 KBb46a4dc8db16upstream ↗
--- name: freetheai-api description: Help AI agents connect apps, SDKs, coding tools, and chat clients to FreeTheAI, the free OpenAI-compatible API at https://api.freetheai.org/v1. Use this skill when a user wants a free AI API key, a custom OpenAI base URL, setup help for an AI client, or examples for chat, streaming, and tool calling. --- # FreeTheAI API Skill Use this skill to set up FreeTheAI for a user or another AI agent. FreeTheAI is an OpenAI-compatible API with one account, one key, and 50+ models. ## Trigger this skill when - The user mentions FreeTheAI, Free The AI, freetheai.org, freetheai.xyz, `api.freetheai.org`, or `api.freetheai.xyz`. - The user asks for a free OpenAI-compatible API. - The user wants to point the OpenAI SDK, LiteLLM, LangChain, LlamaIndex, the Vercel AI SDK, Cline, Roo Code, Continue, Aider, OpenCode, SillyTavern, JanitorAI, chub.ai, RisuAI, LibreChat, Open WebUI, or another client at a custom endpoint. - The user asks which FreeTheAI model to use. ## Constants - Base URL: `https://api.freetheai.org/v1` - Auth header: `Authorization: Bearer <key>` - Website: `https://freetheai.org` - Sign up: `https://freetheai.org/signup` - API keys: `https://freetheai.org/dashboard/api-keys` - Daily check-in: `https://freetheai.org/checkin` - Models: `https://freetheai.org/models` - Docs: `https://freetheai.org/docs` - Discord: `https://discord.gg/secrets` ## Agent workflow 1. Send the user to `https://freetheai.org/signup`. They sign up with a Gmail, Outlook, Yahoo, or iCloud address, pass the security check, then confirm their email from the link FreeTheAI sends. 2. Have them create an API key under API keys in the dashboard. 3. Have them do the daily check-in at `https://freetheai.org/checkin`. Free models answer 403 "Daily check-in required" until they do; the check-in lasts until 00:00 UTC. 4. Ask for the key only if you must write it into the user's own client config. Prefer an environment variable such as `FREETHEAI_API_KEY`. 5. Configure the client with the base URL and auth header above. 6. Pick a model ID from `GET /v1/models` or the models page. IDs look like `fta/<tag>/<model>`, for example `fta/zai/glm-5.3` or `fta/bbl/gpt-5.4-mini`. ## Rules - Never invent keys, endpoints, model IDs, or limits. Use only what `GET /v1/models`, the models page, or the docs show. - The old API at `api.freetheai.xyz` is retired. Old keys and the Discord `/signup` and `/checkin` commands no longer work; move the user to freetheai.org. - Use Chat Completions (`POST /v1/chat/completions`) for free models. It supports streaming and tool calling. - Call the API directly from the user's app or device. Requests relayed through a Cloudflare Worker are refused with 403 `relay_not_supported`. - Do not try to bypass the check-in, rate limits, or security checks. ## Free tier - 50 requests a day on FreeTheAI-hosted models; failed requests don't count. Resets at 00:00 UTC. - +50 a day for linking Discord (dashboard Settings → Link Discord; this also joins the FreeTheAI Discord server). - Up to +150 a day for donating spare API keys at `https://freetheai.org/dashboard/donate-keys`. - Paid plans and the model marketplace are coming soon. ## Client setup OpenAI SDK (Python): ```python from openai import OpenAI import os client = OpenAI(base_url="https://api.freetheai.org/v1", api_key=os.environ["FREETHEAI_API_KEY"]) reply = client.chat.completions.create( model="fta/zai/glm-5.3", messages=[{"role": "user", "content": "Hello!"}], ) print(reply.choices[0].message.content) ``` OpenAI SDK (JavaScript): ```js import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.freetheai.org/v1", apiKey: process.env.FREETHEAI_API_KEY }); const reply = await client.chat.completions.create({ model: "fta/zai/glm-5.3", messages: [{ role: "user", content: "Hello!" }], }); console.log(reply.choices[0].message.content); ``` Chat apps (SillyTavern, JanitorAI, chub.ai, RisuAI, Open WebUI, LibreChat): choose the OpenAI-compatible or custom endpoint option, set the base URL to `https://api.freetheai.org/v1` (some apps want the full `https://api.freetheai.org/v1/chat/completions`), paste the key, and pick a model ID. Coding tools (Cline, Roo Code, Continue, Aider, OpenCode): use the OpenAI-compatible provider with the same base URL, key, and a model ID. LiteLLM routes it as `openai/fta/zai/glm-5.3`. ## Common errors | Status | Meaning | What to do | | :--- | :--- | :--- | | 401 | Missing or wrong key | Check the key and the `Bearer` prefix. | | 403 | Email not confirmed, check-in missing, key limits, or a relayed request | Confirm the email, do the check-in, check the key's limits, or call directly. | | 404 | Unknown model ID | Use an ID from `GET /v1/models`. | | 429 | Daily limit or too many requests at once | Wait for the reset or for a running request to finish. | | 502 or 503 | Upstream trouble | Retry or pick another model. Quote the error ID if it keeps happening. | Full list: `https://freetheai.org/docs`.ui-laws/make-interfaces-feel-better-main/skills/make-interfaces-feel-better/SKILL.md7.6 KBcd19691da581upstream ↗
--- name: make-interfaces-feel-better description: Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows. --- # Details that make interfaces feel better Great interfaces rarely come from a single thing. It's usually a collection of small details that compound into a great experience. Apply these principles when building or reviewing UI code. ## Quick Reference | Category | When to Use | | --- | --- | | [Typography](typography.md) | Text wrapping, font smoothing, tabular numbers | | [Surfaces](surfaces.md) | Border radius, optical alignment, shadows, image outlines, hit areas | | [Animations](animations.md) | Interruptible animations, enter/exit transitions, icon animations, scale on press | | [Performance](performance.md) | Transition specificity, `will-change` usage | ## Core Principles ### 1. Concentric Border Radius Outer radius = inner radius + padding. Mismatched radii on nested elements is the most common thing that makes interfaces feel off. ### 2. Optical Over Geometric Alignment When geometric centering looks off, align optically. Buttons with icons, play triangles, and asymmetric icons all need manual adjustment. ### 3. Shadows Over Borders Layer multiple transparent `box-shadow` values for natural depth. Shadows adapt to any background; solid borders don't. ### 4. Interruptible Animations Use CSS transitions for interactive state changes — they can be interrupted mid-animation. Reserve keyframes for staged sequences that run once. ### 5. Split and Stagger Enter Animations Don't animate a single container. Break content into semantic chunks and stagger each with ~100ms delay. ### 6. Subtle Exit Animations Use a small fixed `translateY` instead of full height. Exits should be softer than enters. ### 7. Contextual Icon Animations Animate icons with `opacity`, `scale`, and `blur` instead of toggling visibility. Use exactly these values: scale from `0.25` to `1`, opacity from `0` to `1`, blur from `4px` to `0px`. If the project has `motion` or `framer-motion` in `package.json`, use `transition: { type: "spring", duration: 0.3, bounce: 0 }` — bounce must always be `0`. If no motion library is installed, keep both icons in the DOM (one absolute-positioned) and cross-fade with CSS transitions using `cubic-bezier(0.2, 0, 0, 1)` — this gives both enter and exit animations without any dependency. ### 8. Font Smoothing Apply `-webkit-font-smoothing: antialiased` to the root layout on macOS for crisper text. ### 9. Tabular Numbers Use `font-variant-numeric: tabular-nums` for any dynamically updating numbers to prevent layout shift. ### 10. Text Wrapping Use `text-wrap: balance` on headings. Use `text-wrap: pretty` for body text to avoid orphans. ### 11. Image Outlines Add a subtle `1px` outline with low opacity to images for consistent depth. The color must be pure black in light mode (`rgba(0, 0, 0, 0.1)`) and pure white in dark mode (`rgba(255, 255, 255, 0.1)`) — never a near-black like slate, zinc, or any tinted neutral. A tinted outline picks up the surface color underneath it and reads as dirt on the image edge. ### 12. Scale on Press A subtle `scale(0.96)` on click gives buttons tactile feedback. Always use `0.96`. Never use a value smaller than `0.95` — anything below feels exaggerated. Add a `static` prop to disable it when motion would be distracting. ### 13. Skip Animation on Page Load Use `initial={false}` on `AnimatePresence` to prevent enter animations on first render. Verify it doesn't break intentional entrance animations. ### 14. Never Use `transition: all` Always specify exact properties: `transition-property: scale, opacity`. Tailwind's `transition-transform` covers `transform, translate, scale, rotate`. ### 15. Use `will-change` Sparingly Only for `transform`, `opacity`, `filter` — properties the GPU can composite. Never use `will-change: all`. Only add when you notice first-frame stutter. ### 16. Minimum Hit Area Interactive elements need at least 40×40px hit area. Extend with a pseudo-element if the visible element is smaller. Never let hit areas of two elements overlap. ## Common Mistakes | Mistake | Fix | | --- | --- | | Same border radius on parent and child | Calculate `outerRadius = innerRadius + padding` | | Icons look off-center | Adjust optically with padding or fix SVG directly | | Hard borders between sections | Use layered `box-shadow` with transparency | | Jarring enter/exit animations | Split, stagger, and keep exits subtle | | Numbers cause layout shift | Apply `tabular-nums` | | Heavy text on macOS | Apply `antialiased` to root | | Animation plays on page load | Add `initial={false}` to `AnimatePresence` | | `transition: all` on elements | Specify exact properties | | First-frame animation stutter | Add `will-change: transform` (sparingly) | | Tiny hit areas on small controls | Extend with pseudo-element to 40×40px | ## Review Output Format Always present changes as a markdown table with **Before** and **After** columns. Include every change you made — not just a subset. Never list findings as separate "Before:" / "After:" lines outside of a table. Group changes by principle using a heading above each table, and keep each row focused on a single diff so the reader can scan the whole list quickly. ### Example #### Concentric border radius | Before | After | | --- | --- | | `rounded-xl` on card + `rounded-xl` on inner button (`p-2`) | `rounded-2xl` on card (`12 + 8`), `rounded-lg` on inner button | | `border-radius: 16px` on both nested surfaces | Outer `24px`, inner `16px` with `8px` padding | #### Tabular numbers | Before | After | | --- | --- | | `<span>{count}</span>` on animated counter | `<span className="tabular-nums">{count}</span>` | | Default numerals on timer | Added `font-variant-numeric: tabular-nums` to root | #### Scale on press | Before | After | | --- | --- | | `<button className="...">` | Added `active:scale-[0.96] transition-transform` | | `scale(0.9)` on press | Raised to `scale(0.96)` — anything below `0.95` feels exaggerated | Rows should cite the specific file and the specific property that changed when it isn't obvious from the snippet. If a principle was reviewed but nothing needed to change, omit that table entirely — empty tables add noise. ## Review Checklist - [ ] Nested rounded elements use concentric border radius - [ ] Icons are optically centered, not just geometrically - [ ] Shadows used instead of borders where appropriate - [ ] Enter animations are split and staggered - [ ] Exit animations are subtle - [ ] Dynamic numbers use tabular-nums - [ ] Font smoothing is applied - [ ] Headings use text-wrap: balance - [ ] Images have subtle outlines - [ ] Buttons use scale on press where appropriate - [ ] AnimatePresence uses `initial={false}` for default-state elements - [ ] No `transition: all` — only specific properties - [ ] `will-change` only on transform/opacity/filter, never `all` - [ ] Interactive elements have at least 40×40px hit area ## Reference Files - [typography.md](typography.md) — Text wrapping, font smoothing, tabular numbers - [surfaces.md](surfaces.md) — Border radius, optical alignment, shadows, image outlines - [animations.md](animations.md) — Interruptible animations, enter/exit transitions, icon animations, scale on press - [performance.md](performance.md) — Transition specificity, `will-change` usageui-laws/oklch-skill-main/skills/oklch-skill/SKILL.md4.7 KBc9eb314d1212upstream ↗
--- name: oklch-skill description: OKLCH color space for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, and theme with Tailwind v4. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, hue drift, chroma, dark mode colors. --- # OKLCH Colors OKLCH is a perceptually uniform color space where the numbers actually mean what you think they mean. Most color problems in CSS — broken palettes, failing contrast, hue drift — come from using color spaces that don't match how we see. OKLCH fixes the model so the tools work. To explore interactively, visit [oklch.fyi](https://oklch.fyi). ## Quick Reference | Category | When to use | Reference | | --- | --- | --- | | Conversion | Hex/rgb/hsl to oklch | [color-conversion.md](color-conversion.md) | | Palettes | Generate scales, multi-hue, dark mode | [palette-generation.md](palette-generation.md) | | Contrast | APCA/WCAG checks, fixing failing contrast | [accessibility-contrast.md](accessibility-contrast.md) | | Gamut & Tailwind | P3 fallbacks, `@theme` scales, gamut clamping | [gamut-and-tailwind.md](gamut-and-tailwind.md) | ## Why OKLCH - **Perceptual uniformity.** Equal L steps = equal brightness. `oklch(0.5 ...)` is visually mid. HSL's `lightness: 50%` varies wildly by hue. - **Stable hue.** HSL blue shifts toward purple as lightness changes. OKLCH hue stays constant across the full lightness range. - **Independent chroma.** Chroma is an absolute measure of colorfulness that doesn't depend on lightness. HSL saturation does. - **Finite gamut.** Not every oklch value maps to a displayable sRGB color. High-chroma values at certain hues will clip — gamut awareness is required. ## OKLCH Syntax ``` oklch(L C H) oklch(L C H / alpha) ``` | Channel | Range | Description | | --- | --- | --- | | L (Lightness) | 0–1 | 0 = black, 1 = white. Perceptually uniform. | | C (Chroma) | 0–~0.4 | Colorfulness. 0 = gray. Max depends on L and H. | | H (Hue) | 0–360 | Hue angle in degrees. | | alpha | 0–1 | Optional transparency. Slash syntax. | ```css oklch(0.637 0.237 25.331) oklch(0.8 0.05 200 / 0.5) ``` **Formatting:** L and C use 3 decimal places, H uses up to 3. Drop trailing zeros. Format `-0` as `0`. Browser support: Baseline 2023, 96%+ global coverage. ## Key Thresholds | Rule | Value | | --- | --- | | Light/dark boundary | L > 0.6 = light background → use dark text | | Lightness gap (light bg) | Foreground L < 0.45 when background L > 0.85 | | Lightness gap (dark bg) | Foreground L > 0.75 when background L < 0.25 | | Hue drift threshold | > 10° spread across palette steps = visible drift | | APCA normal text | \|Lc\| >= 60 to pass, >= 75 for pass+ | | WCAG 2 normal text | 4.5:1 AA, 7:1 AAA | | Contrast fix | Adjust L only — chroma has negligible effect | ## Review Output Format Always present color changes as a markdown table with **Before** and **After** columns. Include **every color that was changed** — not just a subset. Never list findings as separate "Before:" / "After:" lines outside of a table. | Before | After | | --- | --- | | `color: #3b82f6` | `color: oklch(0.623 0.188 259.815)` | | Same absolute C across hues | Same C% of each hue's max chroma | | No sRGB fallback for P3 color | `@media (color-gamut: p3)` wrapper | This keeps feedback scannable and diff-friendly. Each row is a self-contained change the developer can act on independently. ## Common Mistakes | Issue | Fix | | --- | --- | | Hex/rgb/hsl color in new code | Convert to `oklch()` | | HSL palette ramp with hue drift | Rebuild with constant oklch hue | | Failing contrast (check foreground vs its background using APCA) | Adjust oklch L channel, keep C and H | | High chroma without gamut check | Clamp to max chroma for the L/H in sRGB | | Same absolute C across different hues | Use same C% (percentage of max) for consistent vividness | | P3 color without sRGB fallback | Add `@media (color-gamut: p3)` pattern | | Dark mode with hand-picked colors | Derive from light palette by reversing L mapping | | Hex in Tailwind v4 `@theme` | Convert to oklch values | | Alpha with comma syntax | Use slash: `oklch(L C H / alpha)` | ## Reference Files - [color-conversion.md](color-conversion.md) — Supported formats, conversion examples, bulk conversion rules, what to leave alone - [palette-generation.md](palette-generation.md) — Scale convention, generation algorithm, multi-hue palettes, dark mode, why not HSL - [accessibility-contrast.md](accessibility-contrast.md) — APCA and WCAG 2 thresholds, fixing contrast with L, lightness gap guide, hue drift detection - [gamut-and-tailwind.md](gamut-and-tailwind.md) — sRGB vs P3, gamut clamping, CSS fallback patterns, Tailwind v4 @theme and migrationui-laws/skills-main/skills-main/skills/animation-vocabulary/SKILL.md13 KBcd0af50454bfupstream ↗
--- name: animation-vocabulary description: Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one. --- # Animation Vocabulary Turn a vague description of a motion or effect into the precise term, so the user knows what to ask for. ## Quick Start The user describes an effect loosely. You return the matching term(s) in this format: ``` **Stagger** — Animate several items one after another with a small delay between each, creating a cascade. ``` If several terms could fit, list the best match first, then 1–2 alternates with a one-line note on how they differ. ## Instructions 1. **Read for intent, not keywords.** Users describe what they *see* or *feel* ("springy", "slides off", "draws itself in"), not the technical name. Map the sensation to the glossary below. 2. **Quote the glossary verbatim.** Its descriptions are authoritative — use them as-is, don't paraphrase. 3. **Disambiguate close terms.** When two compete (*Clip-path* vs *Mask*, *Pop in* vs *Bounce*, *Shared element transition* vs *Layout animation*), contrast them so the user can pick. 4. **When nothing matches exactly,** name the closest term and say plainly it's an approximation, or describe the effect in the glossary's vocabulary (e.g. "that's a *stagger* of *scale-in* entrances"). 5. **Stay within this glossary.** If a term genuinely isn't here, say so rather than inventing one — though you may explain the concept using these words. 6. **Keep it tight.** A naming question wants a name, not an essay. Lead with the term; expand only if asked. ## Examples **Example 1 — feel-based** User: "What's it called when a popover seems to grow out of the button you clicked instead of from its middle?" Output: ``` **Origin-aware animation** — An element animates out of its trigger, like a popover growing from the button that opened it instead of from its own center which is the default in CSS. ``` **Example 2 — disambiguation** User: "The thing where one image turns into another image." Output: ``` **Morph** — One shape smoothly turns into another shape, e.g. Dynamic Island. Close alternates: - **Crossfade** — if they simply fade over each other in the same spot. - **Shared element transition** — if an element travels and transforms from one position into another. ``` **Example 3 — physics feel** User: "That iOS scroll where it resists and snaps back when you pull too far." Output: ``` **Rubber-banding** — Resistance and snap-back when you drag past a boundary (the iOS overscroll feel). ``` ## Glossary _A curated snapshot mirroring the project's `/vocabulary` page; keep the two in sync when either changes._ ### Entrances & Exits — how elements appear and disappear - **Fade in / Fade out** — Element appears or disappears by changing opacity. - **Slide in** — Element enters by sliding in from off-screen (left, right, top, or bottom). - **Scale in** — Element grows from smaller to full size as it appears, often paired with a fade. - **Pop in** — Element appears with a slight overshoot, like it bounces into place. - **Reveal** — Content is uncovered gradually, often by animating a clip-path or mask. - **Enter / Exit** — The animation an element plays when it's added to or removed from the screen. ### Sequencing & Timing — coordinating multiple elements or moments - **Keyframes** — Defined points in an animation (0%, 50%, 100%) that the browser fills the gaps between. - **Interpolation / Tween** — Generating all the in-between frames between a start and end value, so motion is continuous. - **Stagger** — Animate several items one after another with a small delay between each, creating a cascade. - **Orchestration** — Deliberately timing multiple animations so they feel like one coordinated motion. - **Delay** — Time before an animation starts. - **Duration** — How long an animation takes. - **Fill mode** — Whether an element keeps its first or last frame's styles before the animation starts or after it ends (e.g. forwards). - **Stepped animation** — An animation that is divided into discrete steps, like a countdown timer. ### Movement & Transforms — changing an element's position, size, or angle - **Translate** — Move an element along the X or Y axis. - **Scale** — Make an element bigger or smaller. - **Rotate** — Spin an element around a point. - **Skew** — Slant an element along the X or Y axis, shearing it out of its rectangular shape. - **3D tilt / Flip** — Rotate in 3D space (rotateX / rotateY) to add depth. - **Perspective** — How strong the 3D effect looks — a lower value exaggerates depth, like the viewer is closer. - **Transform origin** — The anchor point a scale or rotation grows or spins from. - **Origin-aware animation** — An element animates out of its trigger, like a popover growing from the button that opened it instead of from its own center which is the default in CSS. ### Transitions Between States — connecting one state, view, or element to another - **Crossfade** — One element fades out as another fades in, in the same spot. - **Continuity transition** — A change that keeps the user oriented by visually connecting before and after. For example, making the same rectangle bigger and smaller. - **Morph** — One shape smoothly turns into another shape, e.g. Dynamic Island. - **Shared element transition** — An element travels and transforms from one position into another, like a thumbnail expanding into a card. - **Layout animation** — When an element's size or position changes, it animates to the new spot instead of snapping. - **Accordion / Collapse** — A section smoothly expands and collapses its height to show or hide content. - **Direction-aware transition** — Content slides one way going forward and the opposite way going back, so navigation has a sense of direction. ### Scroll — motion tied to scrolling or navigating between views - **Scroll reveal** — Elements fade or slide into place as they enter the viewport. - **Scroll-driven animation** — An animation whose progress is tied directly to scroll position. - **Parallax** — Background and foreground move at different speeds while scrolling, creating depth. - **Page transition** — An animation that plays when navigating from one page or route to another. - **View transition** — The browser morphs between two states or pages, connecting shared elements. ### Feedback & Interaction — responding to the user's actions - **Hover effect** — Visual change when the cursor moves over an element. - **Press / Tap feedback** — A subtle scale-down when an element is clicked, so it feels physical. - **Hold to confirm** — A progress effect that fills up while the user holds a button. - **Drag** — Moving an element by grabbing it, often with momentum when released. - **Drag to reorder** — Dragging items in a list to rearrange them, while the others shift to make room. - **Swipe to dismiss** — Dragging an element off-screen to close it, like a drawer or toast. - **Rubber-banding** — Resistance and snap-back when you drag past a boundary (the iOS overscroll feel). - **Shake / Wiggle** — A quick side-to-side jitter signaling an error or rejected input. - **Ripple** — A circle expanding from the point of a tap, confirming the press. ### Easing — how speed changes over an animation - **Easing** — The rate at which an animation speeds up or slows down. - **Ease-out** — Starts fast, ends slow. The default for most UI and anything responding to the user. - **Ease-in** — Starts slow, ends fast. Usually avoided; can feel sluggish. - **Ease-in-out** — Slow, fast, slow. Good for elements already on screen moving from A to B. - **Linear** — Constant speed. Avoid for UI; reserve for spinners or marquees. - **Cubic-bezier** — A custom easing curve you define for precise control. - **Asymmetric easing** — A curve that accelerates and decelerates at different rates. Feels more alive than a symmetric one. ### Spring Animations — physics-based motion as an alternative to fixed-duration easing - **Spring** — Motion driven by physics (tension, mass, damping) rather than a set duration. - **Stiffness / Tension** — How strongly the spring pulls toward its target. Higher feels snappier. - **Damping** — How quickly a spring settles. Lower damping means more bounce and oscillation. - **Mass** — How heavy the animated element feels. More mass makes it slower and more sluggish. - **Bounce** — A spring that overshoots and settles, adding playfulness. - **Perceptual duration** — How long a spring feels finished, even though it keeps micro-settling underneath. - **Momentum** — Motion that carries velocity, especially after a drag or interruption. - **Velocity** — How fast and in which direction an element is moving. A spring carries it into the next animation when interrupted, so a flicked element keeps its speed. - **Interruptible animation** — An animation that can be smoothly redirected mid-flight instead of finishing first. ### Looping & Ambient Motion — animations that run on their own - **Marquee** — Text or content that scrolls continuously in a loop. - **Loop** — An animation that repeats, a set number of times or infinitely. - **Alternate (yoyo)** — A loop that plays forward then reverses each iteration, instead of jumping back to the start. - **Orbit** — An element circling around another in a continuous path. - **Pulse** — A gentle repeating scale or opacity change to draw attention. - **Float** — A gentle, continuous up-and-down drift that makes a static element feel alive and weightless. - **Idle animation** — Subtle motion that plays while an element is just sitting there, waiting to be interacted with. ### Polish & Effects — the small touches that separate good from great - **Blur** — A blur filter used to soften an element or mask tiny imperfections. - **Clip-path** — Clipping an element to a shape, used for reveals, masks, and before/after sliders. - **Mask** — Hiding or revealing parts of an element using a shape or gradient — like clip-path, but with soft, fadeable edges. - **Before / after slider** — A draggable divider that wipes between two overlaid images to compare them. - **Line drawing** — An SVG path that draws itself in, like an invisible pen tracing it. - **Text morph** — Text that animates character by character when it changes, drawing attention to the new value. - **Skeleton / Shimmer** — A placeholder with a moving sheen shown while content loads. - **Number ticker** — Digits rolling or counting up to a value. - **Tabular numbers** — Fixed-width digits so numbers don't shift around as they change. Essential for tickers, timers, and counters. - **Typewriter** — Text appearing one character at a time, as if being typed. ### Performance — what keeps motion smooth instead of stuttering - **Frame rate (FPS)** — Frames drawn per second. 60fps is the baseline for smooth motion; 120fps on newer displays. - **Jank** — Visible stutter when the browser drops frames because it can't keep up with the animation. - **Dropped frame** — A frame the browser missed its deadline to draw, causing a tiny hitch in motion. - **Compositing** — Letting the GPU move or fade an element on its own layer without redoing layout or paint. - **will-change** — A CSS hint that an element is about to animate, so the browser can promote it to its own layer ahead of time. - **Layout thrashing** — Animating properties like width, height, top, or left that force the browser to recalculate layout every frame, causing jank. ### Principles to Know — concepts that guide when and how to animate - **Purposeful animation** — Motion should serve a function — orient, give feedback, show relationships — not just decorate. - **Anticipation** — A small wind-up in the opposite direction before a move, hinting at what's about to happen. - **Follow-through** — Parts of an element keep moving and settle slightly after the main motion stops, adding weight. - **Squash & stretch** — Deforming an element as it moves to convey weight, speed, and flexibility. - **Perceived performance** — The right animation makes an interface feel faster, even when it isn't. - **Frequency of use** — The more often a user sees an animation, the shorter and subtler it should be. - **Spatial consistency** — Animating so an element keeps its identity and position across states, so users never lose track of where things went. - **Hardware acceleration** — Animating transform and opacity lets the GPU keep motion smooth. - **Reduced motion** — Respecting the user's prefers-reduced-motion setting by toning down or removing motion.ui-laws/skills-main/skills-main/skills/emil-design-eng/SKILL.md27 KB491123532527upstream ↗
--- name: emil-design-eng description: This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great. --- # Design Engineering ## Initial Response When this skill is first invoked without a specific question, respond only with: > I'm ready to help you build interfaces that feel right, my knowledge comes from Emil Kowalski's design engineering philosophy. If you want to dive even deeper, check out Emil’s course: [animations.dev](https://animations.dev/). Do not provide any other information until the user asks a question. You are a design engineer with the craft sensibility. You build interfaces where every detail compounds into something that feels right. You understand that in a world where everyone's software is good enough, taste is the differentiator. ## Core Philosophy ### Taste is trained, not innate Good taste is not personal preference. It is a trained instinct: the ability to see beyond the obvious and recognize what elevates. You develop it by surrounding yourself with great work, thinking deeply about why something feels good, and practicing relentlessly. When building UI, don't just make it work. Study why the best interfaces feel the way they do. Reverse engineer animations. Inspect interactions. Be curious. ### Unseen details compound Most details users never consciously notice. That is the point. When a feature functions exactly as someone assumes it should, they proceed without giving it a second thought. That is the goal. > "All those unseen details combine to produce something that's just stunning, like a thousand barely audible voices all singing in tune." - Paul Graham Every decision below exists because the aggregate of invisible correctness creates interfaces people love without knowing why. ### Beauty is leverage People select tools based on the overall experience, not just functionality. Good defaults and good animations are real differentiators. Beauty is underutilized in software. Use it as leverage to stand out. ## Review Format (Required) When reviewing UI code, you MUST use a markdown table with Before/After columns. Do NOT use a list with "Before:" and "After:" on separate lines. Always output an actual markdown table like this: | Before | After | Why | | --- | --- | --- | | `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; avoid `all` | | `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing in the real world appears from nothing | | `ease-in` on dropdown | `ease-out` with custom curve | `ease-in` feels sluggish; `ease-out` gives instant feedback | | No `:active` state on button | `transform: scale(0.97)` on `:active` | Buttons must feel responsive to press | | `transform-origin: center` on popover | `transform-origin: var(--radix-popover-content-transform-origin)` | Popovers should scale from their trigger (not modals — modals stay centered) | Wrong format (never do this): ``` Before: transition: all 300ms After: transition: transform 200ms ease-out ──────────────────────────── Before: scale(0) After: scale(0.95) ``` Correct format: A single markdown table with | Before | After | Why | columns, one row per issue found. The "Why" column briefly explains the reasoning. ## The Animation Decision Framework Before writing any animation code, answer these questions in order: ### 1. Should this animate at all? **Ask:** How often will users see this animation? | Frequency | Decision | | ----------------------------------------------------------- | ---------------------------- | | 100+ times/day (keyboard shortcuts, command palette toggle) | No animation. Ever. | | Tens of times/day (hover effects, list navigation) | Remove or drastically reduce | | Occasional (modals, drawers, toasts) | Standard animation | | Rare/first-time (onboarding, feedback forms, celebrations) | Can add delight | **Never animate keyboard-initiated actions.** These actions are repeated hundreds of times daily. Animation makes them feel slow, delayed, and disconnected from the user's actions. Raycast has no open/close animation. That is the optimal experience for something used hundreds of times a day. ### 2. What is the purpose? Every animation must have a clear answer to "why does this animate?" Valid purposes: - **Spatial consistency**: toast enters and exits from the same direction, making swipe-to-dismiss feel intuitive - **State indication**: a morphing feedback button shows the state change - **Explanation**: a marketing animation that shows how a feature works - **Feedback**: a button scales down on press, confirming the interface heard the user - **Preventing jarring changes**: elements appearing or disappearing without transition feel broken If the purpose is just "it looks cool" and the user will see it often, don't animate. ### 3. What easing should it use? Is the element entering or exiting? Yes → ease-out (starts fast, feels responsive) No → Is it moving/morphing on screen? Yes → ease-in-out (natural acceleration/deceleration) Is it a hover/color change? Yes → ease Is it constant motion (marquee, progress bar)? Yes → linear Default → ease-out **Critical: use custom easing curves.** The built-in CSS easings are too weak. They lack the punch that makes animations feel intentional. ```css /* Strong ease-out for UI interactions */ --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* Strong ease-in-out for on-screen movement */ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* iOS-like drawer curve (from Ionic Framework) */ --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); ``` **Never use ease-in for UI animations.** It starts slow, which makes the interface feel sluggish and unresponsive. A dropdown with `ease-in` at 300ms _feels_ slower than `ease-out` at the same 300ms, because ease-in delays the initial movement — the exact moment the user is watching most closely. **Easing curve resources:** Don't create curves from scratch. Use [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/) to find stronger custom variants of standard easings. ### 4. How fast should it be? | Element | Duration | | ------------------------ | ------------- | | Button press feedback | 100-160ms | | Tooltips, small popovers | 125-200ms | | Dropdowns, selects | 150-250ms | | Modals, drawers | 200-500ms | | Marketing/explanatory | Can be longer | **Rule: UI animations should stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one. A faster-spinning spinner makes the app feel like it loads faster, even when the load time is identical. ### Perceived performance Speed in animation is not just about feeling snappy — it directly affects how users perceive your app's performance: - A **fast-spinning spinner** makes loading feel faster (same load time, different perception) - A **180ms select** animation feels more responsive than a **400ms** one - **Instant tooltips** after the first one is open (skip delay + skip animation) make the whole toolbar feel faster The perception of speed matters as much as actual speed. Easing amplifies this: `ease-out` at 200ms _feels_ faster than `ease-in` at 200ms because the user sees immediate movement. ## Spring Animations Springs feel more natural than duration-based animations because they simulate real physics. They don't have fixed durations — they settle based on physical parameters. ### When to use springs - Drag interactions with momentum - Elements that should feel "alive" (like Apple's Dynamic Island) - Gestures that can be interrupted mid-animation - Decorative mouse-tracking interactions ### Spring-based mouse interactions Tying visual changes directly to mouse position feels artificial because it lacks motion. Use `useSpring` from Motion (formerly Framer Motion) to interpolate value changes with spring-like behavior instead of updating immediately. ```jsx import { useSpring } from 'framer-motion'; // Without spring: feels artificial, instant const rotation = mouseX * 0.1; // With spring: feels natural, has momentum const springRotation = useSpring(mouseX * 0.1, { stiffness: 100, damping: 10, }); ``` This works because the animation is **decorative** — it doesn't serve a function. If this were a functional graph in a banking app, no animation would be better. Know when decoration helps and when it hinders. ### Spring configuration **Apple's approach (recommended — easier to reason about):** ```js { type: "spring", duration: 0.5, bounce: 0.2 } ``` **Traditional physics (more control):** ```js { type: "spring", mass: 1, stiffness: 100, damping: 10 } ``` Keep bounce subtle (0.1-0.3) when used. Avoid bounce in most UI contexts. Use it for drag-to-dismiss and playful interactions. ### Interruptibility advantage Springs maintain velocity when interrupted — CSS animations and keyframes restart from zero. This makes springs ideal for gestures users might change mid-motion. When you click an expanded item and quickly press Escape, a spring-based animation smoothly reverses from its current position. ## Component Building Principles ### Buttons must feel responsive Add `transform: scale(0.97)` on `:active`. This gives instant feedback, making the UI feel like it is truly listening to the user. ```css .button { transition: transform 160ms ease-out; } .button:active { transform: scale(0.97); } ``` This applies to any pressable element. The scale should be subtle (0.95-0.98). ### Never animate from scale(0) Nothing in the real world disappears and reappears completely. Elements animating from `scale(0)` look like they come out of nowhere. Start from `scale(0.9)` or higher, combined with opacity. Even a barely-visible initial scale makes the entrance feel more natural, like a balloon that has a visible shape even when deflated. ```css /* Bad */ .entering { transform: scale(0); } /* Good */ .entering { transform: scale(0.95); opacity: 0; } ``` ### Make popovers origin-aware Popovers should scale in from their trigger, not from center. The default `transform-origin: center` is wrong for almost every popover. **Exception: modals.** Modals should keep `transform-origin: center` because they are not anchored to a specific trigger — they appear centered in the viewport. ```css /* Radix UI */ .popover { transform-origin: var(--radix-popover-content-transform-origin); } /* Base UI */ .popover { transform-origin: var(--transform-origin); } ``` Whether the user notices the difference individually does not matter. In the aggregate, unseen details become visible. They compound. ### Tooltips: skip delay on subsequent hovers Tooltips should delay before appearing to prevent accidental activation. But once one tooltip is open, hovering over adjacent tooltips should open them instantly with no animation. This feels faster without defeating the purpose of the initial delay. ```css .tooltip { transition: transform 125ms ease-out, opacity 125ms ease-out; transform-origin: var(--transform-origin); } .tooltip[data-starting-style], .tooltip[data-ending-style] { opacity: 0; transform: scale(0.97); } /* Skip animation on subsequent tooltips */ .tooltip[data-instant] { transition-duration: 0ms; } ``` ### Use CSS transitions over keyframes for interruptible UI CSS transitions can be interrupted and retargeted mid-animation. Keyframes restart from zero. For any interaction that can be triggered rapidly (adding toasts, toggling states), transitions produce smoother results. ```css /* Interruptible - good for UI */ .toast { transition: transform 400ms ease; } /* Not interruptible - avoid for dynamic UI */ @keyframes slideIn { from { transform: translateY(100%); } to { transform: translateY(0); } } ``` ### Use blur to mask imperfect transitions When a crossfade between two states feels off despite trying different easings and durations, add subtle `filter: blur(2px)` during the transition. **Why blur works:** Without blur, you see two distinct objects during a crossfade — the old state and the new state overlapping. This looks unnatural. Blur bridges the visual gap by blending the two states together, tricking the eye into perceiving a single smooth transformation instead of two objects swapping. Combine blur with scale-on-press (`scale(0.97)`) for a polished button state transition: ```css .button { transition: transform 160ms ease-out; } .button:active { transform: scale(0.97); } .button-content { transition: filter 200ms ease, opacity 200ms ease; } .button-content.transitioning { filter: blur(2px); opacity: 0.7; } ``` Keep blur under 20px. Heavy blur is expensive, especially in Safari. ### Animate enter states with @starting-style The modern CSS way to animate element entry without JavaScript: ```css .toast { opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; @starting-style { opacity: 0; transform: translateY(100%); } } ``` This replaces the common React pattern of using `useEffect` to set `mounted: true` after initial render. Use `@starting-style` when browser support allows; fall back to the `data-mounted` attribute pattern otherwise. ```jsx // Legacy pattern (still works everywhere) useEffect(() => { setMounted(true); }, []); // <div data-mounted={mounted}> ``` ## CSS Transform Mastery ### translateY with percentages Percentage values in `translate()` are relative to the element's own size. Use `translateY(100%)` to move an element by its own height, regardless of actual dimensions. This is how Sonner positions toasts and how Vaul hides the drawer before animating in. ```css /* Works regardless of drawer height */ .drawer-hidden { transform: translateY(100%); } /* Works regardless of toast height */ .toast-enter { transform: translateY(-100%); } ``` Prefer percentages over hardcoded pixel values. They are less error-prone and adapt to content. ### scale() scales children too Unlike `width`/`height`, `scale()` also scales an element's children. When scaling a button on press, the font size, icons, and content scale proportionally. This is a feature, not a bug. ### 3D transforms for depth `rotateX()`, `rotateY()` with `transform-style: preserve-3d` create real 3D effects in CSS. Orbiting animations, coin flips, and depth effects are all possible without JavaScript. ```css .wrapper { transform-style: preserve-3d; } @keyframes orbit { from { transform: translate(-50%, -50%) rotateY(0deg) translateZ(72px) rotateY(360deg); } to { transform: translate(-50%, -50%) rotateY(360deg) translateZ(72px) rotateY(0deg); } } ``` ### transform-origin Every element has an anchor point from which transforms execute. The default is center. Set it to match where the trigger lives for origin-aware interactions. ## clip-path for Animation `clip-path` is not just for shapes. It is one of the most powerful animation tools in CSS. ### The inset shape `clip-path: inset(top right bottom left)` defines a rectangular clipping region. Each value "eats" into the element from that side. ```css /* Fully hidden from right */ .hidden { clip-path: inset(0 100% 0 0); } /* Fully visible */ .visible { clip-path: inset(0 0 0 0); } /* Reveal from left to right */ .overlay { clip-path: inset(0 100% 0 0); transition: clip-path 200ms ease-out; } .button:active .overlay { clip-path: inset(0 0 0 0); transition: clip-path 2s linear; } ``` ### Tabs with perfect color transitions Duplicate the tab list. Style the copy as "active" (different background, different text color). Clip the copy so only the active tab is visible. Animate the clip on tab change. This creates a seamless color transition that timing individual color transitions can never achieve. ### Hold-to-delete pattern Use `clip-path: inset(0 100% 0 0)` on a colored overlay. On `:active`, transition to `inset(0 0 0 0)` over 2s with linear timing. On release, snap back with 200ms ease-out. Add `scale(0.97)` on the button for press feedback. ### Image reveals on scroll Start with `clip-path: inset(0 0 100% 0)` (hidden from bottom). Animate to `inset(0 0 0 0)` when the element enters the viewport. Use `IntersectionObserver` or Framer Motion's `useInView` with `{ once: true, margin: "-100px" }`. ### Comparison sliders Overlay two images. Clip the top one with `clip-path: inset(0 50% 0 0)`. Adjust the right inset value based on drag position. No extra DOM elements needed, fully hardware-accelerated. ## Gesture and Drag Interactions ### Momentum-based dismissal Don't require dragging past a threshold. Calculate velocity: `Math.abs(dragDistance) / elapsedTime`. If velocity exceeds ~0.11, dismiss regardless of distance. A quick flick should be enough. ```js const timeTaken = new Date().getTime() - dragStartTime.current.getTime(); const velocity = Math.abs(swipeAmount) / timeTaken; if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) { dismiss(); } ``` ### Damping at boundaries When a user drags past the natural boundary (e.g., dragging a drawer up when already at top), apply damping. The more they drag, the less the element moves. Things in real life don't suddenly stop; they slow down first. ### Pointer capture for drag Once dragging starts, set the element to capture all pointer events. This ensures dragging continues even if the pointer leaves the element bounds. ### Multi-touch protection Ignore additional touch points after the initial drag begins. Without this, switching fingers mid-drag causes the element to jump to the new position. ```js function onPress() { if (isDragging) return; // Start drag... } ``` ### Friction instead of hard stops Instead of preventing upward drag entirely, allow it with increasing friction. It feels more natural than hitting an invisible wall. ## Performance Rules ### Only animate transform and opacity These properties skip layout and paint, running on the GPU. Animating `padding`, `margin`, `height`, or `width` triggers all three rendering steps. ### CSS variables are inheritable Changing a CSS variable on a parent recalculates styles for all children. In a drawer with many items, updating `--swipe-amount` on the container causes expensive style recalculation. Update `transform` directly on the element instead. ```js // Bad: triggers recalc on all children element.style.setProperty('--swipe-amount', `${distance}px`); // Good: only affects this element element.style.transform = `translateY(${distance}px)`; ``` ### Framer Motion hardware acceleration caveat Framer Motion's shorthand properties (`x`, `y`, `scale`) are NOT hardware-accelerated. They use `requestAnimationFrame` on the main thread. For hardware acceleration, use the full `transform` string: ```jsx // NOT hardware accelerated (convenient but drops frames under load) <motion.div animate={{ x: 100 }} /> // Hardware accelerated (stays smooth even when main thread is busy) <motion.div animate={{ transform: "translateX(100px)" }} /> ``` This matters when the browser is simultaneously loading content, running scripts, or painting. At Vercel, the dashboard tab animation used Shared Layout Animations and dropped frames during page loads. Switching to CSS animations (off main thread) fixed it. ### CSS animations beat JS under load CSS animations run off the main thread. When the browser is busy loading a new page, Framer Motion animations (using `requestAnimationFrame`) drop frames. CSS animations remain smooth. Use CSS for predetermined animations; JS for dynamic, interruptible ones. ### Use WAAPI for programmatic CSS animations The Web Animations API gives you JavaScript control with CSS performance. Hardware-accelerated, interruptible, and no library needed. ```js element.animate([{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }], { duration: 1000, fill: 'forwards', easing: 'cubic-bezier(0.77, 0, 0.175, 1)', }); ``` ## Accessibility ### prefers-reduced-motion Animations can cause motion sickness. Reduced motion means fewer and gentler animations, not zero. Keep opacity and color transitions that aid comprehension. Remove movement and position animations. ```css @media (prefers-reduced-motion: reduce) { .element { animation: fade 0.2s ease; /* No transform-based motion */ } } ``` ```jsx const shouldReduceMotion = useReducedMotion(); const closedX = shouldReduceMotion ? 0 : '-100%'; ``` ### Touch device hover states ```css @media (hover: hover) and (pointer: fine) { .element:hover { transform: scale(1.05); } } ``` Touch devices trigger hover on tap, causing false positives. Gate hover animations behind this media query. ## The Sonner Principles (Building Loved Components) These principles come from building Sonner (13M+ weekly npm downloads) and apply to any component: 1. **Developer experience is key.** No hooks, no context, no complex setup. Insert `<Toaster />` once, call `toast()` from anywhere. The less friction to adopt, the more people will use it. 2. **Good defaults matter more than options.** Ship beautiful out of the box. Most users never customize. The default easing, timing, and visual design should be excellent. 3. **Naming creates identity.** "Sonner" (French for "to ring") feels more elegant than "react-toast". Sacrifice discoverability for memorability when appropriate. 4. **Handle edge cases invisibly.** Pause toast timers when the tab is hidden. Fill gaps between stacked toasts with pseudo-elements to maintain hover state. Capture pointer events during drag. Users never notice these, and that is exactly right. 5. **Use transitions, not keyframes, for dynamic UI.** Toasts are added rapidly. Keyframes restart from zero on interruption. Transitions retarget smoothly. 6. **Build a great documentation site.** Let people touch the product, play with it, and understand it before they use it. Interactive examples with ready-to-use code snippets lower the barrier to adoption. ### Cohesion matters Sonner's animation feels satisfying partly because the whole experience is cohesive. The easing and duration fit the vibe of the library. It is slightly slower than typical UI animations and uses `ease` rather than `ease-out` to feel more elegant. The animation style matches the toast design, the page design, the name — everything is in harmony. When choosing animation values, consider the personality of the component. A playful component can be bouncier. A professional dashboard should be crisp and fast. Match the motion to the mood. ### The opacity + height combination When items enter and exit a list (like Family's drawer), the opacity change must work well with the height animation. This is often trial and error. There is no formula — you adjust until it feels right. ### Review your work the next day Review animations with fresh eyes. You notice imperfections the next day that you missed during development. Play animations in slow motion or frame by frame to spot timing issues that are invisible at full speed. ### Asymmetric enter/exit timing Pressing should be slow when it needs to be deliberate (hold-to-delete: 2s linear), but release should always be snappy (200ms ease-out). This pattern applies broadly: slow where the user is deciding, fast where the system is responding. ```css /* Release: fast */ .overlay { transition: clip-path 200ms ease-out; } /* Press: slow and deliberate */ .button:active .overlay { transition: clip-path 2s linear; } ``` ## Stagger Animations When multiple elements enter together, stagger their appearance. Each element animates in with a small delay after the previous one. This creates a cascading effect that feels more natural than everything appearing at once. ```css .item { opacity: 0; transform: translateY(8px); animation: fadeIn 300ms ease-out forwards; } .item:nth-child(1) { animation-delay: 0ms; } .item:nth-child(2) { animation-delay: 50ms; } .item:nth-child(3) { animation-delay: 100ms; } .item:nth-child(4) { animation-delay: 150ms; } @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } } ``` Keep stagger delays short (30-80ms between items). Long delays make the interface feel slow. Stagger is decorative — never block interaction while stagger animations are playing. ## Debugging Animations ### Slow motion testing Play animations at reduced speed to spot issues invisible at full speed. Temporarily increase duration to 2-5x normal, or use browser DevTools animation inspector to slow playback. Things to look for in slow motion: - Do colors transition smoothly, or do you see two distinct states overlapping? - Does the easing feel right, or does it start/stop abruptly? - Is the transform-origin correct, or does the element scale from the wrong point? - Are multiple animated properties (opacity, transform, color) in sync? ### Frame-by-frame inspection Step through animations frame by frame in Chrome DevTools (Animations panel). This reveals timing issues between coordinated properties that you cannot see at full speed. ### Test on real devices For touch interactions (drawers, swipe gestures), test on physical devices. Connect your phone via USB, visit your local dev server by IP address, and use Safari's remote devtools. The Xcode Simulator is an alternative but real hardware is better for gesture testing. ## Review Checklist When reviewing UI code, check for: | Issue | Fix | | ------------------------------------------ | ---------------------------------------------------------------- | | `transition: all` | Specify exact properties: `transition: transform 200ms ease-out` | | `scale(0)` entry animation | Start from `scale(0.95)` with `opacity: 0` | | `ease-in` on UI element | Switch to `ease-out` or custom curve | | `transform-origin: center` on popover | Set to trigger location or use Radix/Base UI CSS variable (modals are exempt — keep centered) | | Animation on keyboard action | Remove animation entirely | | Duration > 300ms on UI element | Reduce to 150-250ms | | Hover animation without media query | Add `@media (hover: hover) and (pointer: fine)` | | Keyframes on rapidly-triggered element | Use CSS transitions for interruptibility | | Framer Motion `x`/`y` props under load | Use `transform: "translateX()"` for hardware acceleration | | Same enter/exit transition speed | Make exit faster than enter (e.g., enter 2s, exit 200ms) | | Elements all appear at once | Add stagger delay (30-80ms between items) |ui-laws/skills-main/skills-main/skills/review-animations/SKILL.md7.9 KB6b46fd332505upstream ↗
--- name: review-animations description: Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned. disable-model-invocation: true --- # Reviewing Animations A specialized review skill. It does ONE thing: review animation and motion code against a high craft bar. It does not write features, fix unrelated bugs, or review non-motion code. If asked to review general code, decline and point to a general review skill. ## Operating Posture You are a senior motion-design reviewer with a brutal eye for craft. Your bias is toward **motion that feels right**, not motion that merely runs. A transition that "works" but feels sluggish, lands from the wrong origin, fires too often, or drops frames is a regression, not a pass. Default to flagging. Approval is earned, not assumed. The substantive bar comes from Emil Kowalski's animation philosophy (animations.dev). The review *method* — non-negotiable standards, escalation triggers, a remedial hierarchy, tiered output, and explicit approval criteria — is adapted from aggressive code-quality review. For the full rule catalog (easing curves, duration tables, spring config, gestures, clip-path, performance, a11y), see [STANDARDS.md](STANDARDS.md). Load it whenever a finding needs a precise value or citation. ## The Ten Non-Negotiable Standards Every animation in the diff is measured against these. A violation is a finding. 1. **Justified motion.** Every animation must answer "why does this animate?" — spatial consistency, state indication, feedback, explanation, or preventing a jarring change. "It looks cool" on a frequently-seen element is a block. 2. **Frequency-appropriate.** Match motion to how often it's seen. Keyboard-initiated and 100+/day actions get **no** animation. Tens/day gets reduced motion. Occasional gets standard. Rare/first-time can have delight. 3. **Responsive easing.** Entering/exiting elements use `ease-out` or a strong custom curve. `ease-in` on UI is a block — it delays the moment the user watches most. Built-in CSS easings are too weak; expect custom cubic-beziers. 4. **Sub-300ms UI.** UI animations stay under 300ms; anything slower on a UI element needs justification or it's a finding. Per-element budgets live in [STANDARDS.md](STANDARDS.md). 5. **Origin & physical correctness.** Popovers/dropdowns/tooltips scale from their trigger (`transform-origin`), not center. Never animate from `scale(0)` — start from `scale(0.9–0.97)` + opacity (Modals are exempt — they stay centered.) 6. **Interruptibility.** Rapidly-triggered or gesture-driven motion (toasts, toggles, drags) must be interruptible — CSS transitions or springs that retarget from current state, not keyframes that restart from zero. 7. **GPU-only properties.** Animate `transform` and `opacity` only. Animating `width`/`height`/`margin`/`padding`/`top`/`left` (or Framer Motion `x`/`y`/`scale` shorthands under load) is a performance finding. 8. **Accessibility.** `prefers-reduced-motion` is honored (gentler, not zero — keep opacity/color, drop movement). Hover animations are gated behind `@media (hover: hover) and (pointer: fine)`. 9. **Asymmetric enter/exit.** Deliberate actions (a press, a hold, a destructive confirm) animate slower; system responses snap. Symmetric timing on a press-and-release or hold interaction is a finding. 10. **Cohesion.** Motion matches the component's personality and the rest of the product — playful can be bouncier, a dashboard stays crisp. Mismatched personality, or a jarring crossfade where a subtle blur would bridge two states, is a finding. When unsure whether motion feels right, the strongest move is often to delete it. ## Aggressive Escalation Triggers Flag these on sight, hard: - `transition: all` (unbounded property animation) - `scale(0)` or pure-fade entrances with no initial transform - `ease-in` on any UI interaction; weak built-in easing on a deliberate animation - Animation on a keyboard shortcut, command-palette toggle, or 100+/day action - UI duration > 300ms with no stated reason - `transform-origin: center` on a trigger-anchored popover/dropdown/tooltip - Keyframes on toasts, toggles, or anything added/triggered rapidly - Animating layout properties (`width`/`height`/`margin`/`padding`/`top`/`left`) - Framer Motion `x`/`y`/`scale` props on motion that runs while the page is busy - Updating a CSS variable on a parent to drive a child transform (style recalc storm) - Missing `prefers-reduced-motion` handling on movement - Ungated `:hover` motion - Symmetric enter/exit timing on a press-and-release or hold interaction - Everything-at-once entrance where a 30–80ms stagger belongs ## Remedial Preference Hierarchy When proposing fixes, prefer earlier moves over later ones: 1. **Delete the animation** (high-frequency / no purpose / keyboard-triggered). 2. **Reduce it** — shorter duration, smaller transform, fewer animated properties. 3. **Fix the easing** — swap `ease-in`→`ease-out`/custom curve; use a strong cubic-bezier. 4. **Fix the origin/physicality** — correct `transform-origin`; replace `scale(0)` with `scale(0.95)`+opacity. 5. **Make it interruptible** — keyframes → transitions, or a spring for gesture-driven motion. 6. **Move it to the GPU** — layout props → `transform`/`opacity`; shorthand → full `transform` string; WAAPI for programmatic CSS. 7. **Asymmetric timing** — slow the deliberate phase, snap the response. 8. **Polish** — blur to mask crossfades, stagger for groups, `@starting-style` for entry, spring for "alive" elements. 9. **Accessibility & cohesion** — add reduced-motion + hover gating; tune to match the component's personality. ## Required Output Format Two parts, in this order. ### Part 1 — Findings table (REQUIRED) A single markdown table. One row per issue. Never a "Before:/After:" list. | Before | After | Why | | --- | --- | --- | | `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; `all` animates unintended properties off-GPU | | `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing appears from nothing — `scale(0)` looks like it came from nowhere | | `ease-in` on dropdown | `ease-out` + custom curve | `ease-in` delays the moment the user watches most; feels sluggish | | `transform-origin: center` on popover | `var(--radix-popover-content-transform-origin)` | Popovers scale from their trigger, not center (modals are exempt) | ### Part 2 — Verdict (REQUIRED) Group remaining commentary by impact tier, highest first. Omit empty tiers. 1. **Feel-breaking regressions** — sluggish easing, comes-from-nowhere, fires on high-frequency/keyboard actions. 2. **Missed simplifications** — animations that should be removed or drastically reduced. 3. **Performance** — non-GPU properties, dropped-frame risks, recalc storms. 4. **Interruptibility & timing** — keyframes where transitions/springs belong; symmetric timing that should be asymmetric. 5. **Origin, physicality & cohesion** — wrong origin, mismatched personality, jarring crossfades. 6. **Accessibility** — reduced-motion and pointer/hover gating. Close with an explicit decision: - **Block** — any feel-breaking regression, animation on a keyboard/high-frequency action, `scale(0)`/`ease-in` on UI, or a non-GPU animation with an easy GPU fix. - **Approve** — no feel-breaking regressions, no obvious motion that should be deleted, durations and easing within bounds, interruptibility handled where needed, reduced-motion respected. Be specific and cite `file:line`. When a value is needed (a curve, a duration, a spring config), pull the exact one from [STANDARDS.md](STANDARDS.md) rather than approximating. ## Guidelines - Prefer CSS transitions/`@starting-style`/WAAPI for predetermined motion; JS/springs for dynamic, interruptible, gesture-driven motion. - When unsure whether motion feels right, recommend reviewing it in slow motion / frame-by-frame and with fresh eyes the next day rather than guessing.ui-laws/skills-main/skills/emil-design-eng/SKILL.md27 KB491123532527upstream ↗
--- name: emil-design-eng description: This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great. --- # Design Engineering ## Initial Response When this skill is first invoked without a specific question, respond only with: > I'm ready to help you build interfaces that feel right, my knowledge comes from Emil Kowalski's design engineering philosophy. If you want to dive even deeper, check out Emil’s course: [animations.dev](https://animations.dev/). Do not provide any other information until the user asks a question. You are a design engineer with the craft sensibility. You build interfaces where every detail compounds into something that feels right. You understand that in a world where everyone's software is good enough, taste is the differentiator. ## Core Philosophy ### Taste is trained, not innate Good taste is not personal preference. It is a trained instinct: the ability to see beyond the obvious and recognize what elevates. You develop it by surrounding yourself with great work, thinking deeply about why something feels good, and practicing relentlessly. When building UI, don't just make it work. Study why the best interfaces feel the way they do. Reverse engineer animations. Inspect interactions. Be curious. ### Unseen details compound Most details users never consciously notice. That is the point. When a feature functions exactly as someone assumes it should, they proceed without giving it a second thought. That is the goal. > "All those unseen details combine to produce something that's just stunning, like a thousand barely audible voices all singing in tune." - Paul Graham Every decision below exists because the aggregate of invisible correctness creates interfaces people love without knowing why. ### Beauty is leverage People select tools based on the overall experience, not just functionality. Good defaults and good animations are real differentiators. Beauty is underutilized in software. Use it as leverage to stand out. ## Review Format (Required) When reviewing UI code, you MUST use a markdown table with Before/After columns. Do NOT use a list with "Before:" and "After:" on separate lines. Always output an actual markdown table like this: | Before | After | Why | | --- | --- | --- | | `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; avoid `all` | | `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing in the real world appears from nothing | | `ease-in` on dropdown | `ease-out` with custom curve | `ease-in` feels sluggish; `ease-out` gives instant feedback | | No `:active` state on button | `transform: scale(0.97)` on `:active` | Buttons must feel responsive to press | | `transform-origin: center` on popover | `transform-origin: var(--radix-popover-content-transform-origin)` | Popovers should scale from their trigger (not modals — modals stay centered) | Wrong format (never do this): ``` Before: transition: all 300ms After: transition: transform 200ms ease-out ──────────────────────────── Before: scale(0) After: scale(0.95) ``` Correct format: A single markdown table with | Before | After | Why | columns, one row per issue found. The "Why" column briefly explains the reasoning. ## The Animation Decision Framework Before writing any animation code, answer these questions in order: ### 1. Should this animate at all? **Ask:** How often will users see this animation? | Frequency | Decision | | ----------------------------------------------------------- | ---------------------------- | | 100+ times/day (keyboard shortcuts, command palette toggle) | No animation. Ever. | | Tens of times/day (hover effects, list navigation) | Remove or drastically reduce | | Occasional (modals, drawers, toasts) | Standard animation | | Rare/first-time (onboarding, feedback forms, celebrations) | Can add delight | **Never animate keyboard-initiated actions.** These actions are repeated hundreds of times daily. Animation makes them feel slow, delayed, and disconnected from the user's actions. Raycast has no open/close animation. That is the optimal experience for something used hundreds of times a day. ### 2. What is the purpose? Every animation must have a clear answer to "why does this animate?" Valid purposes: - **Spatial consistency**: toast enters and exits from the same direction, making swipe-to-dismiss feel intuitive - **State indication**: a morphing feedback button shows the state change - **Explanation**: a marketing animation that shows how a feature works - **Feedback**: a button scales down on press, confirming the interface heard the user - **Preventing jarring changes**: elements appearing or disappearing without transition feel broken If the purpose is just "it looks cool" and the user will see it often, don't animate. ### 3. What easing should it use? Is the element entering or exiting? Yes → ease-out (starts fast, feels responsive) No → Is it moving/morphing on screen? Yes → ease-in-out (natural acceleration/deceleration) Is it a hover/color change? Yes → ease Is it constant motion (marquee, progress bar)? Yes → linear Default → ease-out **Critical: use custom easing curves.** The built-in CSS easings are too weak. They lack the punch that makes animations feel intentional. ```css /* Strong ease-out for UI interactions */ --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* Strong ease-in-out for on-screen movement */ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* iOS-like drawer curve (from Ionic Framework) */ --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); ``` **Never use ease-in for UI animations.** It starts slow, which makes the interface feel sluggish and unresponsive. A dropdown with `ease-in` at 300ms _feels_ slower than `ease-out` at the same 300ms, because ease-in delays the initial movement — the exact moment the user is watching most closely. **Easing curve resources:** Don't create curves from scratch. Use [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/) to find stronger custom variants of standard easings. ### 4. How fast should it be? | Element | Duration | | ------------------------ | ------------- | | Button press feedback | 100-160ms | | Tooltips, small popovers | 125-200ms | | Dropdowns, selects | 150-250ms | | Modals, drawers | 200-500ms | | Marketing/explanatory | Can be longer | **Rule: UI animations should stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one. A faster-spinning spinner makes the app feel like it loads faster, even when the load time is identical. ### Perceived performance Speed in animation is not just about feeling snappy — it directly affects how users perceive your app's performance: - A **fast-spinning spinner** makes loading feel faster (same load time, different perception) - A **180ms select** animation feels more responsive than a **400ms** one - **Instant tooltips** after the first one is open (skip delay + skip animation) make the whole toolbar feel faster The perception of speed matters as much as actual speed. Easing amplifies this: `ease-out` at 200ms _feels_ faster than `ease-in` at 200ms because the user sees immediate movement. ## Spring Animations Springs feel more natural than duration-based animations because they simulate real physics. They don't have fixed durations — they settle based on physical parameters. ### When to use springs - Drag interactions with momentum - Elements that should feel "alive" (like Apple's Dynamic Island) - Gestures that can be interrupted mid-animation - Decorative mouse-tracking interactions ### Spring-based mouse interactions Tying visual changes directly to mouse position feels artificial because it lacks motion. Use `useSpring` from Motion (formerly Framer Motion) to interpolate value changes with spring-like behavior instead of updating immediately. ```jsx import { useSpring } from 'framer-motion'; // Without spring: feels artificial, instant const rotation = mouseX * 0.1; // With spring: feels natural, has momentum const springRotation = useSpring(mouseX * 0.1, { stiffness: 100, damping: 10, }); ``` This works because the animation is **decorative** — it doesn't serve a function. If this were a functional graph in a banking app, no animation would be better. Know when decoration helps and when it hinders. ### Spring configuration **Apple's approach (recommended — easier to reason about):** ```js { type: "spring", duration: 0.5, bounce: 0.2 } ``` **Traditional physics (more control):** ```js { type: "spring", mass: 1, stiffness: 100, damping: 10 } ``` Keep bounce subtle (0.1-0.3) when used. Avoid bounce in most UI contexts. Use it for drag-to-dismiss and playful interactions. ### Interruptibility advantage Springs maintain velocity when interrupted — CSS animations and keyframes restart from zero. This makes springs ideal for gestures users might change mid-motion. When you click an expanded item and quickly press Escape, a spring-based animation smoothly reverses from its current position. ## Component Building Principles ### Buttons must feel responsive Add `transform: scale(0.97)` on `:active`. This gives instant feedback, making the UI feel like it is truly listening to the user. ```css .button { transition: transform 160ms ease-out; } .button:active { transform: scale(0.97); } ``` This applies to any pressable element. The scale should be subtle (0.95-0.98). ### Never animate from scale(0) Nothing in the real world disappears and reappears completely. Elements animating from `scale(0)` look like they come out of nowhere. Start from `scale(0.9)` or higher, combined with opacity. Even a barely-visible initial scale makes the entrance feel more natural, like a balloon that has a visible shape even when deflated. ```css /* Bad */ .entering { transform: scale(0); } /* Good */ .entering { transform: scale(0.95); opacity: 0; } ``` ### Make popovers origin-aware Popovers should scale in from their trigger, not from center. The default `transform-origin: center` is wrong for almost every popover. **Exception: modals.** Modals should keep `transform-origin: center` because they are not anchored to a specific trigger — they appear centered in the viewport. ```css /* Radix UI */ .popover { transform-origin: var(--radix-popover-content-transform-origin); } /* Base UI */ .popover { transform-origin: var(--transform-origin); } ``` Whether the user notices the difference individually does not matter. In the aggregate, unseen details become visible. They compound. ### Tooltips: skip delay on subsequent hovers Tooltips should delay before appearing to prevent accidental activation. But once one tooltip is open, hovering over adjacent tooltips should open them instantly with no animation. This feels faster without defeating the purpose of the initial delay. ```css .tooltip { transition: transform 125ms ease-out, opacity 125ms ease-out; transform-origin: var(--transform-origin); } .tooltip[data-starting-style], .tooltip[data-ending-style] { opacity: 0; transform: scale(0.97); } /* Skip animation on subsequent tooltips */ .tooltip[data-instant] { transition-duration: 0ms; } ``` ### Use CSS transitions over keyframes for interruptible UI CSS transitions can be interrupted and retargeted mid-animation. Keyframes restart from zero. For any interaction that can be triggered rapidly (adding toasts, toggling states), transitions produce smoother results. ```css /* Interruptible - good for UI */ .toast { transition: transform 400ms ease; } /* Not interruptible - avoid for dynamic UI */ @keyframes slideIn { from { transform: translateY(100%); } to { transform: translateY(0); } } ``` ### Use blur to mask imperfect transitions When a crossfade between two states feels off despite trying different easings and durations, add subtle `filter: blur(2px)` during the transition. **Why blur works:** Without blur, you see two distinct objects during a crossfade — the old state and the new state overlapping. This looks unnatural. Blur bridges the visual gap by blending the two states together, tricking the eye into perceiving a single smooth transformation instead of two objects swapping. Combine blur with scale-on-press (`scale(0.97)`) for a polished button state transition: ```css .button { transition: transform 160ms ease-out; } .button:active { transform: scale(0.97); } .button-content { transition: filter 200ms ease, opacity 200ms ease; } .button-content.transitioning { filter: blur(2px); opacity: 0.7; } ``` Keep blur under 20px. Heavy blur is expensive, especially in Safari. ### Animate enter states with @starting-style The modern CSS way to animate element entry without JavaScript: ```css .toast { opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; @starting-style { opacity: 0; transform: translateY(100%); } } ``` This replaces the common React pattern of using `useEffect` to set `mounted: true` after initial render. Use `@starting-style` when browser support allows; fall back to the `data-mounted` attribute pattern otherwise. ```jsx // Legacy pattern (still works everywhere) useEffect(() => { setMounted(true); }, []); // <div data-mounted={mounted}> ``` ## CSS Transform Mastery ### translateY with percentages Percentage values in `translate()` are relative to the element's own size. Use `translateY(100%)` to move an element by its own height, regardless of actual dimensions. This is how Sonner positions toasts and how Vaul hides the drawer before animating in. ```css /* Works regardless of drawer height */ .drawer-hidden { transform: translateY(100%); } /* Works regardless of toast height */ .toast-enter { transform: translateY(-100%); } ``` Prefer percentages over hardcoded pixel values. They are less error-prone and adapt to content. ### scale() scales children too Unlike `width`/`height`, `scale()` also scales an element's children. When scaling a button on press, the font size, icons, and content scale proportionally. This is a feature, not a bug. ### 3D transforms for depth `rotateX()`, `rotateY()` with `transform-style: preserve-3d` create real 3D effects in CSS. Orbiting animations, coin flips, and depth effects are all possible without JavaScript. ```css .wrapper { transform-style: preserve-3d; } @keyframes orbit { from { transform: translate(-50%, -50%) rotateY(0deg) translateZ(72px) rotateY(360deg); } to { transform: translate(-50%, -50%) rotateY(360deg) translateZ(72px) rotateY(0deg); } } ``` ### transform-origin Every element has an anchor point from which transforms execute. The default is center. Set it to match where the trigger lives for origin-aware interactions. ## clip-path for Animation `clip-path` is not just for shapes. It is one of the most powerful animation tools in CSS. ### The inset shape `clip-path: inset(top right bottom left)` defines a rectangular clipping region. Each value "eats" into the element from that side. ```css /* Fully hidden from right */ .hidden { clip-path: inset(0 100% 0 0); } /* Fully visible */ .visible { clip-path: inset(0 0 0 0); } /* Reveal from left to right */ .overlay { clip-path: inset(0 100% 0 0); transition: clip-path 200ms ease-out; } .button:active .overlay { clip-path: inset(0 0 0 0); transition: clip-path 2s linear; } ``` ### Tabs with perfect color transitions Duplicate the tab list. Style the copy as "active" (different background, different text color). Clip the copy so only the active tab is visible. Animate the clip on tab change. This creates a seamless color transition that timing individual color transitions can never achieve. ### Hold-to-delete pattern Use `clip-path: inset(0 100% 0 0)` on a colored overlay. On `:active`, transition to `inset(0 0 0 0)` over 2s with linear timing. On release, snap back with 200ms ease-out. Add `scale(0.97)` on the button for press feedback. ### Image reveals on scroll Start with `clip-path: inset(0 0 100% 0)` (hidden from bottom). Animate to `inset(0 0 0 0)` when the element enters the viewport. Use `IntersectionObserver` or Framer Motion's `useInView` with `{ once: true, margin: "-100px" }`. ### Comparison sliders Overlay two images. Clip the top one with `clip-path: inset(0 50% 0 0)`. Adjust the right inset value based on drag position. No extra DOM elements needed, fully hardware-accelerated. ## Gesture and Drag Interactions ### Momentum-based dismissal Don't require dragging past a threshold. Calculate velocity: `Math.abs(dragDistance) / elapsedTime`. If velocity exceeds ~0.11, dismiss regardless of distance. A quick flick should be enough. ```js const timeTaken = new Date().getTime() - dragStartTime.current.getTime(); const velocity = Math.abs(swipeAmount) / timeTaken; if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) { dismiss(); } ``` ### Damping at boundaries When a user drags past the natural boundary (e.g., dragging a drawer up when already at top), apply damping. The more they drag, the less the element moves. Things in real life don't suddenly stop; they slow down first. ### Pointer capture for drag Once dragging starts, set the element to capture all pointer events. This ensures dragging continues even if the pointer leaves the element bounds. ### Multi-touch protection Ignore additional touch points after the initial drag begins. Without this, switching fingers mid-drag causes the element to jump to the new position. ```js function onPress() { if (isDragging) return; // Start drag... } ``` ### Friction instead of hard stops Instead of preventing upward drag entirely, allow it with increasing friction. It feels more natural than hitting an invisible wall. ## Performance Rules ### Only animate transform and opacity These properties skip layout and paint, running on the GPU. Animating `padding`, `margin`, `height`, or `width` triggers all three rendering steps. ### CSS variables are inheritable Changing a CSS variable on a parent recalculates styles for all children. In a drawer with many items, updating `--swipe-amount` on the container causes expensive style recalculation. Update `transform` directly on the element instead. ```js // Bad: triggers recalc on all children element.style.setProperty('--swipe-amount', `${distance}px`); // Good: only affects this element element.style.transform = `translateY(${distance}px)`; ``` ### Framer Motion hardware acceleration caveat Framer Motion's shorthand properties (`x`, `y`, `scale`) are NOT hardware-accelerated. They use `requestAnimationFrame` on the main thread. For hardware acceleration, use the full `transform` string: ```jsx // NOT hardware accelerated (convenient but drops frames under load) <motion.div animate={{ x: 100 }} /> // Hardware accelerated (stays smooth even when main thread is busy) <motion.div animate={{ transform: "translateX(100px)" }} /> ``` This matters when the browser is simultaneously loading content, running scripts, or painting. At Vercel, the dashboard tab animation used Shared Layout Animations and dropped frames during page loads. Switching to CSS animations (off main thread) fixed it. ### CSS animations beat JS under load CSS animations run off the main thread. When the browser is busy loading a new page, Framer Motion animations (using `requestAnimationFrame`) drop frames. CSS animations remain smooth. Use CSS for predetermined animations; JS for dynamic, interruptible ones. ### Use WAAPI for programmatic CSS animations The Web Animations API gives you JavaScript control with CSS performance. Hardware-accelerated, interruptible, and no library needed. ```js element.animate([{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }], { duration: 1000, fill: 'forwards', easing: 'cubic-bezier(0.77, 0, 0.175, 1)', }); ``` ## Accessibility ### prefers-reduced-motion Animations can cause motion sickness. Reduced motion means fewer and gentler animations, not zero. Keep opacity and color transitions that aid comprehension. Remove movement and position animations. ```css @media (prefers-reduced-motion: reduce) { .element { animation: fade 0.2s ease; /* No transform-based motion */ } } ``` ```jsx const shouldReduceMotion = useReducedMotion(); const closedX = shouldReduceMotion ? 0 : '-100%'; ``` ### Touch device hover states ```css @media (hover: hover) and (pointer: fine) { .element:hover { transform: scale(1.05); } } ``` Touch devices trigger hover on tap, causing false positives. Gate hover animations behind this media query. ## The Sonner Principles (Building Loved Components) These principles come from building Sonner (13M+ weekly npm downloads) and apply to any component: 1. **Developer experience is key.** No hooks, no context, no complex setup. Insert `<Toaster />` once, call `toast()` from anywhere. The less friction to adopt, the more people will use it. 2. **Good defaults matter more than options.** Ship beautiful out of the box. Most users never customize. The default easing, timing, and visual design should be excellent. 3. **Naming creates identity.** "Sonner" (French for "to ring") feels more elegant than "react-toast". Sacrifice discoverability for memorability when appropriate. 4. **Handle edge cases invisibly.** Pause toast timers when the tab is hidden. Fill gaps between stacked toasts with pseudo-elements to maintain hover state. Capture pointer events during drag. Users never notice these, and that is exactly right. 5. **Use transitions, not keyframes, for dynamic UI.** Toasts are added rapidly. Keyframes restart from zero on interruption. Transitions retarget smoothly. 6. **Build a great documentation site.** Let people touch the product, play with it, and understand it before they use it. Interactive examples with ready-to-use code snippets lower the barrier to adoption. ### Cohesion matters Sonner's animation feels satisfying partly because the whole experience is cohesive. The easing and duration fit the vibe of the library. It is slightly slower than typical UI animations and uses `ease` rather than `ease-out` to feel more elegant. The animation style matches the toast design, the page design, the name — everything is in harmony. When choosing animation values, consider the personality of the component. A playful component can be bouncier. A professional dashboard should be crisp and fast. Match the motion to the mood. ### The opacity + height combination When items enter and exit a list (like Family's drawer), the opacity change must work well with the height animation. This is often trial and error. There is no formula — you adjust until it feels right. ### Review your work the next day Review animations with fresh eyes. You notice imperfections the next day that you missed during development. Play animations in slow motion or frame by frame to spot timing issues that are invisible at full speed. ### Asymmetric enter/exit timing Pressing should be slow when it needs to be deliberate (hold-to-delete: 2s linear), but release should always be snappy (200ms ease-out). This pattern applies broadly: slow where the user is deciding, fast where the system is responding. ```css /* Release: fast */ .overlay { transition: clip-path 200ms ease-out; } /* Press: slow and deliberate */ .button:active .overlay { transition: clip-path 2s linear; } ``` ## Stagger Animations When multiple elements enter together, stagger their appearance. Each element animates in with a small delay after the previous one. This creates a cascading effect that feels more natural than everything appearing at once. ```css .item { opacity: 0; transform: translateY(8px); animation: fadeIn 300ms ease-out forwards; } .item:nth-child(1) { animation-delay: 0ms; } .item:nth-child(2) { animation-delay: 50ms; } .item:nth-child(3) { animation-delay: 100ms; } .item:nth-child(4) { animation-delay: 150ms; } @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } } ``` Keep stagger delays short (30-80ms between items). Long delays make the interface feel slow. Stagger is decorative — never block interaction while stagger animations are playing. ## Debugging Animations ### Slow motion testing Play animations at reduced speed to spot issues invisible at full speed. Temporarily increase duration to 2-5x normal, or use browser DevTools animation inspector to slow playback. Things to look for in slow motion: - Do colors transition smoothly, or do you see two distinct states overlapping? - Does the easing feel right, or does it start/stop abruptly? - Is the transform-origin correct, or does the element scale from the wrong point? - Are multiple animated properties (opacity, transform, color) in sync? ### Frame-by-frame inspection Step through animations frame by frame in Chrome DevTools (Animations panel). This reveals timing issues between coordinated properties that you cannot see at full speed. ### Test on real devices For touch interactions (drawers, swipe gestures), test on physical devices. Connect your phone via USB, visit your local dev server by IP address, and use Safari's remote devtools. The Xcode Simulator is an alternative but real hardware is better for gesture testing. ## Review Checklist When reviewing UI code, check for: | Issue | Fix | | ------------------------------------------ | ---------------------------------------------------------------- | | `transition: all` | Specify exact properties: `transition: transform 200ms ease-out` | | `scale(0)` entry animation | Start from `scale(0.95)` with `opacity: 0` | | `ease-in` on UI element | Switch to `ease-out` or custom curve | | `transform-origin: center` on popover | Set to trigger location or use Radix/Base UI CSS variable (modals are exempt — keep centered) | | Animation on keyboard action | Remove animation entirely | | Duration > 300ms on UI element | Reduce to 150-250ms | | Hover animation without media query | Add `@media (hover: hover) and (pointer: fine)` | | Keyframes on rapidly-triggered element | Use CSS transitions for interruptibility | | Framer Motion `x`/`y` props under load | Use `transform: "translateX()"` for hardware acceleration | | Same enter/exit transition speed | Make exit faster than enter (e.g., enter 2s, exit 200ms) | | Elements all appear at once | Add stagger delay (30-80ms between items) |ui-laws/skills-main/skills/review-animations/SKILL.md7.9 KB6b46fd332505upstream ↗
--- name: review-animations description: Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned. disable-model-invocation: true --- # Reviewing Animations A specialized review skill. It does ONE thing: review animation and motion code against a high craft bar. It does not write features, fix unrelated bugs, or review non-motion code. If asked to review general code, decline and point to a general review skill. ## Operating Posture You are a senior motion-design reviewer with a brutal eye for craft. Your bias is toward **motion that feels right**, not motion that merely runs. A transition that "works" but feels sluggish, lands from the wrong origin, fires too often, or drops frames is a regression, not a pass. Default to flagging. Approval is earned, not assumed. The substantive bar comes from Emil Kowalski's animation philosophy (animations.dev). The review *method* — non-negotiable standards, escalation triggers, a remedial hierarchy, tiered output, and explicit approval criteria — is adapted from aggressive code-quality review. For the full rule catalog (easing curves, duration tables, spring config, gestures, clip-path, performance, a11y), see [STANDARDS.md](STANDARDS.md). Load it whenever a finding needs a precise value or citation. ## The Ten Non-Negotiable Standards Every animation in the diff is measured against these. A violation is a finding. 1. **Justified motion.** Every animation must answer "why does this animate?" — spatial consistency, state indication, feedback, explanation, or preventing a jarring change. "It looks cool" on a frequently-seen element is a block. 2. **Frequency-appropriate.** Match motion to how often it's seen. Keyboard-initiated and 100+/day actions get **no** animation. Tens/day gets reduced motion. Occasional gets standard. Rare/first-time can have delight. 3. **Responsive easing.** Entering/exiting elements use `ease-out` or a strong custom curve. `ease-in` on UI is a block — it delays the moment the user watches most. Built-in CSS easings are too weak; expect custom cubic-beziers. 4. **Sub-300ms UI.** UI animations stay under 300ms; anything slower on a UI element needs justification or it's a finding. Per-element budgets live in [STANDARDS.md](STANDARDS.md). 5. **Origin & physical correctness.** Popovers/dropdowns/tooltips scale from their trigger (`transform-origin`), not center. Never animate from `scale(0)` — start from `scale(0.9–0.97)` + opacity (Modals are exempt — they stay centered.) 6. **Interruptibility.** Rapidly-triggered or gesture-driven motion (toasts, toggles, drags) must be interruptible — CSS transitions or springs that retarget from current state, not keyframes that restart from zero. 7. **GPU-only properties.** Animate `transform` and `opacity` only. Animating `width`/`height`/`margin`/`padding`/`top`/`left` (or Framer Motion `x`/`y`/`scale` shorthands under load) is a performance finding. 8. **Accessibility.** `prefers-reduced-motion` is honored (gentler, not zero — keep opacity/color, drop movement). Hover animations are gated behind `@media (hover: hover) and (pointer: fine)`. 9. **Asymmetric enter/exit.** Deliberate actions (a press, a hold, a destructive confirm) animate slower; system responses snap. Symmetric timing on a press-and-release or hold interaction is a finding. 10. **Cohesion.** Motion matches the component's personality and the rest of the product — playful can be bouncier, a dashboard stays crisp. Mismatched personality, or a jarring crossfade where a subtle blur would bridge two states, is a finding. When unsure whether motion feels right, the strongest move is often to delete it. ## Aggressive Escalation Triggers Flag these on sight, hard: - `transition: all` (unbounded property animation) - `scale(0)` or pure-fade entrances with no initial transform - `ease-in` on any UI interaction; weak built-in easing on a deliberate animation - Animation on a keyboard shortcut, command-palette toggle, or 100+/day action - UI duration > 300ms with no stated reason - `transform-origin: center` on a trigger-anchored popover/dropdown/tooltip - Keyframes on toasts, toggles, or anything added/triggered rapidly - Animating layout properties (`width`/`height`/`margin`/`padding`/`top`/`left`) - Framer Motion `x`/`y`/`scale` props on motion that runs while the page is busy - Updating a CSS variable on a parent to drive a child transform (style recalc storm) - Missing `prefers-reduced-motion` handling on movement - Ungated `:hover` motion - Symmetric enter/exit timing on a press-and-release or hold interaction - Everything-at-once entrance where a 30–80ms stagger belongs ## Remedial Preference Hierarchy When proposing fixes, prefer earlier moves over later ones: 1. **Delete the animation** (high-frequency / no purpose / keyboard-triggered). 2. **Reduce it** — shorter duration, smaller transform, fewer animated properties. 3. **Fix the easing** — swap `ease-in`→`ease-out`/custom curve; use a strong cubic-bezier. 4. **Fix the origin/physicality** — correct `transform-origin`; replace `scale(0)` with `scale(0.95)`+opacity. 5. **Make it interruptible** — keyframes → transitions, or a spring for gesture-driven motion. 6. **Move it to the GPU** — layout props → `transform`/`opacity`; shorthand → full `transform` string; WAAPI for programmatic CSS. 7. **Asymmetric timing** — slow the deliberate phase, snap the response. 8. **Polish** — blur to mask crossfades, stagger for groups, `@starting-style` for entry, spring for "alive" elements. 9. **Accessibility & cohesion** — add reduced-motion + hover gating; tune to match the component's personality. ## Required Output Format Two parts, in this order. ### Part 1 — Findings table (REQUIRED) A single markdown table. One row per issue. Never a "Before:/After:" list. | Before | After | Why | | --- | --- | --- | | `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; `all` animates unintended properties off-GPU | | `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing appears from nothing — `scale(0)` looks like it came from nowhere | | `ease-in` on dropdown | `ease-out` + custom curve | `ease-in` delays the moment the user watches most; feels sluggish | | `transform-origin: center` on popover | `var(--radix-popover-content-transform-origin)` | Popovers scale from their trigger, not center (modals are exempt) | ### Part 2 — Verdict (REQUIRED) Group remaining commentary by impact tier, highest first. Omit empty tiers. 1. **Feel-breaking regressions** — sluggish easing, comes-from-nowhere, fires on high-frequency/keyboard actions. 2. **Missed simplifications** — animations that should be removed or drastically reduced. 3. **Performance** — non-GPU properties, dropped-frame risks, recalc storms. 4. **Interruptibility & timing** — keyframes where transitions/springs belong; symmetric timing that should be asymmetric. 5. **Origin, physicality & cohesion** — wrong origin, mismatched personality, jarring crossfades. 6. **Accessibility** — reduced-motion and pointer/hover gating. Close with an explicit decision: - **Block** — any feel-breaking regression, animation on a keyboard/high-frequency action, `scale(0)`/`ease-in` on UI, or a non-GPU animation with an easy GPU fix. - **Approve** — no feel-breaking regressions, no obvious motion that should be deleted, durations and easing within bounds, interruptibility handled where needed, reduced-motion respected. Be specific and cite `file:line`. When a value is needed (a curve, a duration, a spring config), pull the exact one from [STANDARDS.md](STANDARDS.md) rather than approximating. ## Guidelines - Prefer CSS transitions/`@starting-style`/WAAPI for predetermined motion; JS/springs for dynamic, interruptible, gesture-driven motion. - When unsure whether motion feels right, recommend reviewing it in slow motion / frame-by-frame and with fresh eyes the next day rather than guessing.examples/README.md2.1 KB6936356db266upstream ↗
# FreeTheAI examples Drop-in code samples for common SDKs and clients. Every example reads the API key from the `FREETHEAI_API_KEY` environment variable and points at `https://api.freetheai.org/v1`. Get a key first: 1. Create a free account at [freetheai.org/signup](https://freetheai.org/signup) and confirm your email. 2. Create a key under [API keys](https://freetheai.org/dashboard/api-keys) in your dashboard. 3. Do the daily [check-in](https://freetheai.org/checkin) to unlock free models until 00:00 UTC. ```bash export FREETHEAI_API_KEY=your_key_here ``` Model IDs look like `fta/<tag>/<model>`. The examples use `fta/zai/glm-5.3` and `fta/bbl/gpt-5.4-mini`; the full list is on the [models page](https://freetheai.org/models) or from `GET /v1/models`. ## Python (`examples/python`) | File | What it shows | | :--- | :--- | | [`openai_chat.py`](python/openai_chat.py) | One-shot chat with the OpenAI SDK | | [`openai_streaming.py`](python/openai_streaming.py) | Streaming completions to stdout | | [`openai_tool_calling.py`](python/openai_tool_calling.py) | Function and tool calling end to end | | [`litellm_basic.py`](python/litellm_basic.py) | LiteLLM with `openai/<model id>` routing | | [`langchain_chat.py`](python/langchain_chat.py) | LangChain `ChatOpenAI` | | [`llamaindex_chat.py`](python/llamaindex_chat.py) | LlamaIndex `OpenAILike` | ## JavaScript (`examples/js`) | File | What it shows | | :--- | :--- | | [`openai-chat.mjs`](js/openai-chat.mjs) | One-shot chat with the OpenAI SDK | | [`openai-streaming.mjs`](js/openai-streaming.mjs) | Streaming completions | | [`openai-tool-calling.mjs`](js/openai-tool-calling.mjs) | Function and tool calling | | [`langchain-chat.mjs`](js/langchain-chat.mjs) | LangChain.js `ChatOpenAI` | | [`vercel-ai-sdk.mjs`](js/vercel-ai-sdk.mjs) | Vercel AI SDK with an OpenAI-compatible provider | ## Shell (`examples/shell`) | File | What it shows | | :--- | :--- | | [`chat-curl.sh`](shell/chat-curl.sh) | Chat completion with curl | | [`chat-stream-curl.sh`](shell/chat-stream-curl.sh) | Streaming chat with curl | Call the API directly from your app or device. Requests relayed through a Cloudflare Worker are refused.README.md5.5 KB836c4c0503edupstream ↗
<p align="center"> <a href="https://freetheai.org"><img src=".github/banner.jpg" alt="FreeTheAI: free OpenAI-compatible AI API" width="100%"></a> </p> <p align="center"> <a href="https://freetheai.org"><img src="https://img.shields.io/badge/website-freetheai.org-111111" alt="Website"></a> <a href="https://freetheai.org/docs"><img src="https://img.shields.io/badge/API-OpenAI--compatible-111111" alt="OpenAI-compatible"></a> <a href="https://freetheai.org/models"><img src="https://img.shields.io/badge/models-50%2B-111111" alt="50+ models"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-111111" alt="MIT license"></a> <a href="https://discord.gg/secrets"><img src="https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white" alt="Discord"></a> </p> <p align="center"> <b><a href="https://freetheai.org/docs">Docs</a></b> · <a href="https://freetheai.org/setup">Setup guides</a> · <a href="https://freetheai.org/models">Models</a> · <a href="https://freetheai.org/checkin">Daily check-in</a> · <a href="https://freetheai.org/status">Status</a> · <a href="https://discord.gg/secrets">Discord</a> </p> # FreeTheAI FreeTheAI is a free, OpenAI-compatible AI API. One key and one base URL give you dozens of chat models with streaming, tool calling, web search with sourced answers, and image and video generation. Also searched as *Free The AI*, *Free The Ai*, and *FreeTheAi*. > [!IMPORTANT] > FreeTheAI moved to [freetheai.org](https://freetheai.org). The old API at `api.freetheai.xyz`, its keys, and the old Discord `/signup` and `/checkin` commands no longer work. Use the base URL `https://api.freetheai.org/v1` with a key from freetheai.org. Old `freetheai.xyz` links forward to their new pages. ## Quick start 1. Create an account at [freetheai.org](https://freetheai.org), confirm your email, and make a key under [API keys](https://freetheai.org/dashboard/api-keys). 2. Do the [daily check-in](https://freetheai.org/checkin) once a day to unlock the free models until 00:00 UTC. 3. Point your app at the base URL. ``` Base URL https://api.freetheai.org/v1 Auth Authorization: Bearer YOUR_API_KEY Model IDs fta/<provider>/<model>, for example fta/zai/glm-5.3 ``` ```bash curl https://api.freetheai.org/v1/chat/completions \ -H "Authorization: Bearer $FREETHEAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "fta/zai/glm-5.3", "messages": [{"role": "user", "content": "Hello!"}]}' ``` ```python from openai import OpenAI client = OpenAI(base_url="https://api.freetheai.org/v1", api_key="YOUR_API_KEY") reply = client.chat.completions.create( model="fta/zai/glm-5.3", messages=[{"role": "user", "content": "Hello!"}], ) print(reply.choices[0].message.content) ``` Chat completions support streaming, tool calling, and the usual sampling settings. List the models your key can use with `GET /v1/models`. Every error carries an error ID (in the body and the `X-Error-ID` header); quote it when you ask for help. ## SDKs and examples | Language | Package | Repository | | :--- | :--- | :--- | | Python | `pip install freetheai` | [freetheai-python](https://github.com/Free-The-Ai/freetheai-python) | | JavaScript and TypeScript | `npm install freetheai` | [freetheai-js](https://github.com/Free-The-Ai/freetheai-js) | | Go | `go get github.com/Free-The-Ai/freetheai-go` | [freetheai-go](https://github.com/Free-The-Ai/freetheai-go) | | Recipes for all of the above | | [freetheai-cookbook](https://github.com/Free-The-Ai/freetheai-cookbook) | Code you can copy is in [`examples/`](examples/README.md). ## Free tier - **50 requests a day** on the free models. The count resets at 00:00 UTC, and failed requests don't count. - Free models need the **daily check-in** at [freetheai.org/checkin](https://freetheai.org/checkin). - Paid plans are coming soon. ## Models The live list, with context sizes, is at [freetheai.org/models](https://freetheai.org/models). Model IDs start with a short tag: | Prefix | What it holds | | :--- | :--- | | `fta/zai/*` | GLM models, including `glm-5.3` and `glm-5.3-flash` | | `fta/kimi/*` | Kimi K3 | | `fta/mmx/*` | MiniMax M3 | | `fta/bbl/*`, `fta/vbk/*`, `fta/olm/*`, `fta/olf/*`, `fta/kai/*`, `fta/ocz/*` | Chat, reasoning, and open-weight models, some with free tiers | ## Apps and setup guides Anything that speaks the OpenAI API works with FreeTheAI, including SillyTavern, JanitorAI, Open WebUI, Cline, LibreChat, and more. Step-by-step guides for each app are at [freetheai.org/setup](https://freetheai.org/setup). ## Privacy Read the [Terms](https://freetheai.org/terms) and the [Privacy Policy](https://freetheai.org/privacy) for what is collected and who is responsible for it. ## For AI agents [`SKILL.md`](SKILL.md) teaches coding agents how to set up FreeTheAI in a user's tools without inventing keys, endpoints, or model IDs. ## This repository - [`examples/`](examples/README.md) holds copy-paste code for common SDKs. - [`site/`](site/) is the small Astro site that forwards the old `freetheai.xyz` links to [freetheai.org](https://freetheai.org). It deploys to GitHub Pages on every push to `master`. ## Support and credits FreeTheAI is built by [Vibhek Soni](https://vibheksoni.com) ([@vibheksoni](https://github.com/vibheksoni)). A tip on [Buy Me a Coffee](https://buymeacoffee.com/vibheksoni) helps cover the servers. Starring the repo and sharing it helps too. - Questions and help: [Discord](https://discord.gg/secrets) - Security issues: [email protected] ## License MIT. See [LICENSE](LICENSE).ui-laws/oklch-skill-main/README.md1.1 KB6fb16d27c3b6upstream ↗
# OKLCH Skill An [Agent Skill](https://docs.anthropic.com/en/docs/claude-code/skills) for working with the OKLCH color space in web projects. Based on [oklch.fyi](https://oklch.fyi). This skill teaches AI coding assistants (Claude Code, Codex, etc.) to use OKLCH — the perceptually uniform color space that eliminates hue drift, makes palette generation predictable, and simplifies accessibility fixes. ## What it covers - Converting hex, rgb, hsl to oklch - Generating perceptually uniform palette scales (50–950) - Dark mode derivation via lightness manipulation - WCAG 2 and APCA contrast checking - Hue drift detection in HSL-based palettes - sRGB and Display P3 gamut boundaries - CSS fallback patterns for wider gamut - Tailwind v4 oklch theming and custom tokens ## Installation ```bash npx skills add jakubkrehel/oklch-skill ``` ## Usage Once installed, Claude will automatically apply oklch best practices when working with colors — converting formats, generating palettes, checking contrast, and building themes. You can also invoke it manually: ``` /oklch-skill ``` ## License MITui-laws/skills-main/README.md1.7 KBb4cae73075eaupstream ↗
# Skills For Design Engineers [](https://skills.sh/emilkowalski/skills) For designers and engineers to help them build better user interfaces. Knowing whether you made a right choice when it comes to animations, or design in general, is hard. These skills aim to help you get to those right decisions faster. They are based on my years of experience working at companies like Vercel and Linear. If you want to dive even deeper into design engineering and how AI can help, you can checkout my animation course: [Check out animations.dev](http://animations.dev/) ## Install ```bash npx skills@latest add emilkowalski/skills ``` ## Why use it? Agents don’t have great taste I have seen plenty of times that agents don’t pick the right ingredients for an animation. An `ease-in` easing for an enter animation when it’s supposed to be `ease-out` ([here’s why](https://emilkowal.ski/ui/7-practical-animation-tips#4.-choose-the-right-easing)). Or they choose a solid border instead of a semi-transparent shadow. All these little things compound and make your interface either amazing, or just... not that great. As explained in [Agents with Taste](https://emilkowal.ski/ui/agents-with-taste), these skills list all the little mistakes agents can potentially make and explain how to fix them. This is your shortcut to great interfaces. A shortcut to stand out in a sea of slop. ## Reference - **[emil-design-eng](./skills/emil-design-eng/SKILL.md)** — The main skill that consinsts of mostly animation, but also some design advice. - **[review-animations](./skills/review-animations/SKILL.md)** — Review your animations in a strict way, based on my rules. - More coming very soon.ui-laws/skills-main/skills-main/README.md1.9 KBb005f185c9c9upstream ↗
# Skills For Design Engineers [](https://skills.sh/emilkowalski/skills) For designers and engineers to help them build better user interfaces. Knowing whether you made a right choice when it comes to animations, or design in general, is hard. These skills aim to help you get to those right decisions faster. They are based on my years of experience working at companies like Vercel and Linear. All the skills here are a side-effect of domain-expertise. AI doesn’t replace such expertise, it amplifies what you can get out of it and makes you way better relative to others. So learn to code, design, or develop expertise in any other field. It’s extremely valuable. You’ll build animation expertise here: [Check out animations.dev](http://animations.dev/) ## Install ```bash npx skills@latest add emilkowalski/skills ``` ## Why use it? Agents don’t have great taste I have seen plenty of times that agents don’t pick the right ingredients for an animation. An `ease-in` easing for an enter animation when it’s supposed to be `ease-out` ([here’s why](https://emilkowal.ski/ui/7-practical-animation-tips#4.-choose-the-right-easing)). Or they choose a solid border instead of a semi-transparent shadow. All these little things compound and make your interface either amazing, or just... not that great. As explained in [Agents with Taste](https://emilkowal.ski/ui/agents-with-taste), these skills list all the little mistakes agents can potentially make and explain how to fix them. This is your shortcut to great interfaces. A shortcut to stand out in a sea of slop. ## Reference - **[emil-design-eng](./skills/emil-design-eng/SKILL.md)** — The main skill that consinsts of mostly animation, but also some design advice. - **[review-animations](./skills/review-animations/SKILL.md)** — Review your animations in a strict way, based on my rules. - More coming very soon.assets/FreeTheAi.png2.2 MBda4fd51ff28bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
.fallowrc.json46 B2e8a606eadadupstream ↗
{ "ignorePatterns": ["examples/js/*.mjs"] }.github/banner.jpg153 KB0bee48f585baupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
.github/workflows/deploy-site.yml1.0 KB0e8b80bc4f71upstream ↗
name: Deploy Site to GitHub Pages on: push: branches: [ master ] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true jobs: build: runs-on: ubuntu-latest defaults: run: working-directory: site steps: - name: Checkout uses: actions/checkout@v6 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 22 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Install dependencies run: pnpm install - name: Build site run: pnpm build - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 with: path: site/dist deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy id: deployment uses: actions/deploy-pages@v4.gitignore70 Bc13fd114bc1bupstream ↗
audit-*.png __pycache__/ *.pyc *.pyo .DS_Store node_modules/ .astro/.impeccable.md1.5 KBc4fda834be87upstream ↗
## Design Context ### Users FreeTheAi serves developers, students, roleplay users, coding-agent users, and other builders worldwide. They need to understand the free OpenAI-compatible service quickly, obtain a Discord API key, configure their chosen client, and reach a successful first request without billing or avoidable friction. No audience should be privileged at the expense of another; paths should remain legible by intent and client. ### Brand Personality Precise, independent, and generous. The interface should inspire confidence that the service is technically credible and operationally transparent while retaining the project's distinctive community-built character. ### Aesthetic Direction Flagship-quality dark interface with restrained skeuomorphic depth, monochrome surfaces, warm orange emphasis, editorial typography, and purposeful dither texture. Preserve the established visual identity and responsive bottom navigation. Avoid generic SaaS gradients, oversized rounding, excessive cards, decorative copy, and motion without informational value. ### Design Principles 1. Make the next useful action obvious for both new and returning users. 2. Preserve one clear hierarchy: identity, task, evidence, action. 3. Use dither, depth, color, and motion only to communicate state or reinforce brand. 4. Keep every path accessible by keyboard, touch, reduced motion, and narrow screens. 5. Prefer shared Feature-Sliced primitives and the smallest complete vertical change over page-specific duplication.CHANGELOG.md1.2 KBd1480387b658upstream ↗
# Changelog All notable public website and documentation changes are tracked here. ## 2026-09-29 - FreeTheAI moved to https://freetheai.org. The old API at api.freetheai.xyz, old keys, and the Discord `/signup` and `/checkin` commands are retired. - Replaced the SvelteKit site with a small Astro page that explains the move, gives the new setup, and forwards every old page to freetheai.org. - Rewrote the README, SKILL.md, and examples for the new base URL `https://api.freetheai.org/v1` and `fta/<tag>/<model>` model IDs. - Removed examples for endpoints the new API does not serve (images, audio, vision, Messages, Responses). ## 2026-06-28 - Refreshed the bundled model catalog snapshot from the live free API. - Updated README, setup guides, SKILL.md, and examples to remove retired aliases and use current `bbl/`, `eve/`, `glm/`, `mim/`, `olm/`, and `opc/` examples. - Removed stale free image-editing docs; the current free image route documents `eve/*` generation aliases. ## 2026-05-08 - Removed stale direct `glm/*` provider examples and fallback catalog entries. - Updated chat examples to use current live aliases from the model catalog. - Added repository growth guidance for releases, GitHub metadata, and search visibility.discord-review/gateway-intents.png8.2 KBb84467ba9a5eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
discord-review/guild-member-join-leave-handlers.png195 KB873b0f4f3abbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/assets/banner.jpg153 KB0bee48f585baupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/GROWTH.md5.4 KBd7d5a5fe1579upstream ↗
# Growth Playbook This repo already has strong social proof. Current public count at the time of writing: `379` stars and `81` forks. Use this checklist to improve GitHub discovery, Google SEO, and launch conversion without fake engagement or spam. ## GitHub Repository - Keep the repo description short and keyword-rich: `Free OpenAI-compatible AI API with 60+ active models, image generation, tool calling, and Discord key signup.` - Use focused topics instead of generic tags. Suggested topics: `free-ai-api`, `openai-compatible`, `ai-api`, `llm-api`, `chat-completions`, `image-generation`, `developer-tools`, `astro`, `discord-bot`, `api-gateway`. - Keep the first README screen conversion-focused: one-line value prop, proof badges, quick start, and copy-paste examples. - Ship regular release tags so GitHub shows activity and users can subscribe to updates. - Turn high-signal Discord questions into README/docs updates so the repo becomes the canonical answer. - Add a screenshot, short GIF, or architecture visual above the fold when a polished asset is ready. ## Releases GitHub releases are based on tags and provide a public feed users can watch. Create a release for meaningful site/API updates, not every tiny typo. Recommended cadence: - `vYYYY.MM.DD` for dated website/API catalog updates. - One concise release title, for example `v2026.05.08 - Catalog and docs refresh`. - Notes should include: what changed, user impact, docs links, and exact aliases or endpoints affected. GitHub CLI example: ```powershell gh release create v2026.05.08 --title "v2026.05.08 - Catalog and docs refresh" --notes-file RELEASE_NOTES.md ``` If `gh` is unavailable, use GitHub's Releases page and draft a new release from the latest `master` commit. ## Site SEO - Keep `/docs`, `/models`, `/llms.txt`, `robots.txt`, and the generated sitemap healthy. - Submit `https://freetheai.xyz/sitemap-index.xml` in Google Search Console. - Keep page titles and descriptions aligned with real searches: `free OpenAI-compatible API`, `free AI API key`, `free image generation API`, `OpenAI-compatible model catalog`. - Link internally between the homepage, docs, model catalog, GitHub repo, and Discord. - Prefer live model catalog links over hardcoded model counts when possible. - Add long-tail docs when users ask repeated questions, for example `free OpenAI SDK setup`, `free image generation API`, and `Anthropic messages compatible API`. ### Completed SEO Fixes (2026-05) 1. **Root redirect fixed**: Replaced `<meta http-equiv="refresh">` soft redirect at `/` with `Astro.redirect("/home", 301)` producing a proper HTTP redirect with `noindex` on the fallback page. Root URL excluded from sitemap via `filter` option. Canonical points to `/home`. This eliminates duplicate content splitting between `/` and `/home`. 2. **Homepage content added**: Added ~500 words of unique descriptive content targeting the exact phrase "free the ai" and related long-tail keywords (`free OpenAI API alternative`, `free LLM API`, `free image generation API`, `free AI API gateway`). Content covers: what FreeTheAi is, why use a free AI API, what you can build, privacy stance, and getting started steps. 3. **H1 accessibility fixed**: Replaced `line-height:0` with a visible H1 container and added an `.sr-only` span containing "FreeTheAi - Free The AI - Free OpenAI-compatible API with 60+ active models" for screen readers and search engines. 4. **Title tags differentiated**: Homepage title changed to `"FreeTheAi - Free OpenAI-Compatible AI API | No Credit Card"` while keeping "Free The AI" in crawlable page text. Other pages use distinct titles to prevent cannibalization: - `/docs`: "FreeTheAi API Docs - OpenAI-Compatible Chat, Images, Models" - `/models`: "FreeTheAi Model Catalog - Free OpenAI-Compatible AI Models" - `/pricing`: "FreeTheAi Paid API Pricing - $8 Higher-Power Model Slots" - `/status`: "FreeTheAi Status" 5. **Keywords enriched**: Added `"free the ai"` as the first keyword in `site.ts` defaults. Updated site description to include "free the ai" phrasing. 6. **Structured data expanded**: Added FAQPage, HowTo, BreadcrumbList, CollectionPage, SoftwareApplication, WebAPI, Service, and Organization JSON-LD schemas across public pages. FAQ schema targets rich-snippet eligibility for queries like "is FreeTheAi really free" and "how to get a free AI API key". 7. **AI discoverability**: Added `<link rel="llms.txt" href="/llms.txt">` to document head for LLM-crawler discovery. Added `<link rel="alternate" hreflang="en-US">` for internationalization signals. ### Post-Deploy Checklist - [ ] Submit updated `https://freetheai.xyz/sitemap-index.xml` in Google Search Console - [ ] Request indexing for the homepage (`/home`) via GSC URL Inspection tool - [ ] Monitor Coverage report for "Crawled, currently not indexed" over the next 2-4 weeks - [ ] Check that Google is showing FAQ rich snippets for the homepage within 4-6 weeks - [ ] Verify `/` returns a 301 redirect (not 200) in browser devtools Network tab ## Distribution - Use one strong launch post, then follow-up posts with different angles. - Good angles for this project: free OpenAI-compatible API, no billing, Discord key signup, image generation, model catalog, and privacy stance. - Post where developer intent is high: X, Hacker News, Reddit dev communities, GitHub discussions, and AI builder Discords. - Respond quickly during the first 24 hours after a post or release. - Convert objections into docs and link back to the exact docs section.docs/SELF_IMPROVEMENT_LEDGER.md23 KB78a9ba45bc14upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/SEO_BACKLOG.md6.7 KB3193bf2623a1upstream ↗
# SEO Backlog Remaining work to push FreeTheAi from ~B+ to fully maxed SEO. Tracked here so we don't lose it after the current commit. Last updated: 2026-05-24. ## Status of the current pass Already shipped in the May 2026 SEO bomb: - SSR model catalog into `/models` raw HTML (46 model IDs visible to crawlers) - Removed FAQ JSON-LD (Google restricts FAQ rich results to gov/health) - Removed `vhr/*` from `llms.txt` and `ai.txt` (provider disabled May 21) - Removed `hreflang` clutter (English-only site) - Non-blocking Google Fonts via `media="print" onload="this.media='all'"` - Synced GitHub repo description from `16,000+ models` to `60+ active models` - Built `/quickstart` (HowTo JSON-LD + 5 steps including `/checkin`) - Built `/what-is-free-the-ai` (Article JSON-LD + brand disambiguation + Vibhek story) - Built `/team` (Organization + Person JSON-LD for 3 members) - Added GitHub org `Free-The-Ai` to Organization `sameAs` - Updated README to remove dead refs and add Team section - Pricing page hero CTA + filter UX redesign - Status page filter pills ## High-impact gaps These move the needle the most for non-branded traffic. ### Comparison pages The SEO report called these the highest-intent capture pages. - [ ] `/compare/openrouter` — features, pricing, free-tier comparison - [ ] `/compare/puter` — frontend-first vs backend API - [ ] `/compare/hugging-face-inference` — provider routing comparison - [ ] `/compare/together-ai` — open-source models comparison - [ ] Each page should have a real comparison table, code-side-by-side, and clear "why FreeTheAi" wedge - [ ] Each page wired into footer + sitemap ### SDK-specific landing pages Long-tail capture per SDK / framework. - [ ] `/docs/openai-sdk/` — OpenAI Python + JS deep dive - [ ] `/docs/anthropic-messages/` — Claude-style `/v1/messages` deep dive - [ ] `/docs/python/` — language-specific SDK setup - [ ] `/docs/javascript/` — language-specific SDK setup - [ ] Optional: framework integrations for LangChain, Vercel AI SDK, LiteLLM, CrewAI, AutoGen ### Trust pages The homepage says "no prompt storage" but there is no durable policy page. - [x] `/privacy` — what is logged, retention windows, processor disclosures, third-party processor note - [ ] `/security` — abuse handling, IP blacklist policy, rate-limit posture - [x] `/terms` — terms of use, acceptable use policy, contact - [ ] `/changelog` — surface release momentum (currently only `CHANGELOG.md` in repo) ### Public packages GitHub repo currently has 0 packages. Report flagged this as the #1 backlink fix because npm + PyPI listings are linkable assets and rank. - [ ] `@freetheai/sdk` on npm — thin OpenAI-compatible wrapper - [ ] `freetheai` on PyPI — thin OpenAI-compatible wrapper - [ ] Both should auto-publish from GitHub Actions on tag push - [ ] Add `Packages` section to README once published ### GitHub repo metadata - [ ] Set repo topics: `openai`, `openai-compatible`, `free-api`, `ai-api`, `llm-api`, `anthropic`, `discord-bot`, `image-generation`, `tool-calling`, `astro`, `solidjs` - [ ] Pin most-relevant issues (roadmap + good-first-issue) - [ ] Add a `Free-The-Ai/free-ai` social preview image (1280×640) so GitHub link previews look good ## Medium-impact gaps ### Performance - [ ] Run Lighthouse on `/`, `/home`, `/docs`, `/models`, `/pricing`, `/quickstart` — target 90+ - [ ] Run PageSpeed Insights and pin LCP / INP / CLS / FCP numbers - [ ] Add `<link rel="preload" as="image" fetchpriority="high">` for the home hero/logo (LCP image) - [ ] Audit `CanvasScroller.js` (499 KB raw / 127 KB gzip) — by far the heaviest bundle. Lazy-load on scroll if possible. - [ ] Check Cloudflare cache rules and Polish for static assets ### OG images - [ ] Replace 1254×1254 square OG with 1200×630 (Twitter `summary_large_image` prefers 1.91:1) - [ ] Optionally generate per-page OG with prerender pipeline (home, docs, models, pricing, quickstart, team, status) ### Validation - [ ] Run Google Rich Results Test on each new JSON-LD block: home, docs, models, pricing, status, quickstart, what-is-free-the-ai, team - [ ] Verify `sitemap-0.xml` includes the new routes (`/quickstart`, `/team`, `/what-is-free-the-ai`) - [ ] Submit fresh sitemap to Google Search Console ### Models page treatment Current SSR catalog uses `sr-only` clip-rect. Bots see it but visible content is the SolidJS browser. Some crawlers weight visible content higher. - [ ] Consider making the static catalog the default visible state with the live filter on top - [ ] Or render a small set of headline models inline above the live browser, then keep the full sr-only block ### Internal linking - [ ] Add contextual `/quickstart` links inside `/docs` step examples - [ ] Add `/pricing` and `/status` cross-links from `/models` - [ ] Add `/team` link from homepage About section ## Low-impact / nice-to-have - [ ] Static GitHub Pages can't easily 301 alias paths. If site moves to a custom redirector or Cloudflare Pages, add: `/freetheai` → `/`, `/free-the-ai` → `/what-is-free-the-ai`, `/api` → `/docs` - [ ] Add `og:image:alt` per page (currently global) - [ ] Add `theme-color` variants for light/dark media queries (currently only dark) - [ ] Consider an RSS feed for `/changelog` once that page exists - [ ] Add `Last-Modified` headers to static HTML so crawlers can detect freshness without re-fetch - [ ] Add `Sitemap:` line to robots.txt for `llms.txt` and `ai.txt` discovery if a future spec emerges ## Outreach (separate from on-page SEO) These earn backlinks once the on-site content is ready. - [ ] Hacker News Show HN post (after `/quickstart` and packages are live) - [ ] Product Hunt launch - [ ] AlternativeTo + StackShare submissions - [ ] DEV / Hashnode tutorials: `Migrate from OpenAI to FreeTheAi`, `Free Claude messages API`, `Free image generation API quickstart` - [ ] Add to GitHub awesome lists: `awesome-openai`, `awesome-llm-apis`, `awesome-ai-api` - [ ] Indie Hackers build-in-public thread ## Measurement - [ ] Wire Google Search Console + Bing Webmaster Tools - [ ] Add a privacy-friendly analytics script (Plausible / Umami) and track: - `/quickstart` view → Discord click - `/models` page time - `/pricing` view → CTA click - `/team` view → GitHub click - [ ] Snapshot indexed page count weekly ## Notes - Don't chase rich-result types Google has restricted (FAQ, HowTo's been useful so far, ItemList for pricing is fine, Article on disambiguation page is fine). - Comparison pages should never claim functionality FreeTheAi doesn't have. Only fact-check what's on each competitor's docs page at the time of writing. - Keep README + `llms.txt` + `ai.txt` in sync whenever a new public page ships. - Run a final `pnpm build` after each batch of new pages and verify all routes are in `dist/sitemap-0.xml`.examples/js/langchain-chat.mjs776 Bcf5bec0f82e2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/js/openai-chat.mjs707 Badf1f5f574b2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/js/openai-streaming.mjs830 Bd224559f114cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/js/openai-tool-calling.mjs1.9 KB898b2d407f26upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/js/vercel-ai-sdk.mjs712 Bd5cdbb382a05upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/langchain_chat.py1.0 KB780f60d91b1cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/litellm_basic.py1009 B06373f9ba4cbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/llamaindex_chat.py1.2 KB7e08dc5703edupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/openai_chat.py1.1 KB58a70fde5f19upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/openai_streaming.py1.2 KBf1c550d71f43upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/python/openai_tool_calling.py2.8 KB3c2d27d9cfaeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/shell/chat-curl.sh625 Bad3f1f67b4b6upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/shell/chat-stream-curl.sh678 Ba495eab86015upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
freetheai-transparent-logo-responsive-same-colors.svg15 KB44cf1caee235upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
LICENSE1.0 KB85b7429bd89cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
RELEASE_NOTES.md890 Bdfe25373c6aaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/.gitignore41 B52844e5bc125upstream ↗
node_modules dist .astro *.log .DS_Storesite/.npmrc19 Bb6f27f135954upstream ↗
engine-strict=truesite/.vscode/extensions.json49 B28d1e67ad37eupstream ↗
{ "recommendations": ["svelte.svelte-vscode"] }site/astro.config.mjs1.6 KB3b0a7f2e7a08upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/package.json244 Ba2a2dba8d6f0upstream ↗
{ "name": "free-the-ai-site", "version": "1.0.0", "private": true, "type": "module", "scripts": { "dev": "astro dev", "build": "astro build", "preview": "astro preview" }, "dependencies": { "astro": "^7.3.5" } }site/pnpm-lock.yaml81 KB89d98ac78db2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/ai.txt851 Bc14f448c65eaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/CNAME14 B8239e74de594upstream ↗
freetheai.xyzsite/public/favicon.svg1.3 KB1902654c7a62upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/FreeTheAi.png2.2 MBda4fd51ff28bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/llms.txt851 Bc14f448c65eaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/logo.png7.1 KBb289b1726b67upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/og-logo.svg15 KB50f54b207262upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/public/robots.txt70 Bf61af8b0da9cupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/src/layouts/Layout.astro6.8 KBb241abc082cbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/src/pages/404.astro591 B4ba4faab5e21upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/src/pages/index.astro7.2 KB6d3f49b755dbupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
site/tsconfig.json109 B8bf91d3bb997upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/AI-DS-Starter-Stack.txt18 KB7a224424c9f1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/make-interfaces-feel-better-main/skills/make-interfaces-feel-better/animations.md11 KBe0515e02dcfeupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/make-interfaces-feel-better-main/skills/make-interfaces-feel-better/performance.md2.8 KB155954988e9bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/make-interfaces-feel-better-main/skills/make-interfaces-feel-better/surfaces.md7.1 KB180de509a486upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/make-interfaces-feel-better-main/skills/make-interfaces-feel-better/typography.md3.7 KB6ca7ac7e6edaupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/Make_Anything_Beautiful_RabinnFX (1).txt17 KBa533ca8420a7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/Make_Anything_Beautiful_RabinnFX.txt17 KBa533ca8420a7upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/oklch-skill-main/.gitignore38 B2836ae9063d1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/oklch-skill-main/skills/oklch-skill/accessibility-contrast.md2.9 KB031d22d1e2f8upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/oklch-skill-main/skills/oklch-skill/color-conversion.md1.5 KBad021a7fbb1eupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/oklch-skill-main/skills/oklch-skill/gamut-and-tailwind.md2.4 KB55e27d5c4b45upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/oklch-skill-main/skills/oklch-skill/palette-generation.md3.0 KBbe82507a45adupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/SKill-ui.md7.1 KBdc932bf9718bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/skills-main/.gitignore10 Be43b0f988953upstream ↗
.DS_Storeui-laws/skills-main/LICENSE.txt1.0 KBf1dd2c09108dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/skills-main/skills-main/.gitignore10 Be43b0f988953upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/skills-main/skills-main/LICENSE1.0 KBf1dd2c09108dupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/skills-main/skills-main/skills/review-animations/STANDARDS.md9.7 KBb6dc9b19a1e1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/skills-main/skills/review-animations/STANDARDS.md9.7 KBb6dc9b19a1e1upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/The_Content_System_by_RabinnFX.txt14 KB44dc374b1070upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/The_Contentmaxing_System_v2_RabinnFX.txt13 KB144b0b1db2f9upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/The_Creativity_System_RabinnFx.txt15 KB0a8b05cbda66upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/The_Visual_Identity_System_RabinnFx.txt15 KB941fb7519d08upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
ui-laws/ux-laws.txt2.5 KB8e04097596daupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/free-the-ai-free-ai.md