@gallopsystems/agent-skills 1.6.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/kysely-postgres/skills/kysely-postgres/SKILL.md +134 -5
- package/plugins/kysely-postgres/skills/kysely-postgres/references/aggregations.ts +44 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/ctes.ts +44 -1
- package/plugins/kysely-postgres/skills/kysely-postgres/references/expressions.ts +26 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/full-text-search.ts +115 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/joins.ts +52 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/locking.ts +94 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/select-where.ts +59 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/set-operations.ts +97 -0
- package/plugins/kysely-postgres/skills/kysely-postgres/references/window-functions.ts +294 -0
- package/plugins/nuxt-nitro-api/skills/nuxt-nitro-api/SKILL.md +2 -2
- package/plugins/nuxt-nitro-api/skills/nuxt-nitro-api/nitro-tasks.md +1 -1
- package/plugins/nuxt-nitro-api/skills/nuxt-nitro-api/validation.md +23 -6
- package/plugins/tailwind-v4/.claude-plugin/plugin.json +8 -0
- package/plugins/tailwind-v4/skills/tailwind-v4/SKILL.md +133 -0
- package/plugins/tailwind-v4/skills/tailwind-v4/gotchas.md +84 -0
- package/plugins/volt-primevue/skills/volt-primevue/gotchas.md +25 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tailwind-v4
|
|
3
|
+
description: Work effectively with Tailwind CSS v4 (the CSS-first model) in a Nuxt/Vite + PrimeVue/Volt stack. Use when editing Tailwind CSS, configuring @theme/@source/@import, setting up dark mode, defining design tokens, or debugging classes that silently don't apply. Covers the v3→v4 traps an LLM trained on v3 falls into.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tailwind CSS v4
|
|
7
|
+
|
|
8
|
+
Tailwind v4 is **CSS-first**: configuration lives in your CSS file, not a
|
|
9
|
+
`tailwind.config.js`. Most day-to-day utility usage is unchanged and the model is
|
|
10
|
+
already good at it — this skill is about the **v4-specific shifts** and the traps
|
|
11
|
+
that come from a v3-trained prior. When a class "isn't working," the cause is
|
|
12
|
+
almost always one of the gotchas below.
|
|
13
|
+
|
|
14
|
+
## When to use this skill
|
|
15
|
+
|
|
16
|
+
- Editing the Tailwind CSS entry file (`@import`, `@theme`, `@source`, `@custom-variant`)
|
|
17
|
+
- Defining or renaming design tokens / colors
|
|
18
|
+
- Setting up or debugging dark mode
|
|
19
|
+
- A utility class silently renders nothing and you don't know why
|
|
20
|
+
- Migrating or porting v3 code (anything with `tailwind.config.js`, `@tailwind`, `darkMode: 'class'`)
|
|
21
|
+
|
|
22
|
+
## The CSS-first setup (no JS config)
|
|
23
|
+
|
|
24
|
+
There is **no `tailwind.config.js`/`.ts`**. The whole config is in your CSS entry
|
|
25
|
+
(e.g. `app/assets/css/main.css`):
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
@import "tailwindcss"; /* NOT @tailwind base/components/utilities */
|
|
29
|
+
@import "tailwindcss-primeui";
|
|
30
|
+
@source "../../../src/volt"; /* scan sources Tailwind won't auto-detect */
|
|
31
|
+
|
|
32
|
+
@theme {
|
|
33
|
+
--color-surface: #ffffff; /* defines the bg-surface / text-surface utilities */
|
|
34
|
+
--color-fg: #18181b;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Build integration is the **Vite plugin**, not the old Nuxt module or PostCSS:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// nuxt.config.ts / vite.config.ts
|
|
42
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
43
|
+
export default defineNuxtConfig({ vite: { plugins: [tailwindcss()] } });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Do **not** add `@nuxtjs/tailwindcss`, a `postcss.config.js` with `tailwindcss: {}`,
|
|
47
|
+
or `@tailwind base/components/utilities` — those are v3 and either no-op or break.
|
|
48
|
+
`tailwindcss` itself must be a direct dependency (alongside `@tailwindcss/vite`),
|
|
49
|
+
or `tailwindcss-primeui` raises peer-dependency warnings.
|
|
50
|
+
|
|
51
|
+
## Design tokens: `@theme` vs `:root`
|
|
52
|
+
|
|
53
|
+
- A custom color token must live in **`@theme`** to generate a utility:
|
|
54
|
+
`@theme { --color-canvas: #fafafa }` → `bg-canvas`/`text-canvas` exist.
|
|
55
|
+
The same variable in `:root` is just a CSS variable — **no utility class**.
|
|
56
|
+
- **The utility name is the full `--color-*` suffix.** `--color-fg-subtle` →
|
|
57
|
+
`text-fg-subtle`. A shortened or undefined name (`text-subtle`, or a dangling
|
|
58
|
+
`bg-surface-strong` with no matching token) **generates nothing, with no error**
|
|
59
|
+
— the element just renders unstyled. First thing to check when a custom color
|
|
60
|
+
"does nothing": does the token name match exactly?
|
|
61
|
+
- **Inverse for PrimeUI:** PrimeVue's `--p-*` variables stay in `:root`. The
|
|
62
|
+
`tailwindcss-primeui` plugin turns those into utilities — don't move them into
|
|
63
|
+
`@theme`.
|
|
64
|
+
|
|
65
|
+
## `@source` — v4 only generates classes from scanned files
|
|
66
|
+
|
|
67
|
+
v4 auto-detects content, but skips files outside the project's default roots (and
|
|
68
|
+
anything gitignored). Classes used **only** inside a vendored/library directory
|
|
69
|
+
(e.g. Volt components in `src/volt`) get purged and silently go missing. Point
|
|
70
|
+
Tailwind at them: `@source "../../../src/volt";`. If a vendored component's
|
|
71
|
+
classes aren't generating, check this line first.
|
|
72
|
+
|
|
73
|
+
## Dark mode
|
|
74
|
+
|
|
75
|
+
v4's `dark:` variant defaults to **`@media (prefers-color-scheme: dark)`** (OS
|
|
76
|
+
preference) — there is no `darkMode: 'class'` config and no `.dark` class by
|
|
77
|
+
default. Two consequences:
|
|
78
|
+
|
|
79
|
+
1. **Prefer semantic tokens over `dark:` pairs.** Writing `bg-white dark:bg-zinc-900`
|
|
80
|
+
on every element means one forgotten half silently breaks dark mode. Instead
|
|
81
|
+
define a token that *flips its value* in one media block, and use it with no
|
|
82
|
+
`dark:`:
|
|
83
|
+
```css
|
|
84
|
+
@theme { --color-surface: #fff; --color-fg: #18181b; }
|
|
85
|
+
@media (prefers-color-scheme: dark) {
|
|
86
|
+
:root { --color-surface: #18181b; --color-fg: #f4f4f5; }
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
```html
|
|
90
|
+
<div class="bg-surface text-fg"><!-- flips automatically, no dark: --></div>
|
|
91
|
+
```
|
|
92
|
+
2. **For a manual (class/toggle) dark mode, you must redefine the variant** —
|
|
93
|
+
`darkMode: 'class'` is gone:
|
|
94
|
+
```css
|
|
95
|
+
@custom-variant dark (&:where(.p-dark, .p-dark *));
|
|
96
|
+
```
|
|
97
|
+
Because the default keys off the OS, a JS toggle must also override the tokens
|
|
98
|
+
(e.g. via a `[data-theme]` block), and any non-CSS consumer of the scheme
|
|
99
|
+
(canvas/chart libs — see gotchas) must be re-notified on toggle.
|
|
100
|
+
|
|
101
|
+
## More gotchas
|
|
102
|
+
|
|
103
|
+
The full set mined from real debugging sessions — `@apply` in scoped `<style>`,
|
|
104
|
+
JS-driven colors that can't read tokens, `@import url()` ordering, the PrimeUI
|
|
105
|
+
surface ramp vs flipping tokens, and more — is in
|
|
106
|
+
[gotchas.md](gotchas.md). Read it when touching CSS in this stack.
|
|
107
|
+
|
|
108
|
+
## Optional tooling
|
|
109
|
+
|
|
110
|
+
The community **[`tailwindcss-mcp-server`](https://github.com/clarity-contrib/tailwindcss-mcp-server)**
|
|
111
|
+
(`npx -y tailwindcss-mcp-server`) exposes utility/color lookup, docs search, and
|
|
112
|
+
CSS→Tailwind conversion, with a `version` param defaulting to `v4`. Useful for
|
|
113
|
+
class discovery, but it does not encode the stack-specific gotchas above.
|
|
114
|
+
|
|
115
|
+
## Related
|
|
116
|
+
|
|
117
|
+
- **PrimeVue/Volt component styling** (`pt:` pass-through, `ptViewMerge`,
|
|
118
|
+
`data-pc-*`, `@apply` + `@reference` in SFC `<style>`, reactive chart palettes):
|
|
119
|
+
see the **volt-primevue** skill — it owns the component layer; this skill owns
|
|
120
|
+
the Tailwind-v4 fundamentals.
|
|
121
|
+
|
|
122
|
+
## Contributing Back
|
|
123
|
+
|
|
124
|
+
This skill grows by capturing what it missed. If you just worked through something
|
|
125
|
+
in this domain that this skill did not cover — an error you had to figure out, a
|
|
126
|
+
behavior that contradicts what is documented above, a workflow knot — ask the
|
|
127
|
+
user: **"Want me to contribute this back to the tailwind-v4 skill?"**
|
|
128
|
+
|
|
129
|
+
If yes, run `/contribute-skill`. If that command is not available, do the
|
|
130
|
+
equivalent inline: distill the generic lesson (placeholders only — no project
|
|
131
|
+
names, IDs, domains, or secrets), then branch or fork
|
|
132
|
+
[gallop-systems/agent-skills](https://github.com/gallop-systems/agent-skills) and
|
|
133
|
+
open a PR editing this skill.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Tailwind v4 Gotchas
|
|
2
|
+
|
|
3
|
+
Mined from real debugging sessions in this stack (Nuxt/Vite + Tailwind v4 +
|
|
4
|
+
PrimeVue/Volt). Each is a place where a class silently did nothing, a v3 habit
|
|
5
|
+
broke, or the fix was non-obvious.
|
|
6
|
+
|
|
7
|
+
## `@apply` of custom tokens in a `<style>` block needs `@reference` to YOUR css
|
|
8
|
+
|
|
9
|
+
In v4, a component-scoped `<style>` doesn't see your Tailwind context. `@apply`
|
|
10
|
+
there needs a `@reference` — and the trap is that `@reference "tailwindcss"` loads
|
|
11
|
+
only the **default** theme, so built-in utilities (`rounded-lg`, `zinc-*`) work
|
|
12
|
+
but your custom `@theme` tokens fail with *"Cannot apply unknown utility class."*
|
|
13
|
+
|
|
14
|
+
```css
|
|
15
|
+
/* ❌ @reference "tailwindcss"; → @apply text-fg fails */
|
|
16
|
+
@reference "../assets/css/main.css"; /* ✅ exposes YOUR tokens; path is relative to the file */
|
|
17
|
+
.prose :where(h2) { @apply text-fg; }
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Better still in scoped styles: skip `@apply` and consume the generated CSS
|
|
21
|
+
variables directly — `color: var(--color-fg)` always works with no `@reference`.
|
|
22
|
+
|
|
23
|
+
Note: a full `yarn build` validates `@apply` in `<style>`; a bare
|
|
24
|
+
`@tailwindcss/cli` compile does **not** — the CLI can pass while the real build
|
|
25
|
+
fails. Include `build` in your check. (The SFC-specific details live in the
|
|
26
|
+
**volt-primevue** skill's gotchas.)
|
|
27
|
+
|
|
28
|
+
## `@import url(...)` must come before `@import "tailwindcss"`
|
|
29
|
+
|
|
30
|
+
The CSS spec requires all `@import` statements to precede other rules. Because
|
|
31
|
+
`@import "tailwindcss"` inlines real rules, any plain `@import url(...)` (e.g.
|
|
32
|
+
Google Fonts) placed after it is invalid and silently dropped.
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter"); /* ✅ first */
|
|
36
|
+
@import "tailwindcss";
|
|
37
|
+
@import "some-lib/dist/style.css";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## JS-set colors can't read `var(--color-*)` — they won't flip with the theme
|
|
41
|
+
|
|
42
|
+
Anything that takes colors as JS values (ApexCharts, canvas, SVG attributes
|
|
43
|
+
written from script) can't use `bg-surface`/`var(--color-fg)` — the value is baked
|
|
44
|
+
at render and won't follow `prefers-color-scheme`. A `colors: ["#18181b"]`
|
|
45
|
+
(near-black) chart line is invisible on dark. Compute a palette from a
|
|
46
|
+
`window.matchMedia("(prefers-color-scheme: dark)")` match and recompute on its
|
|
47
|
+
`change` event. (The volt-primevue skill has the Vue composable version.)
|
|
48
|
+
|
|
49
|
+
## Two surface systems: PrimeUI's ramp is fixed, your `@theme` tokens flip
|
|
50
|
+
|
|
51
|
+
- PrimeUI's `--p-surface-0 … --p-surface-950` ramp is defined **once** and does
|
|
52
|
+
**not** change with the theme. `bg-surface-0` is always white — to go dark you
|
|
53
|
+
need an explicit `dark:bg-surface-900` pair. Vendored Volt components rely on
|
|
54
|
+
this full 0–950 ramp.
|
|
55
|
+
- Your `@theme` semantic tokens (`--color-surface`, `--color-fg`) **flip their
|
|
56
|
+
value** in the dark `@media` block, so `bg-surface` needs no `dark:`.
|
|
57
|
+
|
|
58
|
+
Rule: tokenize only the markup you own (pages, your components). Leave vendored
|
|
59
|
+
Volt components on the `surface-*` ramp + `dark:` pairs so they stay
|
|
60
|
+
upstream-compatible. Mixing the two is what produces white-striped tables on dark.
|
|
61
|
+
|
|
62
|
+
## Don't port a v3 `tailwind.config.js` into a v4 app
|
|
63
|
+
|
|
64
|
+
None of it applies, and some of it actively breaks:
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
// ❌ v3 — delete the whole file in v4
|
|
68
|
+
module.exports = {
|
|
69
|
+
content: ["./**/*.vue"], // → automatic detection (+ @source for out-of-tree)
|
|
70
|
+
darkMode: "class", // → @custom-variant dark (...) in CSS, or rely on @media
|
|
71
|
+
theme: { extend: { colors: {...} } }, // → @theme { --color-* } in CSS
|
|
72
|
+
plugins: [require("...")], // → @plugin / @import in CSS; require() also breaks in ESM
|
|
73
|
+
};
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Also drop the `@nuxtjs/tailwindcss` module — it's v3-era and has been observed to
|
|
77
|
+
trigger an infinite dev-server regeneration loop. Use `@tailwindcss/vite`.
|
|
78
|
+
|
|
79
|
+
## Benign noise
|
|
80
|
+
|
|
81
|
+
Under Yarn (esp. PnP), `@tailwindcss/vite` and `tailwindcss-primeui` may emit
|
|
82
|
+
"doesn't provide vite/tailwindcss" unmet-peer-dependency warnings even though the
|
|
83
|
+
deps resolve transitively. These are safe to ignore — they are not a config bug.
|
|
84
|
+
(Adding `tailwindcss` as a direct dependency silences the `tailwindcss-primeui` one.)
|
|
@@ -106,6 +106,31 @@ section name is prefixed **`pc`** (e.g. a Badge embedded in another component is
|
|
|
106
106
|
<VoltSomething pt:pcBadge:root:class="bg-red-500" />
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
## State styling: use `tailwindcss-primeui`'s `p-*` variants, not edited source
|
|
110
|
+
|
|
111
|
+
`tailwindcss-primeui` registers component-state variants — `p-selected:`,
|
|
112
|
+
`p-focus:`, `p-disabled:`, `p-invalid:`, `p-editable:` — that key off PrimeVue's
|
|
113
|
+
internal state. Reach for these via `pt:` instead of editing vendored component
|
|
114
|
+
source to style a state:
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<VoltSelect pt:option:class="p-selected:bg-highlight p-focus:bg-surface-100" />
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## PrimeIcons `.pi` is `display:inline-block` — it beats `hidden`
|
|
121
|
+
|
|
122
|
+
PrimeIcons sets `display: inline-block` on `.pi`, which has higher specificity
|
|
123
|
+
than Tailwind's `hidden` (`display:none`). Toggling an icon's visibility with bare
|
|
124
|
+
`hidden`/`inline-block` silently fails — the icon stays visible. Use the `!`
|
|
125
|
+
important variant:
|
|
126
|
+
|
|
127
|
+
```vue
|
|
128
|
+
<!-- ❌ stays visible -->
|
|
129
|
+
<i class="pi pi-x hidden sm:inline-block" />
|
|
130
|
+
<!-- ✅ -->
|
|
131
|
+
<i class="pi pi-x !hidden sm:!inline-block" />
|
|
132
|
+
```
|
|
133
|
+
|
|
109
134
|
## We don't use `@primevue/forms`
|
|
110
135
|
|
|
111
136
|
This stack validates with **zod + manual wiring**, not `@primevue/forms`. The
|