### Fetch Quickstart Guide using WebFetch Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/clerk-setup/SKILL.md Example of using WebFetch to retrieve the official Clerk quickstart documentation for a specific framework. Ensure the framework placeholder is correctly replaced. ```shell WebFetch: https://clerk.com/docs/{framework}/getting-started/quickstart Prompt: "Extract the complete setup instructions including all code snippets, file paths, and configuration steps." ``` -------------------------------- ### Quick Start Miniflare Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/miniflare/README.md A basic example demonstrating how to initialize Miniflare, dispatch a fetch request, and dispose of the instance. This is useful for getting started quickly with testing a simple Worker. ```javascript import { Miniflare } from "miniflare"; const mf = new Miniflare({ modules: true, script: ` export default { async fetch(request, env, ctx) { return new Response("Hello Miniflare!"); } } `, }); const res = await mf.dispatchFetch("http://localhost:8787/"); console.log(await res.text()); // Hello Miniflare! await mf.dispose(); ``` -------------------------------- ### Per-Suite Immutable Setup Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/swift-testing-expert/references/performance-and-best-practices.md Illustrates keeping setup cheap and scoped by using a per-suite immutable setup for shared, read-only data. ```swift import Testing struct CurrencyTests { let rates: [String: Double] init() { rates = ["USD": 1.0, "EUR": 0.92] } @Test func hasEURRate() { #expect(rates["EUR"] != nil) } } ``` -------------------------------- ### Installation Progress Indicators Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Example output showing real-time progress of skill installation with status indicators for pending, installing, successful, and failed operations. ```text ◆ Done! Agents: cursor, universal ◆ Skill 1 ✔ Skill 2 ⠹ Skill 3... ◌ Skill 4 ``` -------------------------------- ### Interactive Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/pipelines/README.md Run this command to start an interactive setup for Cloudflare Pipelines. ```bash npx wrangler pipelines setup ``` -------------------------------- ### Local Development Setup - Dry Run Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Previews the skills that will be installed without actually installing them. ```bash # Preview what will be installed npx autoskills --dry-run ``` -------------------------------- ### Complete Cloudflare WAF Setup Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare-deploy/references/waf/patterns.md This example demonstrates a comprehensive Cloudflare WAF setup by combining custom rules, managed rulesets, and rate limiting in the correct execution order. ```typescript const client = new Cloudflare({ apiToken: process.env.CF_API_TOKEN }); const zoneId = process.env.ZONE_ID; // 1. Custom rules (execute first) await client.rulesets.create({ zone_id: zoneId, phase: 'http_request_firewall_custom', rules: [ { action: 'skip', action_parameters: { phases: ['http_request_firewall_managed', 'http_ratelimit'] }, expression: 'ip.src in {192.0.2.0/24}' }, { action: 'block', expression: 'cf.waf.score gt 50' }, { action: 'managed_challenge', expression: 'cf.waf.score gt 20' }, ], }); // 2. Managed ruleset (execute second) await client.rulesets.create({ zone_id: zoneId, phase: 'http_request_firewall_managed', rules: [{ action: 'execute', action_parameters: { id: 'efb7b8c949ac4650a09736fc376e9aee', overrides: { categories: [{ category: 'wordpress', enabled: false }] } }, expression: 'true', }], }); // 3. Rate limiting (execute third) await client.rulesets.create({ zone_id: zoneId, phase: 'http_ratelimit', rules: [ { action: 'block', expression: 'true', action_parameters: { ratelimit: { characteristics: ['cf.colo.id', 'ip.src'], period: 60, requests_per_period: 100, mitigation_timeout: 600 } } }, { action: 'block', expression: 'http.request.uri.path eq "/api/login"', action_parameters: { ratelimit: { characteristics: ['ip.src'], period: 60, requests_per_period: 5, mitigation_timeout: 600 } } }, ], }); ``` -------------------------------- ### Complete Cloudflare Pipelines Setup Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/pipelines/configuration.md A comprehensive example demonstrating the sequence of commands to set up R2 buckets, streams, sinks, and pipelines, followed by deployment. This covers the end-to-end process for a typical data pipeline. ```bash npx wrangler r2 bucket create my-bucket npx wrangler r2 bucket catalog enable my-bucket npx wrangler pipelines streams create my-stream --schema-file schema.json npx wrangler pipelines sinks create my-sink --type r2-data-catalog --bucket my-bucket ... npx wrangler pipelines create my-pipeline --sql "INSERT INTO my_sink SELECT * FROM my_stream" npx wrangler deploy ``` -------------------------------- ### Explicit Configuration vs. Implicit Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/python-patterns/SKILL.md Illustrates the importance of explicit configuration over implicit side effects. The 'Good' example clearly defines logging settings, while the 'Bad' example hides the setup details. ```python # Good: Explicit configuration import logging logging.basicConfig( level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' ) # Bad: Hidden side effects import some_module some_module.setup() # What does this do? ``` -------------------------------- ### Quick Start Azure Developer CLI Commands Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/azure-deploy/references/sdk/azd-deployment.md A basic workflow for getting started with azd, including authentication, project initialization, and deployment. ```bash azd auth login azd init azd up # provision + build + deploy ``` -------------------------------- ### Correct SFC with ` ``` -------------------------------- ### Dual-Boot Setup for Rails Upgrade Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-upgrade/version-guides/upgrade-7.1-to-7.2.md Initiate the dual-boot setup for a Rails upgrade by checking out a new branch and installing the `next_rails` gem. ```bash git checkout -b rails-72-upgrade # Set up dual-boot gem install next_rails next_rails --init ``` -------------------------------- ### Basic Global Setup Script Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/core/global-setup.md Implement a basic global setup script to perform one-time tasks before tests run. This example shows a simple console log. ```typescript // global-setup.ts import { FullConfig } from "@playwright/test"; async function globalSetup(config: FullConfig) { console.log("Running global setup..."); // Perform one-time setup: start services, run migrations, etc. } export default globalSetup; ``` -------------------------------- ### Quick Start: Create and Develop a Worker Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/workers/README.md Steps to quickly scaffold a new 'hello-world' Cloudflare Worker project and start local development. This is ideal for beginners to get a Worker running locally. ```bash npm create cloudflare@latest my-worker -- --type hello-world cd my-worker npx wrangler dev ``` -------------------------------- ### Initial Server Setup and Deployment Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-guides/references/getting_started.md Run the Kamal setup command to prepare your server and deploy the application for the first time. ```bash $ bin/kamal setup ``` -------------------------------- ### Get shadcn/ui Project Info Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/shadcn/SKILL.md Retrieves the project configuration and installed components in JSON format. Use this to understand the current shadcn/ui setup. ```bash npx shadcn@latest info --json ``` -------------------------------- ### Async Plugin Installation Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/vue-debug-guides/reference/plugin-install-before-mount.md Demonstrates how to handle asynchronous plugin setup before mounting the Vue app, ensuring all async operations complete first. ```typescript import { createApp } from 'vue' import App from './App.vue' import { loadPlugins } from './plugins' async function bootstrap() { const app = createApp(App) // Await async plugin setup const i18nPlugin = await loadI18nMessages() // Install all plugins app.use(i18nPlugin) // Mount after everything is ready app.mount('#app') } bootstrap() ``` -------------------------------- ### Plasmo Quick Start Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/clerk-chrome-extension-patterns/SKILL.md Install necessary packages and configure environment variables for Clerk integration with Plasmo. Ensure Native API is enabled in your Clerk Dashboard. ```bash npx create-plasmo --with-tailwindcss --with-src my-extension cd my-extension npm install @clerk/chrome-extension ``` ```dotenv PLASMO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_... CLERK_FRONTEND_API=https://your-app.clerk.accounts.dev ``` -------------------------------- ### Create and Run an HTTP Server Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/bun/SKILL.md Set up a basic HTTP server using `Bun.serve()`. This example demonstrates a simple server that responds with 'Hello!' on port 3000. ```typescript // server.ts const server = Bun.serve({ port: 3000, fetch(req) { return new Response("Hello!"); }, }); console.log(`Listening on ${server.url}`); ``` ```bash bun run server.ts ``` -------------------------------- ### Complete Cloudflare WAF Setup Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/waf/patterns.md This example demonstrates how to combine custom rules, managed rulesets, and rate limiting for comprehensive WAF protection using the Cloudflare API. It requires Cloudflare API credentials and a Zone ID. ```typescript const client = new Cloudflare({ apiToken: process.env.CF_API_TOKEN }); const zoneId = process.env.ZONE_ID; // 1. Custom rules (execute first) await client.rulesets.create({ zone_id: zoneId, phase: 'http_request_firewall_custom', rules: [ { action: 'skip', action_parameters: { phases: ['http_request_firewall_managed', 'http_ratelimit'] }, expression: 'ip.src in {192.0.2.0/24}' }, { action: 'block', expression: 'cf.waf.score gt 50' }, { action: 'managed_challenge', expression: 'cf.waf.score gt 20' }, ], }); // 2. Managed ruleset (execute second) await client.rulesets.create({ zone_id: zoneId, phase: 'http_request_firewall_managed', rules: [{ action: 'execute', action_parameters: { id: 'efb7b8c949ac4650a09736fc376e9aee', overrides: { categories: [{ category: 'wordpress', enabled: false }] } }, expression: 'true', }], }); // 3. Rate limiting (execute third) await client.rulesets.create({ zone_id: zoneId, phase: 'http_ratelimit', rules: [ { action: 'block', expression: 'true', action_parameters: { ratelimit: { characteristics: ['cf.colo.id', 'ip.src'], period: 60, requests_per_period: 100, mitigation_timeout: 600 } } }, { action: 'block', expression: 'http.request.uri.path eq "/api/login"', action_parameters: { ratelimit: { characteristics: ['ip.src'], period: 60, requests_per_period: 5, mitigation_timeout: 600 } } }, ], }); ``` -------------------------------- ### Prisma Init with an Example Model Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/init.md Initialize a Prisma project and include a starter model in the generated `schema.prisma` file. ```bash prisma init --with-model ``` -------------------------------- ### Install Clerk TanStack React Start Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/clerk-tanstack-patterns/SKILL.md Install the necessary package for Clerk integration with TanStack React Start. ```bash npm install @clerk/tanstack-react-start ``` -------------------------------- ### Get Installed Skill Names from Lock File Source: https://github.com/midudev/autoskills/blob/main/_autodocs/api-reference/detection.md Reads the `skills-lock.json` file to get previously installed skills. Use this to check if specific skills are already present in the project. ```typescript import { getInstalledSkillNames } from 'autoskills/lib.ts'; const installed = getInstalledSkillNames(process.cwd()); if (installed.has('react-best-practices')) { console.log('React skills already installed'); } ``` -------------------------------- ### Complete Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/workers-vpc/api.md Demonstrates how to use the `connect` function to establish a TCP connection, send data, and receive a response, including proper error handling and resource cleanup. ```APIDOC ## Complete Example ```typescript import { connect } from 'cloudflare:sockets'; export default { async fetch(req: Request): Promise { const socket = connect({ hostname: "echo.example.com", port: 7 }, { secureTransport: "on" }); try { await socket.opened; const writer = socket.writable.getWriter(); await writer.write(new TextEncoder().encode("Hello, TCP!\n")); await writer.close(); const reader = socket.readable.getReader(); const { value } = await reader.read(); return new Response(value); } finally { await socket.close(); } } }; ``` ``` -------------------------------- ### Rackup::Server#start Method Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-guides/references/initialization.md Handles the core server startup logic, including loading dependencies, debugging, and running the application. ```ruby module Rackup class Server def start(&block) if options[:warn] $-w = true end if includes = options[:include] $LOAD_PATH.unshift(*includes) end Array(options[:require]).each do |library| require library end if options[:debug] $DEBUG = true require "pp" p options[:server] pp wrapped_app pp app end check_pid! if options[:pid] # Touch the wrapped app, so that the config.ru is loaded before # daemonization (i.e. before chdir, etc). handle_profiling(options[:heapfile], options[:profile_mode], options[:profile_file]) do wrapped_app end daemonize_app if options[:daemonize] write_pid if options[:pid] trap(:INT) do if server.respond_to?(:shutdown) server.shutdown else exit end end server.run(wrapped_app, **options, &block) end end end ``` -------------------------------- ### Install Webpacker Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-upgrade/version-guides/upgrade-5.2-to-6.0.md If you are migrating your JavaScript setup, install Webpacker using the provided Rails generator. ```bash rails webpacker:install ``` -------------------------------- ### Initialize New Project with Framework Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/wrangler/SKILL.md Use create-cloudflare to initialize a new project, often with a framework. ```bash npx create-cloudflare@latest my-app ``` -------------------------------- ### Workflow: Starting from Existing Database Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/db-pull.md Steps to initialize Prisma, configure the database, pull the schema, and generate the client when starting with an existing database. ```bash prisma init ``` ```bash # Configure database URL ``` ```bash prisma db pull ``` ```bash # Review and customize generated schema ``` ```bash prisma generate ``` -------------------------------- ### Start Remotion Studio Preview Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/remotion/SKILL.md Launch the Remotion Studio development server to preview your video compositions. ```bash npx remotion studio ``` -------------------------------- ### Minimal Installation Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Performs a minimal installation by navigating to the project directory and running the autoskills command. ```bash cd my-project npx autoskills # Review detected technologies # Select skills interactively # Install selected skills ``` -------------------------------- ### macOS launchd Service Installation Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/tunnel/patterns.md Commands to install and start the cloudflared service on macOS using launchd. ```bash sudo cloudflared service install sudo launchctl start com.cloudflare.cloudflared ``` -------------------------------- ### Local Development with Bindings Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/pages-functions/configuration.md Start the local development server and enable specific bindings like KV, D1, and R2. Ensure you provide the correct IDs or names for your bindings. ```bash npx wrangler pages dev ./dist --kv=KV --d1=DB=db-id --r2=BUCKET ``` -------------------------------- ### Combine Global Setup and Setup Projects in Playwright Config Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/core/global-setup.md Integrate global setup scripts (e.g., starting services, running migrations) with setup projects (e.g., creating auth states) in your Playwright configuration. ```typescript // playwright.config.ts export default defineConfig({ // Global: Start services, run migrations globalSetup: require.resolve("./global-setup"), globalTeardown: require.resolve("./global-teardown"), projects: [ // Setup project: Create auth states { name: "setup", testMatch: /.*\.setup\.ts/ }, { name: "chromium", use: { ...devices["Desktop Chrome"], storageState: ".auth/user.json", }, dependencies: ["setup"], }, ], }); ``` -------------------------------- ### Preview and Install Skills Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Combine dry-run to preview installations and --yes to automatically install if the preview looks good. ```bash # See what would be installed npx autoskills --dry-run # Install if it looks good npx autoskills --yes ``` -------------------------------- ### getInstalledSkillNames Source: https://github.com/midudev/autoskills/blob/main/_autodocs/api-reference/detection.md Reads the `skills-lock.json` file to get previously installed skills. Returns a set of skill names already installed in the project. ```APIDOC ## getInstalledSkillNames ### Description Reads the `skills-lock.json` file to get previously installed skills. ### Method ```typescript function getInstalledSkillNames(projectDir: string): Set ``` ### Parameters #### Path Parameters - **projectDir** (string) - Yes - Absolute path to the project directory ### Return Type Set of skill names already installed in the project. ### Example ```typescript import { getInstalledSkillNames } from 'autoskills/lib.ts'; const installed = getInstalledSkillNames(process.cwd()); if (installed.has('react-best-practices')) { console.log('React skills already installed'); } ``` ``` -------------------------------- ### Startup Methods Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare-deploy/references/containers/api.md Methods to start a container instance, with options for timeouts and port readiness. ```APIDOC ## Startup Methods ### start() Basic start with an 8-second timeout. Returns when the process starts, not when ports are ready. Suitable for fire-and-forget operations. ```typescript await container.start(); await container.start({ envVars: { KEY: "value" } }); ``` ### startAndWaitForPorts() Recommended method with a 20-second timeout. Returns when the specified ports are listening. Use before making HTTP or TCP requests. It resolves ports based on explicit ports, `requiredPorts`, `defaultPort`, or port 33. ```typescript await container.startAndWaitForPorts(); // Uses requiredPorts await container.startAndWaitForPorts({ ports: [8080, 9090] }); await container.startAndWaitForPorts({ ports: [8080], startOptions: { envVars: { KEY: "value" } } }); ``` ``` -------------------------------- ### Common Seed Command Examples Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/db-seed.md Examples of how to specify seed commands for different environments and runtimes. Choose the one that matches your project setup. ```typescript // TypeScript with tsx seed: 'tsx prisma/seed.ts' ``` ```typescript // TypeScript with ts-node seed: 'ts-node prisma/seed.ts' ``` ```typescript // JavaScript seed: 'node prisma/seed.js' ``` -------------------------------- ### Quick Start Commands Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/c3/README.md Use these commands to quickly scaffold new Cloudflare projects. The interactive mode is recommended for first-time users. ```bash # Interactive (recommended for first-time) npm create cloudflare@latest my-app # Worker (API/WebSocket/Cron) npm create cloudflare@latest my-api -- --type=hello-world --ts # Pages (static/SSG/full-stack) npm create cloudflare@latest my-site -- --type=web-app --framework=astro --platform=pages ``` -------------------------------- ### Setup and Teardown with Init/Deinit Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/swift-concurrency/references/testing.md Shows how to use `init` for asynchronous setup and `deinit` for synchronous cleanup in test classes. Note that `deinit` cannot perform asynchronous operations. ```swift @MainActor final class DatabaseTests { let database: Database init() async throws { database = Database() await database.prepare() } deinit { // Synchronous cleanup only } @Test func insertsData() async throws { try await database.insert(item) #expect(await database.count() == 1) } } ``` -------------------------------- ### Run Autoskills from CLI Source: https://github.com/midudev/autoskills/blob/main/_autodocs/README.md Examples of running the autoskills CLI tool. Options include auto-detection and installation with or without confirmation, performing a dry run to see what would be installed, and specifying an agent for installation. ```bash # Auto-detect and install with confirmation npx autoskills # Auto-detect and install without confirmation npx autoskills --yes # See what would be installed npx autoskills --dry-run # Install for specific agent only npx autoskills --agent cursor --yes ``` -------------------------------- ### Install Vite Plugin RSC Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/migrate-to-vinext/references/troubleshooting.md Install the React Server Components plugin for App Router projects when auto-registration is disabled or if manual setup is preferred. ```bash npm install -D @vitejs/plugin-rsc ``` -------------------------------- ### Python Redis GET Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/redis-development/rules/_contributing.md Demonstrates a basic Redis GET operation after establishing a connection. This pattern is often used for retrieving cached data. ```python # Now show the pattern result = r.get('user:1001') ``` -------------------------------- ### Successful Installation Summary Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Displays the output when all skills are installed successfully. ```bash ✔ Done! 5 skills installed in 3.2s. ``` -------------------------------- ### Bun Package Manager Setup for GitHub Actions Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/turborepo/references/ci/github-actions.md Configures the CI environment to use Bun for dependency management. Installs the latest Bun version and installs dependencies using `bun install --frozen-lockfile`. ```yaml - uses: oven-sh/setup-bun@v1 with: bun-version: latest - run: bun install --frozen-lockfile ``` -------------------------------- ### Enable Bootsnap Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-upgrade/version-guides/upgrade-5.1-to-5.2.md Require 'bootsnap/setup' in config/boot.rb to initialize bootsnap. ```ruby # config/boot.rb (add at top) require 'bootsnap/setup' ``` -------------------------------- ### Required Dependencies for Tailwind v4 Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/tailwind-v4-shadcn/references/common-gotchas.md Verify that all necessary dependencies, including `tailwindcss`, `@tailwindcss/vite`, `clsx`, and `tailwind-merge`, are installed for a complete Tailwind v4 setup. ```json { "dependencies": { "tailwindcss": "^4.1.0" // Missing @tailwindcss/vite } } ``` ```json { "dependencies": { "tailwindcss": "^4.1.0", "@tailwindcss/vite": "^4.1.0", "clsx": "^2.1.1", "tailwind-merge": "^3.3.1" }, "devDependencies": { "@types/node": "^24.0.0" } } ``` -------------------------------- ### Install @remotion/media-utils Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/remotion/rules/audio-visualization.md Install the necessary package for audio visualization functionalities. ```bash npx remotion add @remotion/media-utils ``` -------------------------------- ### Python Redis Connection Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/redis-development/rules/_contributing.md Include necessary setup like connection pools when demonstrating Redis patterns in Python for clarity. This ensures examples are runnable. ```python import redis # Include setup when needed for clarity pool = redis.ConnectionPool(host='localhost', max_connections=50) r = redis.Redis(connection_pool=pool) ``` -------------------------------- ### Common Development Workflow Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/nuxt/references/core-cli.md A common workflow involves installing dependencies with `pnpm install` and starting the development server with `pnpm dev` or `npx nuxt dev`. ```bash pnpm install pnpm dev # or npx nuxt dev ``` -------------------------------- ### Set Up Dual-Boot with next_rails Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-upgrade/SKILL.md Delegate the setup and initialization of dual-booting to the dual-boot skill. This involves managing the `next_rails` gem, initializing it, installing dependencies, and configuring the Gemfile for conditional loading. ```bash DELEGATE to the dual-boot skill for setup and initialization. That skill handles: - Checking if Gemfile.next already exists (to avoid duplicate `next?` method) - Adding next_rails gem and running next_rails --init - Installing dependencies for both Rails versions - Configuring the Gemfile with `if next?` conditionals ``` -------------------------------- ### Quick Start: Local Configuration Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/tunnel/README.md Steps to install cloudflared, authenticate, create a tunnel, route DNS, and run a tunnel using local configuration. ```bash # Install cloudflared brew install cloudflared # macOS # Authenticate cloudflared tunnel login # Create tunnel cloudflared tunnel create my-tunnel # Route DNS cloudflared tunnel route dns my-tunnel app.example.com # Run tunnel cloudflared tunnel run my-tunnel ``` -------------------------------- ### Linux systemd Service Installation Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/tunnel/patterns.md Commands to install and manage the cloudflared service on Linux using systemd. Includes commands for starting, enabling, and viewing logs. ```bash cloudflared service install systemctl start cloudflared && systemctl enable cloudflared journalctl -u cloudflared -f # Logs ``` -------------------------------- ### Prisma Init with MySQL and Custom URL Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/init.md Set up a MySQL project and provide a custom database connection URL. ```bash prisma init --datasource-provider mysql --url "mysql://user:password@localhost:3306/mydb" ``` -------------------------------- ### Start Rails Server on a Different Port and Environment Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-guides/references/command_line.md You can specify a different port using the `-p` option and change the environment with the `-e` option when starting the Rails server. This example starts the server in production on port 4000. ```bash $ bin/rails server -e production -p 4000 ``` -------------------------------- ### Expo Install Exclude Configuration Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/upgrading-expo/SKILL.md Example of an `expo` configuration in `package.json` that excludes specific packages from automatic installation. Review these exclusions after upgrading as they may no longer be necessary. ```json { "expo": { "install": { "exclude": ["react-native-reanimated"] } } } ``` -------------------------------- ### Initialize a Bun Project Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/bun/SKILL.md Use `bun init` to create a new project. Choose a template (Blank, React, Library) and it sets up essential files like `package.json` and `tsconfig.json`. ```bash bun init my-app cd my-app ``` -------------------------------- ### Start Backend Server in Global Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/core/global-setup.md Use this snippet to start a backend server process before tests run. It waits for the server to be ready and stores its PID for teardown. ```typescript // global-setup.ts import { execSync, spawn } from "child_process"; let serverProcess: any; async function globalSetup() { // Start backend server serverProcess = spawn("npm", ["run", "start:test"], { stdio: "pipe", detached: true, }); // Wait for server to be ready await waitForServer("http://localhost:3000/health", 30000); // Store PID for teardown process.env.SERVER_PID = serverProcess.pid.toString(); } async function waitForServer(url: string, timeout: number) { const start = Date.now(); while (Date.now() - start < timeout) { try { const response = await fetch(url); if (response.ok) return; } catch { // Server not ready yet } await new Promise((r) => setTimeout(r, 1000)); } throw new Error(`Server did not start within ${timeout}ms`); } export default globalSetup; ``` -------------------------------- ### Install Active Storage and Migrate Database Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-guides/references/active_storage_overview.md Run these commands to set up Active Storage configuration and create the necessary database tables. ```bash bin/rails active_storage:install bin/rails db:migrate ``` -------------------------------- ### Install Prisma CLI and Client Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-database-setup/SKILL.md Install the Prisma CLI for command-line operations and the Prisma Client library for database interactions. ```bash npm install prisma --save-dev npm install @prisma/client ``` -------------------------------- ### Install TanStack Start CLI and Dependencies Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/tanstack-start/SKILL.md Use the npx command to create a new project with the TanStack CLI, or manually install the core packages and development dependencies. ```bash npx @tanstack/cli create my-app # Or manually: npm install @tanstack/react-start @tanstack/react-router react react-dom npm install -D @tanstack/router-plugin typescript vite vite-tsconfig-paths ``` -------------------------------- ### Install Action Mailbox Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-guides/references/action_mailbox_basics.md Run the installer to set up Action Mailbox, which creates an application_mailbox.rb file and copies over migrations. ```bash bin/rails action_mailbox:install ``` -------------------------------- ### Global Setup with Cleanup Function Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/core/global-setup.md Return a cleanup function from globalSetup as an alternative to using a separate globalTeardown script. This is useful for managing resources started within the setup. ```typescript // global-setup.ts async function globalSetup(config: FullConfig): Promise<() => Promise> { const server = await startTestServer(); // Return cleanup function (alternative to globalTeardown) return async () => { await server.stop(); }; } export default globalSetup; ``` -------------------------------- ### SkillEntry Usage Example Source: https://github.com/midudev/autoskills/blob/main/_autodocs/types.md Demonstrates collecting and displaying skills, including their sources and installation status. This example imports multiple functions from 'autoskills/lib.ts' and uses the results of `detectTechnologies` and `getInstalledSkillNames`. ```typescript import { collectSkills, detectTechnologies, getInstalledSkillNames } from 'autoskills/lib.ts'; const result = detectTechnologies(process.cwd()); const installed = getInstalledSkillNames(process.cwd()); const skills = collectSkills({ detected: result.detected, isFrontend: result.isFrontend, combos: result.combos, installedNames: installed }); skills.forEach(skill => { console.log(`${skill.skill} from ${skill.sources.join(', ')} ${skill.installed ? '✓' : ''}`); }); ``` -------------------------------- ### Start Local Database Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/dev.md Starts a local PostgreSQL-compatible database instance. Use 'q' to quit, 'h' to show HTTP URL, and 't' to show TCP URLs. ```bash prisma dev ``` -------------------------------- ### Verify Excel Content After Download Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/testing-patterns/file-operations.md This example shows how to download an Excel file and verify its contents using the `xlsx` library. Make sure to install it (`npm install xlsx`). ```typescript import XLSX from "xlsx"; test("verify Excel export", async ({ page }, testInfo) => { await page.goto("/reports"); const downloadPromise = page.waitForEvent("download"); await page.getByRole("button", { name: "Export Excel" }).click(); const download = await downloadPromise; const path = testInfo.outputPath("report.xlsx"); await download.saveAs(path); // Parse Excel const workbook = XLSX.readFile(path); const sheet = workbook.Sheets[workbook.SheetNames[0]]; const data = XLSX.utils.sheet_to_json(sheet); expect(data).toHaveLength(10); expect(data[0]).toHaveProperty("Name"); expect(data[0]).toHaveProperty("Email"); }); ``` -------------------------------- ### Async setup() Function - Correct Pattern Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/vue-debug-guides/reference/composition-api-script-setup-async-context.md For the `setup()` function, register all lifecycle hooks synchronously before performing any asynchronous operations. This ensures that the hooks can correctly access the component instance and function as expected. ```javascript // CORRECT: Register hooks before any await export default { async setup() { const data = ref(null) // Register hooks FIRST (synchronous) onMounted(async () => { const config = await fetchConfig() data.value = await fetchData(config) }) // Now you can await if needed // But hooks must be registered before this point return { data } } } ``` -------------------------------- ### Start Existing Instance Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/dev.md Starts a previously created local database instance that was stopped. ```bash prisma dev start myproject ``` -------------------------------- ### Example: Get Errors via MCP Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/next-best-practices/debug-tricks.md This example demonstrates how to use `curl` to send a request to the MCP endpoint to retrieve build and runtime errors from the Next.js development server. ```bash curl -X POST http://localhost:/_next/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":"1","method":"tools/call","params":{"name":"get_errors","arguments":{}}}' ``` -------------------------------- ### Basic API Route Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/expo-api-routes/SKILL.md A simple GET request handler for an API route. ```typescript // app/api/hello+api.ts export function GET(request: Request) { return Response.json({ message: "Hello from Expo!" }); } ``` -------------------------------- ### Deploy Fresh App with PostgreSQL (Manual Build Config) Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/deno-deploy/references/FRAMEWORKS.md Step-by-step commands for deploying a Fresh app with PostgreSQL, including database provisioning and assignment, using manual build configuration. ```bash # 1. Create the app with --no-wait (warmup will fail without a database — that's expected) denodeploy create \ --org --app \ --source local \ --do-not-use-detected-build-config \ --install-command "deno install" \ --build-command "deno task build" \ --pre-deploy-command "echo ready" \ --runtime-mode dynamic --entrypoint main.ts \ --build-timeout 5 --build-memory-limit 1024 --region us \ --no-wait # 2. Provision a PostgreSQL database denodeploy database provision my-db --kind prisma --region us-east-1 # 3. Assign it to the app (this injects DATABASE_URL, PGHOST, etc.) denodeploy database assign my-db --app # 4. Redeploy — now the database exists, so warmup succeeds denodeploy --prod ``` -------------------------------- ### Install @remotion/transitions Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/remotion/rules/transitions.md Install the necessary package for scene transitions and overlays. ```bash npx remotion add @remotion/transitions ``` -------------------------------- ### Hono Basic Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/workers/frameworks.md Set up a basic Hono application with GET and POST routes. ```typescript import { Hono } from 'hono'; const app = new Hono(); app.get('/', (c) => c.text('Hello World!')); app.post('/api/users', async (c) => { const body = await c.req.json(); return c.json({ id: 1, ...body }, 201); }); export default app; ``` -------------------------------- ### Minimal Protected Route Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/clerk-nuxt-patterns/SKILL.md A basic example of protecting a Nuxt page using the built-in 'auth' middleware. The page will only be accessible to signed-in users, and the userId is available in the script setup. ```vue ``` -------------------------------- ### Complete Turborepo Configuration Example Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/turborepo/references/environment/RULE.md A comprehensive example demonstrating the configuration of global and task-specific environment variables, including both hashed and runtime-only variables. ```json { "$schema": "https://v2-9-8.turborepo.dev/schema.json", "globalEnv": ["CI", "NODE_ENV"], "globalPassThroughEnv": ["GITHUB_TOKEN", "NPM_TOKEN"], "tasks": { "build": { "env": ["DATABASE_URL", "API_*"], "passThroughEnv": ["SENTRY_AUTH_TOKEN"] }, "test": { "env": ["TEST_DATABASE_URL"] } } } ``` -------------------------------- ### Start Docker Compose Services in Global Setup Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/playwright-best-practices/core/global-setup.md This snippet starts Docker services defined in a docker-compose file using `docker-compose up -d`. It also includes a check for service readiness. ```typescript // global-setup.ts import { execSync } from "child_process"; async function globalSetup() { console.log("Starting Docker services..."); execSync("docker-compose -f docker-compose.test.yml up -d", { stdio: "inherit", }); // Wait for services to be healthy execSync("docker-compose -f docker-compose.test.yml exec -T db pg_isready", { stdio: "inherit", }); } export default globalSetup; ``` -------------------------------- ### TypeScript Setup for Workers Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/cloudflare/references/email-routing/configuration.md Installs necessary types and configures tsconfig.json for Cloudflare Workers development. ```bash npm install --save-dev @cloudflare/workers-types ``` ```json // tsconfig.json { "compilerOptions": { "target": "ES2022", "module": "ES2022", "lib": ["ES2022"], "types": ["@cloudflare/workers-types"], "moduleResolution": "bundler", "strict": true } } ``` -------------------------------- ### Example Setup for Router Testing Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/angular-developer/references/router-testing.md Configure TestBed with test routes using provideRouter and create the RouterTestingHarness. This sets up the testing environment for routing scenarios. ```typescript import {TestBed} from '@angular/core/testing'; import {provideRouter} from '@angular/router'; import {RouterTestingHarness} from '@angular/router/testing'; import {Dashboard} from './dashboard.component'; import {HeroDetail} from './hero-detail.component'; describe('Dashboard Component Routing', () => { let harness: RouterTestingHarness; beforeEach(async () => { // 1. Configure TestBed with test routes await TestBed.configureTestingModule({ providers: [ // Use provideRouter with your test-specific routes provideRouter([ {path: '', component: Dashboard}, {path: 'heroes/:id', component: HeroDetail}, ]), ], }).compileComponents(); // 2. Create the RouterTestingHarness harness = await RouterTestingHarness.create(); }); }); ``` -------------------------------- ### Local Development Setup - Specific IDE Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Installs skills specifically for a given IDE, such as Cursor. ```bash # Install for specific IDE npx autoskills --agent cursor --yes ``` -------------------------------- ### Connect to Development Server Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/expo-dev-client/SKILL.md Start the Metro bundler with the --dev-client flag and then connect your installed development client by scanning the QR code or manually entering the Metro bundler URL. ```bash # Start Metro bundler npx expo start --dev-client # Scan QR code with dev client or enter URL manually ``` -------------------------------- ### Start with Custom Ports Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/prisma-cli/references/dev.md Starts the local database instance using custom ports for the HTTP server and the database. ```bash prisma dev --port 5000 --db-port 5432 ``` -------------------------------- ### CI/CD Automated Setup Source: https://github.com/midudev/autoskills/blob/main/_autodocs/cli-reference.md Automates skill installation in a CI/CD environment, committing changes afterward. ```bash #!/bin/bash set -e npx autoskills --yes --verbose echo "Skills installation complete" git add .agents skills-lock.json git commit -m "chore: install autoskills" ``` -------------------------------- ### IDE-Specific Setup Source: https://github.com/midudev/autoskills/blob/main/_autodocs/README.md Install skills specifically for a target IDE, such as Cursor. Ensures agent-specific compatibility. ```bash npx autoskills --agent cursor --yes # Install only for Cursor IDE ``` -------------------------------- ### Fetch Component Documentation URLs Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/shadcn/SKILL.md Run this command to get the URLs for a component's documentation, examples, and API reference. Always fetch these URLs first when working with components. ```bash npx shadcn@latest docs button dialog select ``` -------------------------------- ### Initialize Dual-Boot Environment Source: https://github.com/midudev/autoskills/blob/main/packages/autoskills/skills-registry/rails-upgrade/version-guides/upgrade-7.0-to-7.1.md Install and initialize the `next_rails` gem for dual-booting, which is recommended for smoother upgrades. ```bash gem install next_rails next_rails --init ```