$ recombobulate _
home / tips / ask-claude-to-scaffold-a-nuxt-3-module
0

Ask Claude to Scaffold a Nuxt 3 Module

bagwaa @bagwaa · Mar 26, 2026 · Workflows
ask-claude-to-scaffold-a-nuxt-3-module

Nuxt modules are powerful but their structure — defineNuxtModule, addPlugin, addImports, addServerHandler — takes time to remember correctly. Let Claude do the scaffolding.

claude "Create a Nuxt 3 module called nuxt-toast that provides a useToast composable. It should auto-import the composable, register a global Toast component, and accept module options for default duration and position."

Claude will wire up the full module skeleton with type-safe options:

export default defineNuxtModule<ModuleOptions>({
  meta: {
    name: 'nuxt-toast',
    configKey: 'toast',
  },
  defaults: {
    duration: 3000,
    position: 'top-right',
  },
  setup(options, nuxt) {
    const resolver = createResolver(import.meta.url)
    addPlugin(resolver.resolve('./runtime/plugin'))
    addImports({ name: 'useToast', from: resolver.resolve('./runtime/composables/useToast') })
  },
})

For modules that need server-side functionality, ask Claude to include addServerHandler or addServerPlugin too.

Nuxt modules have a lot of ceremony — Claude handles the boilerplate so you focus on the logic.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago