[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW37GX8AEKW1NWKNTWRHVC":3,"skill-same:01M7EW37GX8AEKW1NWKNTWRHVC":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EW37GX8AEKW1NWKNTWRHVC","ams-styled-components-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-styled-components-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: styled-components-pro\ndescription: Style React with styled-components: theming, transient props, attrs, SSR, and performance patterns. Use when building component-scoped styles with CSS-in-JS.\ncategory: development\n---\n\n# styled-components Pro\n\nA practical guide to styled-components: component-scoped CSS-in-JS for React — theming, transient props, the `css` helper, SSR, and the performance patterns that keep runtime styling cheap.\n\n## Overview\n\nstyled-components turns CSS into React components: `const Button = styled.button\\`...\\`` generates a class at render time with your styles attached. Styles live with components, props drive variants, and theming flows through React context. The cost is runtime: styles compute in the browser. Used well (static styles, transient props, babel plugin), the cost is small; used carelessly (new components per render, prop-drilling styles), it compounds.\n\n## When to use\n\n- React apps wanting co-located, prop-driven styles.\n- Theming via `ThemeProvider` (light\u002Fdark, brand variants).\n- Migrating from global CSS to component-scoped styles.\n- SSR setups (Next.js pages router, custom SSR) needing critical CSS extraction.\n\n## Core concepts\n\n- **`styled`.** `styled.tag` or `styled(Component)` — template literal CSS, interpolations for props\u002Ftheme. Extending: `styled(Button)` inherits styles.\n- **Transient props (`$`).** `$active` instead of `active` — not forwarded to the DOM, avoiding React unknown-prop warnings and invalid HTML attributes. Default to `$` for styling-only props.\n- **`css` helper.** Share style fragments: `const tone = css\\`color: ...\\`;` then `${tone}` in multiple components. Also powers `createGlobalStyle`.\n- **`attrs`.** Set static attrs\u002Fdefault props: `styled.input.attrs({ type: 'checkbox' })\\`...\\`` — keeps the template focused on styling.\n- **Theming.** `\u003CThemeProvider theme={theme}>` → `${({ theme }) => theme.colors.brand}`. Type the theme (TS declaration merging on `DefaultTheme`) so typos fail at compile time.\n- **`createGlobalStyle`.** Resets, fonts, base styles — rendered once at app root.\n- **Babel plugin.** `babel-plugin-styled-components`: meaningful `displayName`s, minified class names, SSR-friendly IDs. Non-optional in practice.\n\n## Practical workflow\n\n**1. Setup.** Install `styled-components` + babel plugin (in `.babelrc`\u002Fconfig). For SWC: `@swc\u002Fplugin-styled-components`.\n\n**2. Component pattern.**\n```tsx\nimport styled, { css } from 'styled-components';\n\nconst tone = {\n  primary: css`background: ${({ theme }) => theme.colors.brand}; color: white;`,\n  ghost: css`background: transparent; color: ${({ theme }) => theme.colors.brand};`,\n};\n\nexport const Button = styled.button\u003C{ $tone?: keyof typeof tone; $fullWidth?: boolean }>`\n  padding: 0.625rem 1.25rem;\n  border-radius: ${({ theme }) => theme.radii.md};\n  ${({ $tone = 'primary' }) => tone[$tone]}\n  ${({ $fullWidth }) => $fullWidth && 'width: 100%;'}\n  &:disabled { opacity: 0.5; cursor: not-allowed; }\n`;\n```\nTransient props, theme tokens, variant map — no prop leaks to the DOM.\n\n**3. Theme typing.**\n```ts\n\u002F\u002F styled.d.ts\nimport 'styled-components';\ndeclare module 'styled-components' {\n  export interface DefaultTheme { colors: { brand: string; ... }; radii: { md: string } }\n}\n```\n\n**4. SSR.** Collect styles on the server (`ServerStyleSheet` \u002F framework integration) and inject into HTML — otherwise first paint is unstyled. Next.js App Router: use the official registry pattern.\n\n**5. Performance pass.** Define styled components at module level (never inside render — that remounts every render); prefer transient props; keep interpolations simple (avoid creating new objects\u002Ffunctions in interpolations).\n\n## Common pitfalls\n\n- **Defining components inside render.** `function X() { const Box = styled.div...; return \u003CBox\u002F> }` — new component identity every render → remount + style recalculation. Module level, always.\n- **Non-transient styling props.** `active`, `large` forwarded to DOM → React warnings + invalid attributes. `$`-prefix everything styling-only.\n- **Over-interpolation.** Complex logic inside template literals runs per render. Hoist variant maps and helpers out.\n- **Missing babel plugin.** Cryptic class names, no displayNames in DevTools, SSR mismatches. Install and verify it's active.\n- **Theming without types.** Untyped theme = stringly-typed typos discovered at runtime. Declare the module once.\n- **Global styles multiplied.** Rendering `createGlobalStyle` component in multiple places duplicates output. Once, at the root.\n- **Specificity surprises.** `styled(Button)` extension + overrides can create specificity fights. Prefer variant props on one component over deep extension chains.\n- **Runtime cost denial.** Thousands of dynamic styled components on a page has measurable cost. For static marketing pages, consider zero-runtime alternatives; for apps, it's usually fine — measure before rewriting.\n","# styled-components Pro\n\nA practical guide to styled-components: component-scoped CSS-in-JS for React — theming, transient props, the `css` helper, SSR, and the performance patterns that keep runtime styling cheap.\n\n## Overview\n\nstyled-components turns CSS into React components: `const Button = styled.button\\`...\\`` generates a class at render time with your styles attached. Styles live with components, props drive variants, and theming flows through React context. The cost is runtime: styles compute in the browser. Used well (static styles, transient props, babel plugin), the cost is small; used carelessly (new components per render, prop-drilling styles), it compounds.\n\n## When to use\n\n- React apps wanting co-located, prop-driven styles.\n- Theming via `ThemeProvider` (light\u002Fdark, brand variants).\n- Migrating from global CSS to component-scoped styles.\n- SSR setups (Next.js pages router, custom SSR) needing critical CSS extraction.\n\n## Core concepts\n\n- **`styled`.** `styled.tag` or `styled(Component)` — template literal CSS, interpolations for props\u002Ftheme. Extending: `styled(Button)` inherits styles.\n- **Transient props (`$`).** `$active` instead of `active` — not forwarded to the DOM, avoiding React unknown-prop warnings and invalid HTML attributes. Default to `$` for styling-only props.\n- **`css` helper.** Share style fragments: `const tone = css\\`color: ...\\`;` then `${tone}` in multiple components. Also powers `createGlobalStyle`.\n- **`attrs`.** Set static attrs\u002Fdefault props: `styled.input.attrs({ type: 'checkbox' })\\`...\\`` — keeps the template focused on styling.\n- **Theming.** `\u003CThemeProvider theme={theme}>` → `${({ theme }) => theme.colors.brand}`. Type the theme (TS declaration merging on `DefaultTheme`) so typos fail at compile time.\n- **`createGlobalStyle`.** Resets, fonts, base styles — rendered once at app root.\n- **Babel plugin.** `babel-plugin-styled-components`: meaningful `displayName`s, minified class names, SSR-friendly IDs. Non-optional in practice.\n\n## Practical workflow\n\n**1. Setup.** Install `styled-components` + babel plugin (in `.babelrc`\u002Fconfig). For SWC: `@swc\u002Fplugin-styled-components`.\n\n**2. Component pattern.**\n```tsx\nimport styled, { css } from 'styled-components';\n\nconst tone = {\n  primary: css`background: ${({ theme }) => theme.colors.brand}; color: white;`,\n  ghost: css`background: transparent; color: ${({ theme }) => theme.colors.brand};`,\n};\n\nexport const Button = styled.button\u003C{ $tone?: keyof typeof tone; $fullWidth?: boolean }>`\n  padding: 0.625rem 1.25rem;\n  border-radius: ${({ theme }) => theme.radii.md};\n  ${({ $tone = 'primary' }) => tone[$tone]}\n  ${({ $fullWidth }) => $fullWidth && 'width: 100%;'}\n  &:disabled { opacity: 0.5; cursor: not-allowed; }\n`;\n```\nTransient props, theme tokens, variant map — no prop leaks to the DOM.\n\n**3. Theme typing.**\n```ts\n\u002F\u002F styled.d.ts\nimport 'styled-components';\ndeclare module 'styled-components' {\n  export interface DefaultTheme { colors: { brand: string; ... }; radii: { md: string } }\n}\n```\n\n**4. SSR.** Collect styles on the server (`ServerStyleSheet` \u002F framework integration) and inject into HTML — otherwise first paint is unstyled. Next.js App Router: use the official registry pattern.\n\n**5. Performance pass.** Define styled components at module level (never inside render — that remounts every render); prefer transient props; keep interpolations simple (avoid creating new objects\u002Ffunctions in interpolations).\n\n## Common pitfalls\n\n- **Defining components inside render.** `function X() { const Box = styled.div...; return \u003CBox\u002F> }` — new component identity every render → remount + style recalculation. Module level, always.\n- **Non-transient styling props.** `active`, `large` forwarded to DOM → React warnings + invalid attributes. `$`-prefix everything styling-only.\n- **Over-interpolation.** Complex logic inside template literals runs per render. Hoist variant maps and helpers out.\n- **Missing babel plugin.** Cryptic class names, no displayNames in DevTools, SSR mismatches. Install and verify it's active.\n- **Theming without types.** Untyped theme = stringly-typed typos discovered at runtime. Declare the module once.\n- **Global styles multiplied.** Rendering `createGlobalStyle` component in multiple places duplicates output. Once, at the root.\n- **Specificity surprises.** `styled(Button)` extension + overrides can create specificity fights. Prefer variant props on one component over deep extension chains.\n- **Runtime cost denial.** Thousands of dynamic styled components on a page has measurable cost. For static marketing pages, consider zero-runtime alternatives; for apps, it's usually fine — measure before rewriting.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-styled-components-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-styled-components-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-styled-components-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-styled-components-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-styled-components-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]