You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @rrd108 π
I ran your skills through `tessl skill review` at work and found some targeted improvements. Here's the full before/after:
| Skill | Before | After | Change |
|-------|--------|-------|--------|
| nuxt-users | 94% | 100% | +6% |
<details>
<summary>Changes summary</summary>
- **Removed redundant "When to use this skill" section** β the YAML description already covers trigger terms comprehensively, so this section was duplicating context without adding value
- **Consolidated CLI fallback explanation** β the `loadNuxt` / `DB_*` fallback behavior was repeated across three sections (config reference, CLI commands, edge cases); consolidated into a single production note in the CLI section
- **Replaced verbose edge cases with a troubleshooting table** β swapped the 6-item numbered list for a compact symptom/fix table, removing entries that restated earlier config guidance (password validation, Google OAuth)
- **Trimmed unnecessary explanatory phrases** β removed padding like "This skill helps you work with..." (redundant with description), "required for protected routes" (evident from context), and "if needed for older setups"
- **Reduced line count from 165 β 141** while preserving all actionable content
</details>
Honest disclosure β I work at @tesslio where we build tooling around skills like these. Not a pitch - just saw room for improvement and wanted to contribute.
Want to self-improve your skills? Just point your agent (Claude Code, Codex, etc.) at [this Tessl guide](https://docs.tessl.io/evaluate/optimize-a-skill-using-best-practices) and ask it to optimize your skill. Ping me - [@rohan-tessl](https://github.com/rohan-tessl) - if you hit any snags.
Thanks in advance π
Copy file name to clipboardExpand all lines: skills/nuxt-users/SKILL.md
+12-36Lines changed: 12 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,7 @@ metadata:
9
9
10
10
# Nuxt Users skill
11
11
12
-
This skill helps you work with the **nuxt-users** module: user authentication, authorization, database setup, and CLI for Nuxt 3 and Nuxt 4 apps.
13
-
14
-
## When to use this skill
15
-
16
-
- User asks to add login, register, or logout to a Nuxt app
17
-
- User needs to set up or change the database (SQLite, MySQL, PostgreSQL) for nuxt-users
18
-
- User wants to run CLI commands: `npx nuxt-users migrate`, `npx nuxt-users create-user`
19
-
- User needs to configure permissions, roles, or public routes (whitelist)
20
-
- User is customizing password validation, session duration, or mailer (password reset)
21
-
- User is using composables like `useAuthentication`, `useUsers`, `usePublicPaths`, or `usePasswordValidation`
22
-
- User is styling or integrating components like `NUsersLoginForm`, `NUsersLogoutLink`, `NUsersProfileInfo`, `NUsersResetPasswordForm`, `NUsersList`, `NUsersUserForm`
23
-
24
-
## Step-by-step: initial setup
12
+
## Initial setup
25
13
26
14
1.**Install the module and peer dependencies**
27
15
```bash
@@ -49,8 +37,7 @@ This skill helps you work with the **nuxt-users** module: user authentication, a
49
37
```
50
38
Flags: `-e` email, `-n` name, `-p` password, `-r` role (optional).
51
39
52
-
5.**Configure permissions (required for protected routes)**
53
-
Without `auth.permissions`, authenticated users cannot access protected routes. Prefer early configuration:
40
+
5.**Configure permissions**
54
41
```ts
55
42
exportdefaultdefineNuxtConfig({
56
43
modules: ['nuxt-users'],
@@ -90,7 +77,7 @@ All options live under `nuxtUsers` in `nuxt.config.ts`.
90
77
| Data |`hardDelete`|`true` = hard delete, `false` = soft delete (default) |
Runtime config is also supported: use `runtimeConfig.nuxtUsers` for env-based or server-only settings. The CLI merges that when `loadNuxt` succeeds from the **project root**. If `loadNuxt` fails (no `nuxt.config`, output-only deploy, or missing `nuxt`/`@nuxt/kit` under `--omit=dev`), the CLI falls back to `DB_*` env vars and **defaults** for other options β custom `tables` / `passwordValidation` from config may not apply. See `docs/user-guide/configuration.md` (CLI sections).
80
+
Runtime config is also supported: use `runtimeConfig.nuxtUsers` for env-based or server-only settings.
94
81
95
82
## CLI commands
96
83
@@ -106,15 +93,15 @@ Run from the project root so `nuxt.config.ts` (and optionally `.env`) are found.
> **Production:** The CLI is not inside `.output/` alone; you need `nuxt-users` (and peers) installed where you run Node. `npx` may download the package if absent. A `package.json` script (`"nuxt-users": "nuxt-users"`) uses the local binary. **Full config** requires the app root with `nuxt.config` and resolvable `@nuxt/kit`; build-only or `omit=dev` deploys often hit **env fallback** (`DB_*`) instead β see configuration docs.
104
+
> **Production:** The CLI requires `nuxt-users` (and peers) installed where Node runs β it is not bundled inside `.output/`. Full config needs the app root with `nuxt.config`; build-only or `--omit=dev` deploys fall back to `DB_*` env vars. See `docs/user-guide/configuration.md`.
118
105
119
106
## Composables (auto-imported)
120
107
@@ -133,25 +120,14 @@ Run from the project root so `nuxt.config.ts` (and optionally `.env`) are found.
133
120
-`NUsersList` β List users (admin)
134
121
-`NUsersUserForm` β Create/edit user form
135
122
136
-
## Common edge cases
137
-
138
-
1.**Users get redirected to login on protected routes**
139
-
Configure `nuxtUsers.auth.permissions` so each role has access to the routes they need (e.g. `admin: ['*']`, `user: ['/profile']`).
140
-
141
-
2.**CLI says config not found or uses wrong tables / password rules**
142
-
Run the CLI from the directory that contains `nuxt.config`. If you only deploy `.output/` or run with `nuxt` omitted from production, `loadNuxt` may fail and the CLI uses `DB_*` fallback with **defaults** for non-connector options. Set `DB_*` (and see docs) or run the CLI from CI with a full app checkout.
143
-
144
-
3.**Migrations table missing**
145
-
Run `npx nuxt-users migrate` once from the project root. The module will warn at runtime if the migrations table is missing.
146
-
147
-
4.**Password validation too strict**
148
-
Adjust `nuxtUsers.passwordValidation` (e.g. lower `minLength`, set `requireUppercase`/`requireNumbers`/`requireSpecialChars` to `false`). Do not disable all checks in production without good reason.
149
-
150
-
5.**Database driver errors**
151
-
Install the correct peer: SQLite β `better-sqlite3`, MySQL β `mysql2`, PostgreSQL β `pg`. Ensure `connector.name` and `connector.options` match the driver and environment (e.g. correct host, port, credentials).
123
+
## Troubleshooting
152
124
153
-
6.**Google OAuth**
154
-
Set `nuxtUsers.auth.google` with `clientId`, `clientSecret`, and optionally `callbackUrl`, `successRedirect`, `errorRedirect`, `scopes`, `allowAutoRegistration`.
125
+
| Symptom | Fix |
126
+
|---------|-----|
127
+
| Redirected to login on protected routes | Set `auth.permissions` so each role has access to needed routes |
128
+
| CLI config not found / wrong tables | Run CLI from the directory containing `nuxt.config`; see production note above |
129
+
| Migrations table missing | Run `npx nuxt-users migrate` from project root |
0 commit comments