chore(skills): rewrite agent skill with opinionated guidelines and recipes#6347
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (5)
📝 WalkthroughWalkthroughThis PR modifies documentation and a small Nuxt config: it updates a comment in Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
commit: |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
skills/nuxt-ui/references/layouts/editor.md (1)
108-116:⚠️ Potential issue | 🟠 MajorWire
collapsedthrough sidebar default slot in the editor layout example.This collapsible sidebar example omits the
collapsedslot prop and does not pass:collapsedintoUNavigationMenu, so labels/icons won’t adapt on collapse.Suggested patch
- <template `#default`> + <template `#default`="{ collapsed }"> <UNavigationMenu + :collapsed="collapsed" :items="documents.map(doc => ({ label: doc.title, to: `/editor/${doc.id}`, icon: 'i-lucide-file-text' }))" orientation="vertical" /> </template>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/nuxt-ui/references/layouts/editor.md` around lines 108 - 116, The sidebar default slot needs to accept the collapsed slot prop and forward it into UNavigationMenu so the menu adapts on collapse; update the template default slot definition to destructure the slot prop (e.g., template `#default`="{ collapsed }") and pass the prop into UNavigationMenu (e.g., bind :collapsed="collapsed") while keeping the existing items mapping (documents.map(...)) so labels/icons toggle correctly when collapsed.
🧹 Nitpick comments (2)
skills/nuxt-ui/references/layouts/landing.md (1)
135-142: Addalttext in the variation image examples.These examples are likely to be copied directly; adding
altkeeps them accessibility-safe by default.♿ Suggested patch
<UPageSection title="Feature A" orientation="horizontal"> - <img src="/feature-a.png" /> + <img src="/feature-a.png" alt="Feature A screenshot" /> </UPageSection> <UPageSection title="Feature B" orientation="horizontal" reverse> - <img src="/feature-b.png" /> + <img src="/feature-b.png" alt="Feature B screenshot" /> </UPageSection>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/nuxt-ui/references/layouts/landing.md` around lines 135 - 142, The example image tags in the UPageSection showcase lack alt text which hurts accessibility; update the two <img> elements in the landing.md examples (the ones inside the UPageSection titled "Feature A" and the UPageSection titled "Feature B") to include descriptive alt attributes (e.g., alt="Screenshot of Feature A" and alt="Screenshot of Feature B" or similar meaningful descriptions) so that the examples are accessible by default.skills/nuxt-ui/references/components.md (1)
3-3: Avoid hardcoded component count in the intro sentence.“125+” will go stale quickly; prefer count-free wording (e.g., “Quick-reference index of Nuxt UI components”) or generate the number automatically from source metadata.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/nuxt-ui/references/components.md` at line 3, Replace the hardcoded "125+" count in the intro sentence ("Quick-reference index of all 125+ components.") with count-free wording or a dynamic generation using the existing metadata tools; either change it to a static phrase like "Quick-reference index of Nuxt UI components" or fetch the actual number via the MCP get_component or get_component_metadata tools and inject that value into the sentence at render time so the count never goes stale.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/nuxt-ui/references/guidelines/forms.md`:
- Around line 191-200: The example currently calls form.value?.validate,
form.value?.setErrors, and form.value?.clearErrors at top-level (setup-time);
move these calls into explicit user-driven actions (e.g., button handlers or
helper functions such as onValidateClick, onSetError, onClearErrors) so
validation and error control run only when invoked; update the snippet to show
the handler names (calling form.value?.validate({ name: 'email' }),
form.value?.setErrors([...]), and form.value?.clearErrors()) and wire them to
buttons or event handlers instead of executing them at module/setup
initialization.
In `@skills/nuxt-ui/references/layouts/chat.md`:
- Around line 57-65: The fenced code block showing the component tree
(containing UDashboardPanel, UDashboardNavbar, UContainer, UChatMessages,
UChatReasoning, UChatTool, MDC, UChatPrompt, UChatPromptSubmit) needs a language
specifier to satisfy markdownlint MD040; update the triple-backtick that wraps
the component-tree block to include a language like "text" (e.g., ```text) so
the block becomes a fenced code block with an explicit language.
In `@skills/nuxt-ui/references/layouts/editor.md`:
- Around line 13-20: The fenced code block showing the UEditor component tree is
missing a language tag; update the markdown in layouts/editor.md by adding an
appropriate language identifier (e.g., "text" or "bash" or "text-tree") to the
opening triple-backtick that precedes the UEditor tree so the code fence
includes a language tag and satisfies markdownlint MD040.
In `@skills/nuxt-ui/references/recipes/auth.md`:
- Around line 47-49: The example handler onSubmit should not log full validated
auth payloads (including passwords); locate the onSubmit function and remove or
replace the console.log('Submitted', payload.data) with a non-sensitive action
(e.g., call a submit handler, emit a success event, or log only a non-sensitive
status or masked fields). Also apply the same change to the other instance
around the referenced 114-116 region so no authentication credentials are
printed to the console.
In `@skills/nuxt-ui/references/recipes/data-tables.md`:
- Around line 11-25: The columns example uses typeof data[number] before data is
defined, causing a TS error; fix by declaring the reactive data first (define
data = ref([...]) and/or create a type alias like DataItem = typeof data[number]
after data is declared) and then declare columns: TableColumn<DataItem>[] (or
TableColumn<typeof data[number]>[]) so the type reference resolves; update
references to the symbols data and columns (and TableColumn) accordingly.
In `@skills/nuxt-ui/references/recipes/overlays.md`:
- Around line 153-166: The drawer example uses v-model:open="isOpen" but never
defines isOpen; add a reactive boolean state named isOpen and bind it to
UDrawer. In a <script setup> or component setup() define isOpen (e.g., a
ref(false) or reactive property) and export/use it so the UDrawer v-model:open
works; ensure the symbol name matches exactly (isOpen) and that any toggles or
buttons that should open/close the drawer reference the same isOpen variable.
- Around line 99-112: The Save button bypasses UForm's validation because it
calls onSave via `@click`; remove the `@click` on the UButton labeled "Save" and
make it submit the form instead (set the button's type="submit"). If the footer
slot renders outside the UForm, give the UForm a unique id (e.g., formId) and
set the UButton's form attribute to that id so clicking "Save" triggers the
UForm `@submit`="onSave" and runs validation.
---
Outside diff comments:
In `@skills/nuxt-ui/references/layouts/editor.md`:
- Around line 108-116: The sidebar default slot needs to accept the collapsed
slot prop and forward it into UNavigationMenu so the menu adapts on collapse;
update the template default slot definition to destructure the slot prop (e.g.,
template `#default`="{ collapsed }") and pass the prop into UNavigationMenu (e.g.,
bind :collapsed="collapsed") while keeping the existing items mapping
(documents.map(...)) so labels/icons toggle correctly when collapsed.
---
Nitpick comments:
In `@skills/nuxt-ui/references/components.md`:
- Line 3: Replace the hardcoded "125+" count in the intro sentence
("Quick-reference index of all 125+ components.") with count-free wording or a
dynamic generation using the existing metadata tools; either change it to a
static phrase like "Quick-reference index of Nuxt UI components" or fetch the
actual number via the MCP get_component or get_component_metadata tools and
inject that value into the sentence at render time so the count never goes
stale.
In `@skills/nuxt-ui/references/layouts/landing.md`:
- Around line 135-142: The example image tags in the UPageSection showcase lack
alt text which hurts accessibility; update the two <img> elements in the
landing.md examples (the ones inside the UPageSection titled "Feature A" and the
UPageSection titled "Feature B") to include descriptive alt attributes (e.g.,
alt="Screenshot of Feature A" and alt="Screenshot of Feature B" or similar
meaningful descriptions) so that the examples are accessible by default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2902936b-da33-455b-93e1-8350f9819bb1
📒 Files selected for processing (21)
docs/.env.exampledocs/content/docs/1.getting-started/7.ai/3.skills.mddocs/nuxt.config.tsskills/index.jsonskills/nuxt-ui/SKILL.mdskills/nuxt-ui/references/components.mdskills/nuxt-ui/references/composables.mdskills/nuxt-ui/references/guidelines/component-selection.mdskills/nuxt-ui/references/guidelines/conventions.mdskills/nuxt-ui/references/guidelines/design-system.mdskills/nuxt-ui/references/guidelines/forms.mdskills/nuxt-ui/references/layouts/chat.mdskills/nuxt-ui/references/layouts/dashboard.mdskills/nuxt-ui/references/layouts/docs.mdskills/nuxt-ui/references/layouts/editor.mdskills/nuxt-ui/references/layouts/landing.mdskills/nuxt-ui/references/recipes/auth.mdskills/nuxt-ui/references/recipes/data-tables.mdskills/nuxt-ui/references/recipes/navigation.mdskills/nuxt-ui/references/recipes/overlays.mdskills/nuxt-ui/references/theming.md
💤 Files with no reviewable changes (2)
- skills/nuxt-ui/references/theming.md
- skills/nuxt-ui/references/composables.md
🔗 Linked issue
Related to #6341
❓ Type of change
📚 Description
Rewrites the agent skill from an API reference into an opinionated guide, MCP = facts (props, slots, events). Skill = judgment (when to use what, how to build well).
Also adds
index.jsonmanifest,/.well-known/skills/serving, and alternative install vianpx skills add https://ui.nuxt.com.📝 Checklist