### Developer First-Time Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/technical-docs/references/runbooks-and-onboarding.md Commands to set up a new developer environment, including cloning the repository, installing dependencies, configuring environment variables, and starting the development server. ```bash git clone https://github.com/org/repo.git cd repo pnpm install cp .env.example .env.local # Edit with your local values pnpm db:setup # Start database and run migrations pnpm dev # Start dev server at localhost:3000 ``` -------------------------------- ### Full Setup Example: Documents Table and Index Source: https://github.com/oakoss/agent-skills/blob/main/skills/turso/references/vector-search.md Provides a complete setup for a 'documents' table with an embedding column and a DiskANN index for efficient similarity search. ```sql CREATE TABLE documents ( id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT NOT NULL, embedding F32_BLOB(1536) ); CREATE INDEX documents_idx ON documents ( libsql_vector_idx(embedding, 'type=diskann', 'metric=cosine') ); ``` -------------------------------- ### Package Manager Setup in GitHub Actions Source: https://github.com/oakoss/agent-skills/blob/main/skills/turborepo/references/filtering-and-ci.md Examples for setting up pnpm, Yarn, and Bun within a GitHub Actions workflow. Includes installation commands. ```yaml # pnpm - uses: pnpm/action-setup@v3 with: version: 9 - run: pnpm install --frozen-lockfile # Yarn - run: yarn install --frozen-lockfile # Bun - uses: oven-sh/setup-bun@v1 - run: bun install --frozen-lockfile ``` -------------------------------- ### Complete Vitest Setup File Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/vitest-testing/references/test-setup.md A comprehensive setup file for Vitest that includes common configurations like jest-dom, cleanup, MSW server lifecycle management, and mocking window.matchMedia. ```typescript // vitest.setup.ts import '@testing-library/jest-dom/vitest'; import { cleanup } from '@testing-library/react'; import { afterAll, afterEach, beforeAll, vi } from 'vitest'; import { server } from './test/server'; beforeAll(() => { server.listen({ onUnhandledRequest: 'error' }); }); afterEach(() => { cleanup(); server.resetHandlers(); vi.restoreAllMocks(); }); afterAll(() => { server.close(); }); Object.defineProperty(window, 'matchMedia', { writable: true, value: vi.fn().mockImplementation((query: string) => ({ matches: false, media: query, onchange: null, addListener: vi.fn(), removeListener: vi.fn(), addEventListener: vi.fn(), removeEventListener: vi.fn(), dispatchEvent: vi.fn(), })), }); ``` -------------------------------- ### Monorepo Setup and Development Workflow Guide Source: https://github.com/oakoss/agent-skills/blob/main/skills/pnpm-workspace/references/monorepo-integration.md Guidance on choosing the right tool for different monorepo tasks, from initial setup to day-to-day development. ```text Setting up the monorepo? ├── Defining packages and linking → pnpm workspaces ├── Build/test/lint pipelines → Turborepo └── Versioning and publishing → Changesets Day-to-day development? ├── Installing dependencies → pnpm install (root) ├── Running tasks → turbo run build/test/lint ├── Adding a changeset → changeset add └── Filtering commands → --filter (both pnpm and turbo) Releasing packages? ├── Consuming changesets → changeset version ├── Building in dependency order → turbo run build ├── Publishing to npm → changeset publish └── CI automation → changesets/action ``` -------------------------------- ### TanStack Start API Route Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/better-auth/references/frameworks.md Set up API routes for authentication handlers in TanStack Start. This example shows how to handle GET and POST requests. ```typescript import { auth } from '@/lib/auth'; import { createFileRoute } from '@tanstack/react-router'; export const Route = createFileRoute('/api/auth/$')({ server: { handlers: { GET: ({ request }) => auth.handler(request), POST: ({ request }) => auth.handler(request), }, }, }); ``` -------------------------------- ### Install Binaries Using Generated Installers Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/release-pipeline.md Examples of how end-users can install your distributed binaries using shell, PowerShell, or Homebrew installers. These commands are typically provided after a release is published. ```bash # Shell installer (macOS/Linux) curl --proto '=https' --tlsv1.2 -LsSf https://github.com/org/repo/releases/latest/download/myapp-installer.sh | sh # PowerShell installer (Windows) powershell -ExecutionPolicy ByPass -c "irm https://github.com/org/repo/releases/latest/download/myapp-installer.ps1 | iex" # Homebrew brew install myorg/tap/myapp ``` -------------------------------- ### Install QEMU for Emulation Source: https://github.com/oakoss/agent-skills/blob/main/skills/docker/references/buildx-and-multiplatform.md Installs QEMU user-static binaries on the host system, enabling Docker Buildx to emulate different architectures. This is a one-time setup required for QEMU-based cross-platform builds. ```bash # Install QEMU user-static binaries (one-time setup) docker run --privileged --rm tonistiigi/binfmt --install all ``` -------------------------------- ### Complete Three.js Scene Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/threejs/references/scene-and-lighting.md A comprehensive example demonstrating scene initialization, camera setup, renderer configuration, orbit controls, environment mapping, lighting, ground plane, and GLTF model loading with Draco compression. ```typescript import * as THREE from 'three'; import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js'; import { RGBELoader } from 'three/addons/loaders/RGBELoader.js'; const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 0.1, 100, ); camera.position.set(0, 2, 5); const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); renderer.setSize(window.innerWidth, window.innerHeight); renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.shadowMap.enabled = true; renderer.shadowMap.type = THREE.PCFSoftShadowMap; document.body.appendChild(renderer.domElement); const controls = new OrbitControls(camera, renderer.domElement); controls.enableDamping = true; controls.target.set(0, 1, 0); new RGBELoader().load('/env.hdr', (hdr) => { const pmrem = new THREE.PMREMGenerator(renderer); const envMap = pmrem.fromEquirectangular(hdr).texture; scene.environment = envMap; scene.background = envMap; scene.backgroundBlurriness = 0.3; hdr.dispose(); pmrem.dispose(); }); const hemi = new THREE.HemisphereLight(0xffffff, 0x8d8d8d, 1); scene.add(hemi); const sun = new THREE.DirectionalLight(0xffffff, 3); sun.position.set(5, 10, 5); sun.castShadow = true; sun.shadow.mapSize.set(2048, 2048); sun.shadow.camera.near = 0.1; sun.shadow.camera.far = 30; const d = 10; sun.shadow.camera.left = -d; sun.shadow.camera.right = d; sun.shadow.camera.top = d; sun.shadow.camera.bottom = -d; scene.add(sun); const ground = new THREE.Mesh( new THREE.PlaneGeometry(50, 50), new THREE.MeshStandardMaterial({ color: 0xcccccc }), ); ground.rotation.x = -Math.PI / 2; ground.receiveShadow = true; scene.add(ground); const draco = new DRACOLoader(); draco.setDecoderPath('https://www.gstatic.com/draco/versioned/decoders/1.5.7/'); const loader = new GLTFLoader(); loader.setDRACOLoader(draco); loader.load('/model.glb', (gltf) => { gltf.scene.traverse((child) => { if ((child as THREE.Mesh).isMesh) { child.castShadow = true; child.receiveShadow = true; } }); scene.add(gltf.scene); }); function animate(): void { controls.update(); renderer.render(scene, camera); } renderer.setAnimationLoop(animate); window.addEventListener('resize', () => { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); }); ``` -------------------------------- ### Create a new SvelteKit project Source: https://github.com/oakoss/agent-skills/blob/main/skills/svelte/references/adapters-deployment.md Standard commands to create a new SvelteKit project, navigate into its directory, install dependencies, and start the development server. ```bash npx sv create my-app cd my-app npm install npm run dev ``` -------------------------------- ### Environment Setup on Session Start (Bash Script) Source: https://github.com/oakoss/agent-skills/blob/main/skills/meta-hook-creator/references/templates.md A script-based approach to capture and append environment changes to a specified file after sourcing NVM and selecting a Node.js version. ```bash #!/bin/bash # .claude/hooks/setup-env.sh ENV_BEFORE=$(export -p | sort) source ~/.nvm/nvm.sh nvm use 20 if [ -n "$CLAUDE_ENV_FILE" ]; then ENV_AFTER=$(export -p | sort) comm -13 <(echo "$ENV_BEFORE") <(echo "$ENV_AFTER") >> "$CLAUDE_ENV_FILE" fi exit 0 ``` -------------------------------- ### Node.js Server Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/hono/references/adapters.md Install the `@hono/node-server` adapter for Node.js. Use the `serve` function to run your Hono app. ```bash npm install @hono/node-server ``` -------------------------------- ### Environment Setup on Session Start (JSON) Source: https://github.com/oakoss/agent-skills/blob/main/skills/meta-hook-creator/references/templates.md Configure environment variables for the session, such as setting NODE_ENV to development and adding to the PATH, by appending to a specified environment file. ```json { "hooks": { "SessionStart": [ { "matcher": "startup", "hooks": [ { "type": "command", "command": "bash -c 'if [ -n \"$CLAUDE_ENV_FILE\" ]; then echo \"export NODE_ENV=development\" >> \"$CLAUDE_ENV_FILE\"; echo \"export PATH=\\\"\\\$PATH:./node_modules/.bin\\\"\" >> \"$CLAUDE_ENV_FILE\"; fi'" } ] } ] } } ``` -------------------------------- ### Full Configuration Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/bun-runtime/references/bundler.md Illustrates a comprehensive configuration for Bun.build(), including multiple entry points, target, format, code splitting, minification, source maps, external modules, define replacements, custom naming, and dropping console/debugger statements. ```APIDOC ## Bun.build() - Full Configuration ### Description Provides a detailed example of configuring the Bun bundler with various options for advanced build scenarios. ### Method ```ts await Bun.build({ entrypoints: ['./src/index.tsx', './src/worker.ts'], outdir: './dist', target: 'browser', format: 'esm', splitting: true, minify: true, sourcemap: 'linked', external: ['react', 'react-dom'], define: { 'process.env.API_URL': JSON.stringify('https://api.example.com'), }, naming: { entry: '[dir]/[name]-[hash].[ext]', chunk: 'chunks/[name]-[hash].[ext]', asset: 'assets/[name]-[hash].[ext]', }, drop: ['console', 'debugger'], banner: '"use client";', footer: '// Built with Bun', }); ``` ### Parameters * `entrypoints` (string[]): Array of entry point files. * `outdir` (string): Output directory. * `target` (string): Target environment ('browser', 'bun', 'node'). * `format` (string): Output format ('esm', 'cjs', 'iife'). * `splitting` (boolean): Enable code splitting. * `minify` (boolean | object): Enable minification. * `sourcemap` (string): Source map configuration ('none', 'linked', 'inline', 'external'). * `external` (string[]): Array of packages to exclude from the bundle. * `define` (object): Key-value pairs for global variable replacements. * `naming` (object): Custom naming patterns for entry, chunk, and asset files. * `drop` (string[]): Array of expressions to drop from the bundle. * `banner` (string): String to prepend to the output file. * `footer` (string): String to append to the output file. ``` -------------------------------- ### Get CASS Robot Documentation Source: https://github.com/oakoss/agent-skills/blob/main/skills/agent-session-search/references/robot-mode.md Use these commands to retrieve documentation optimized for LLMs. This includes all commands, schemas, examples, exit codes, guides, contracts, and sources. ```bash # Topic-based docs (LLM-optimized) cass robot-docs commands # all commands and flags cass robot-docs schemas # response JSON schemas cass robot-docs examples # copy-paste invocations cass robot-docs exit-codes # error handling cass robot-docs guide # quick-start walkthrough cass robot-docs contracts # API versioning cass robot-docs sources # remote sources guide ``` -------------------------------- ### Basic Static Routing Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/service-worker/references/static-routing.md Declare static routes within the service worker's install event using `event.addRoutes()`. This example defines rules for API calls and static assets, specifying their respective sources. ```typescript self.addEventListener('install', (event: ExtendableEvent) => { const installEvent = event as ExtendableEvent & { addRoutes: (routes: StaticRoute[]) => void; }; if ('addRoutes' in installEvent) { installEvent.addRoutes([ { condition: { urlPattern: new URLPattern({ pathname: '/api/*' }), }, source: 'network', }, { condition: { urlPattern: new URLPattern({ pathname: '/static/*' }), }, source: 'cache', }, ]); } }); ``` -------------------------------- ### Project Setup with uv Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/fastapi-patterns.md Initializes a new FastAPI project and adds necessary dependencies using the 'uv' command-line tool. ```bash uv init my-api cd my-api uv add fastapi "uvicorn[standard]" uv add --dev pytest httpx pytest-asyncio ``` -------------------------------- ### Remove Forced Enthusiasm in Getting Started Section Source: https://github.com/oakoss/agent-skills/blob/main/skills/de-slopify/references/before-and-after.md Eliminate overly enthusiastic language and meta-commentary from 'Getting Started' sections. Focus on the actions the reader needs to take. ```markdown BEFORE: # Getting Started Let's dive in! We're excited to help you get up and running with our amazing tool. In this guide, we'll walk you through everything you need to know. AFTER: # Getting Started Install the CLI and run your first command in under a minute. ``` -------------------------------- ### Turso CLI Full Setup Workflow Source: https://github.com/oakoss/agent-skills/blob/main/skills/turso/references/cli-management.md A comprehensive workflow demonstrating the initial setup for a Turso project, including authentication, group creation, database creation, and token generation. ```bash turso auth login turso group create default --location iad turso db create my-app --group default turso db show my-app --url turso db tokens create my-app ``` -------------------------------- ### Basic Electric Collection Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/tanstack-db/references/electricsql-integration.md Set up a basic collection using `createCollection` and `electricCollectionOptions`. This configures the collection ID, how to get the row key, and ElectricSQL shape options including the URL and table to sync. ```typescript import { createCollection } from '@tanstack/react-db'; import { electricCollectionOptions } from '@tanstack/electric-db-collection'; type Todo = { id: string; title: string; completed: boolean; user_id: string; created_at: string; }; const todoCollection = createCollection( electricCollectionOptions({ id: 'todos', getKey: (row: Todo) => row.id, shapeOptions: { url: 'http://localhost:3000/v1/shape', params: { table: 'todos', }, }, }), ); ``` -------------------------------- ### Install and Use sqlx-cli for Migrations Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/axum-web.md Instructions for installing the sqlx-cli, creating new migrations, running them against the database, and preparing queries for compile-time verification. ```bash # Install sqlx-cli cargo install sqlx-cli --no-default-features --features postgres # Create and run migrations sqlx migrate add create_users sqlx migrate run # Verify queries at compile time cargo sqlx prepare ``` -------------------------------- ### Install and configure adapter-static Source: https://github.com/oakoss/agent-skills/blob/main/skills/svelte/references/adapters-deployment.md Install adapter-static for fully pre-rendered static sites. Ensure all routes are prerenderable. Configure output directories and fallback pages. ```bash npm install -D @sveltejs/adapter-static ``` ```javascript import adapter from '@sveltejs/adapter-static'; /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { adapter: adapter({ pages: 'build', assets: 'build', fallback: '404.html', precompress: false, strict: true, }), }, }; export default config; ``` ```javascript export const prerender = true; ``` -------------------------------- ### Quick Install DCG Source: https://github.com/oakoss/agent-skills/blob/main/skills/destructive-command-guard/SKILL.md Installs the Destructive Command Guard using a curl script for quick setup. ```shell curl -fsSL ".../install.sh" | bash -s -- --easy-mode ``` -------------------------------- ### Platform-Specific Dependency Installation Source: https://github.com/oakoss/agent-skills/blob/main/skills/docker/references/buildx-and-multiplatform.md Installs platform-specific dependencies within a Dockerfile build stage. This example conditionally installs Python, make, and g++ only when building for the 'arm64' architecture. ```dockerfile FROM node:24-alpine AS builder ARG TARGETARCH RUN if [ "$TARGETARCH" = "arm64" ]; then \ apk add --no-cache python3 make g++; \ fi COPY package.json package-lock.json ./ RUN npm ci ``` -------------------------------- ### Initialize Project with Local Registry Source: https://github.com/oakoss/agent-skills/blob/main/skills/shadcn-ui/references/cli-and-registry.md Use the `init` command with the `--from` flag to initialize your project using a local registry file. ```bash npx shadcn@latest init --from ./local-registry.json ``` -------------------------------- ### Make GET Request with Query Parameters Source: https://github.com/oakoss/agent-skills/blob/main/skills/openapi/references/code-generation.md Example of performing a GET request with query parameters using the openapi-fetch client. ```typescript const { data, error } = await client.GET('/users', { params: { query: { page: 1, limit: 20, role: 'admin' }, }, }); ``` -------------------------------- ### Initialize Project with Page Blocks Source: https://github.com/oakoss/agent-skills/blob/main/skills/shadcn-ui/SKILL.md Bootstrap a new project with pre-built page blocks using this command. ```bash npx shadcn@latest init sidebar-01 ``` -------------------------------- ### Make GET Request with Path Parameters Source: https://github.com/oakoss/agent-skills/blob/main/skills/openapi/references/code-generation.md Example of performing a GET request with path parameters using the openapi-fetch client. ```typescript const { data, error } = await client.GET('/users/{userId}', { params: { path: { userId: '123' }, }, }); if (error) { console.error(error.code, error.message); return; } console.log(data.name); ``` -------------------------------- ### Preview Server Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/react-email/references/rendering.md Instructions for setting up and running the local development server for previewing emails with hot reload. ```APIDOC ## Preview Server React Email includes a local development server for previewing emails with hot reload. ### Setup ```bash npm install react-email -D ``` Add a script to `package.json`: ```json { "scripts": { "email:dev": "email dev" } } ``` ### Project Structure The dev server looks for email templates in a specific directory. ```text project/ ├── emails/ │ ├── welcome.tsx │ ├── order-confirmation.tsx │ └── password-reset.tsx ├── package.json └── ... ``` ### Running the Preview ```bash npx email dev ``` This starts a local server (default `http://localhost:3000`) that renders each email template with hot reload. Changes to email components are reflected immediately. ### Custom Source Directory ```bash npx email dev --dir ./src/emails --port 3001 ``` | Flag | Description | | -------- | ---------------------------------------------------------- | | `--dir` | Directory containing email templates (default: `./emails`) | | `--port` | Port number for the dev server (default: `3000`) | ``` -------------------------------- ### Get Global Tool Install Directory Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/scripts-and-tools.md Display the directory where global tools are installed by uv using `uv tool dir`. This can be useful for managing or inspecting installed tools. ```bash uv tool dir ``` -------------------------------- ### Initialize a Project with uv Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/project-management.md Use 'uv init' to create a new project directory with a basic structure and pyproject.toml. Navigate into the created directory to begin development. ```bash uv init my-project cd my-project ``` ```text my-project/ pyproject.toml .python-version hello.py ``` -------------------------------- ### Verifying External Dependency Installation Source: https://github.com/oakoss/agent-skills/blob/main/skills/meta-skill-creator/references/skill-anatomy.md Include a command to verify that the required packages have been installed successfully. This helps users confirm their setup. ```bash uv run python -c "import pypdf, pdfplumber; print('OK')" ``` -------------------------------- ### Bun Project Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/hono/references/adapters.md Create a new Hono project for Bun using `bun create hono@latest`. Run the development server with `bun run dev`. ```bash bun create hono@latest my-app ``` ```bash bun run dev ``` -------------------------------- ### Configure Vitest to Use Setup Files Source: https://github.com/oakoss/agent-skills/blob/main/skills/api-testing/references/msw-handlers.md Register the MSW setup file in your Vitest configuration. This tells Vitest to execute the setup file, which includes starting and managing the MSW server for your tests. ```typescript import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { globals: true, environment: 'node', setupFiles: ['./src/mocks/setup.ts'], }, }); ``` -------------------------------- ### Define API Routes (GET and POST) Source: https://github.com/oakoss/agent-skills/blob/main/skills/astro/references/rendering-modes.md Example of defining API endpoints using `APIRoute` for GET and POST requests in server-rendered projects. ```ts import type { APIRoute } from 'astro'; export const GET: APIRoute = async ({ params, request }) => { const data = await fetchDataFromDB(params.id); return new Response(JSON.stringify(data), { status: 200, headers: { 'Content-Type': 'application/json' }, }); }; export const POST: APIRoute = async ({ request }) => { const body = await request.json(); const result = await saveToDatabase(body); return new Response(JSON.stringify(result), { status: 201 }); }; ``` -------------------------------- ### Basic HTTP Server with Routes Source: https://github.com/oakoss/agent-skills/blob/main/skills/bun-runtime/references/runtime-apis.md Demonstrates how to create a basic HTTP server using Bun.serve() with different types of routes, including static responses, dynamic routes with parameters, per-method handlers, wildcard routes, and file serving. ```APIDOC ## HTTP Server with Bun.serve() ### Description Sets up an HTTP server with various routing configurations. ### Method `Bun.serve(options)` ### Parameters - **options** (object) - Configuration for the server. - **port** (number) - The port to listen on. - **routes** (object) - A map of paths to handlers or responses. - **path** (string | object | Response | File) - Route definition. - **fetch** (function) - Handler for requests not matched by `routes`. - **error** (function) - Handler for errors. ### Example ```ts const server = Bun.serve({ port: 3000, routes: { '/api/health': new Response('OK'), '/api/users/:id': (req) => { return Response.json({ id: req.params.id }); }, '/api/users': { GET: () => Response.json([]), POST: async (req) => { const body = await req.json(); return Response.json(body, { status: 201 }); }, }, '/favicon.ico': Bun.file('./public/favicon.ico'), '/api/*': Response.json({ error: 'Not found' }, { status: 404 }), }, fetch(req) { return new Response('Not Found', { status: 404 }); }, error(error) { console.error(error); return new Response('Internal Server Error', { status: 500 }); }, }); console.log(`Server running at ${server.url}`); ``` ``` -------------------------------- ### Basic Programmatic Usage Source: https://github.com/oakoss/agent-skills/blob/main/skills/bun-runtime/references/bundler.md Demonstrates the fundamental usage of Bun.build() to bundle an entry point and output to a directory. It also shows how to handle build success and errors. ```APIDOC ## Bun.build() - Basic Usage ### Description Bundles an entry point file and outputs the result to a specified directory. Includes error handling and logging of output files. ### Method ```ts await Bun.build({ entrypoints: ['./src/index.ts'], outdir: './dist', }); ``` ### Parameters * `entrypoints` (string[]): An array of entry point files. * `outdir` (string): The directory to output the bundled files. ### Response * `success` (boolean): Indicates if the build was successful. * `logs` (Array): An array of log messages from the build process. * `outputs` (Array<{kind: string, path: string, size: number}>): An array of information about the generated output files. ### Request Example ```ts const result = await Bun.build({ entrypoints: ['./src/index.ts'], outdir: './dist', }); if (!result.success) { console.error('Build failed:'); for (const log of result.logs) { console.error(log); } process.exit(1); } for (const output of result.outputs) { console.log(`${output.kind}: ${output.path} (${output.size} bytes)`); } ``` ``` -------------------------------- ### Run Configured CLI and Help Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/cli-applications.md Execute the CLI application using its configured entry point and display its help message. ```bash uv run my-cli users list uv run my-cli --help ``` -------------------------------- ### API Route to Get Comments Source: https://github.com/oakoss/agent-skills/blob/main/skills/astro/references/astro-db.md Example of an Astro API route (`GET`) that fetches comments for a given slug from the database. It returns the comments as JSON. ```typescript import type { APIRoute } from 'astro'; import { db, Comment, eq } from 'astro:db'; export const GET: APIRoute = async ({ params }) => { const comments = await db .select() .from(Comment) .where(eq(Comment.postSlug, params.slug!)); return new Response(JSON.stringify(comments), { headers: { 'Content-Type': 'application/json' }, }); }; ``` -------------------------------- ### Create a Database Source: https://github.com/oakoss/agent-skills/blob/main/skills/turso/references/multi-tenant.md This example shows how to create a new tenant database using the Turso platform API. ```APIDOC ## POST /v1/organizations/{org}/databases ### Description Creates a new database for a specific organization. ### Method POST ### Endpoint `/v1/organizations/{org}/databases` ### Parameters #### Path Parameters - **org** (string) - Required - The organization ID. #### Request Body - **name** (string) - Required - The name of the database to create. - **group** (string) - Required - The group where the database will be hosted. ### Request Example ```json { "name": "tenant-abc", "group": "default" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the created database. - **group** (string) - The group where the database is hosted. #### Response Example ```json { "name": "tenant-abc", "group": "default" } ``` ``` -------------------------------- ### Configure Binary Distribution Targets and Installers with cargo-dist Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/release-pipeline.md Specify the target platforms, installers, and CI integration settings for your binary distribution in the Cargo.toml file. This example configures shell, PowerShell, and Homebrew installers for multiple architectures. ```toml # Cargo.toml [workspace.metadata.dist] cargo-dist-version = "0.27.0" ci = "github" installers = ["shell", "powershell", "homebrew"] targets = [ "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "x86_64-pc-windows-msvc", ] tap = "myorg/homebrew-tap" publish-jobs = ["homebrew"] [workspace.metadata.dist.github-custom-runners] aarch64-unknown-linux-gnu = "ubuntu-22.04-arm" ``` -------------------------------- ### Paragraph Length Pattern Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/content-humanizer/references/advanced-patterns.md Follow a structured pattern of paragraph lengths to guide the reader through concepts effectively. This example suggests alternating medium, short, and long paragraphs. ```text Pattern to follow: - Medium paragraph (3-4 sentences): introduce a concept - Short paragraph (1 sentence): make a key point land - Long paragraph (5-6 sentences): develop a complex idea with nuance - Short paragraph (1 sentence): transition or emphasize ``` -------------------------------- ### Build System: Setuptools Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/project-management.md Configures Setuptools as the build backend for the project, specifying its minimum required version. ```toml [build-system] requires = ["setuptools>=75.0"] build-backend = "setuptools.build_meta" ``` -------------------------------- ### Show All Config Options with Docs Source: https://github.com/oakoss/agent-skills/blob/main/skills/ghostty/references/cli-actions.md Displays all configuration options, including their defaults and documentation, in a valid config file format. ```bash ghostty +show-config --default --docs ``` -------------------------------- ### Run Remote Source Setup Wizard Source: https://github.com/oakoss/agent-skills/blob/main/skills/agent-session-search/references/remote-sources.md Initiates the setup wizard for discovering, probing, and configuring remote machines for agent session search. Use `--hosts` to specify particular machines, `--dry-run` to preview changes, or `--resume` to continue an interrupted setup. ```bash cass sources setup ``` ```bash cass sources setup --hosts css,csd,yto ``` ```bash cass sources setup --dry-run ``` ```bash cass sources setup --resume ``` -------------------------------- ### Few-Shot CoT Prompting Examples Source: https://github.com/oakoss/agent-skills/blob/main/skills/prompt-engineering/references/chain-of-thought.md Provides a string containing example question-answer pairs with explicit reasoning chains. Use this to guide the model's reasoning process for complex problems. ```python few_shot_examples = """ Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 balls. How many tennis balls does he have now? A: Let's think step by step: 1. Roger starts with 5 balls 2. He buys 2 cans, each with 3 balls 3. Balls from cans: 2 x 3 = 6 balls 4. Total: 5 + 6 = 11 balls Answer: 11 Q: The cafeteria had 23 apples. If they used 20 to make lunch and bought 6 more, how many do they have? A: Let's think step by step: 1. Started with 23 apples 2. Used 20 for lunch: 23 - 20 = 3 apples left 3. Bought 6 more: 3 + 6 = 9 apples Answer: 9 Q: {user_query} A: Let's think step by step:""" ``` -------------------------------- ### Install All Tools from mise.toml Source: https://github.com/oakoss/agent-skills/blob/main/skills/mise/references/tool-management.md Run `mise install` to install all tools defined in the `mise.toml` file without modifying it. This is useful for setting up a project environment. ```bash mise install ``` -------------------------------- ### Install Skill Using Owner/Repo Shorthand After Credential Configuration Source: https://github.com/oakoss/agent-skills/blob/main/skills/find-skills/references/private-repos.md Once HTTPS credentials are configured, you can use the `owner/repo` shorthand to install skills from private repositories. This command assumes prior credential setup. ```bash pnpm dlx skills add YourOrg/private-skills -s my-skill -a claude-code -y ``` -------------------------------- ### Install Pino and Pino-Pretty Source: https://github.com/oakoss/agent-skills/blob/main/skills/pino-logging/references/setup-and-configuration.md Install the Pino logging library and the pino-pretty utility for development. ```bash pnpm add pino pnpm add -D pino-pretty ``` -------------------------------- ### Rust Integration Tests Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/testing-and-benchmarks.md Integration tests are placed in the `tests/` directory and are compiled as separate crates. This example shows a common setup pattern for integration tests, including database connection and migration. ```rust // tests/common/mod.rs use myapp::AppState; pub async fn setup() -> AppState { let db = sqlx::PgPool::connect("postgres://localhost/test_db") .await .expect("failed to connect to test database"); sqlx::migrate!().run(&db).await.expect("migration failed"); AppState { db } } pub async fn cleanup(state: &AppState) { sqlx::query("TRUNCATE users CASCADE") .execute(&state.db) .await .expect("cleanup failed"); } ``` -------------------------------- ### Rust Integration Test Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/testing-and-benchmarks.md This example demonstrates an integration test for an API endpoint using Axum. It utilizes the `setup` and `cleanup` functions from a common module to manage test state and database operations. ```rust // tests/api_tests.rs mod common; use axum::{body::Body, http::{Request, StatusCode}}; use tower::ServiceExt; #[tokio::test] async fn test_create_user() { let state = common::setup().await; let app = myapp::build_router(state.clone()); let response = app .oneshot( Request::builder() .method("POST") .uri("/api/v1/users") .header("Content-Type", "application/json") .body(Body::from(r#"{"name": "Alice", "email": "alice@test.com"}"#)) .unwrap(), ) .await .unwrap(); assert_eq!(response.status(), StatusCode::CREATED); common::cleanup(&state).await; } #[tokio::test] async fn test_get_nonexistent_user() { let state = common::setup().await; let app = myapp::build_router(state.clone()); let response = app .oneshot( Request::builder() .uri("/api/v1/users/99999") .body(Body::empty()) .unwrap(), ) .await .unwrap(); assert_eq!(response.status(), StatusCode::NOT_FOUND); common::cleanup(&state).await; } ``` -------------------------------- ### Redux Before Zustand Source: https://github.com/oakoss/agent-skills/blob/main/skills/zustand/references/migration.md Example of Redux setup including action types, actions, reducer, and store creation. ```ts const INCREMENT = 'INCREMENT'; const increment = () => ({ type: INCREMENT }); const reducer = (state = { count: 0 }, action) => { switch (action.type) { case INCREMENT: return { count: state.count + 1 }; default: return state; } }; const store = createStore(reducer); // Component const count = useSelector((state) => state.count); const dispatch = useDispatch(); ``` -------------------------------- ### Check and Install Updates in Frontend (TypeScript) Source: https://github.com/oakoss/agent-skills/blob/main/skills/tauri/references/distribution.md Implement frontend logic to check for available updates using the Tauri updater plugin. This example shows how to initiate the download and installation process and handle progress events. ```typescript import { check } from '@tauri-apps/plugin-updater'; import { relaunch } from '@tauri-apps/plugin-process'; const update = await check(); if (update) { console.log(`Update available: ${update.version}`); let downloaded = 0; let contentLength = 0; await update.downloadAndInstall((event) => { switch (event.event) { case 'Started': contentLength = event.data.contentLength ?? 0; break; case 'Progress': downloaded += event.data.chunkLength; console.log(`Downloaded ${downloaded}/${contentLength}`); break; case 'Finished': console.log('Download complete'); break; } }); await relaunch(); } ``` -------------------------------- ### Full Vercel Configuration Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/vercel-deployment/references/configuration.md An comprehensive example demonstrating various Vercel configuration options including build commands, output directories, headers, rewrites, redirects, and regions. ```json { "$schema": "https://openapi.vercel.sh/vercel.json", "buildCommand": "pnpm run build", "outputDirectory": "dist", "framework": "vite", "cleanUrls": true, "trailingSlash": false, "headers": [ { "source": "/(.*)", "headers": [{ "key": "X-Frame-Options", "value": "DENY" }] } ], "rewrites": [ { "source": "/api/:path*", "destination": "https://api.example.com/:path*" }, { "source": "/(.*)", "destination": "/index.html" } ], "redirects": [ { "source": "/old-docs/:path*", "destination": "/docs/:path*", "permanent": true } ], "regions": ["iad1"] } ``` -------------------------------- ### Get GIF Duration with @remotion/gif Source: https://github.com/oakoss/agent-skills/blob/main/skills/remotion/references/media-and-assets.md Install `@remotion/gif` to use `getGifDurationInSeconds` for determining the duration of animated GIF files. ```tsx import { getGifDurationInSeconds } from '@remotion/gif'; const duration = await getGifDurationInSeconds(staticFile('animation.gif')); ``` -------------------------------- ### Install and Use Tools Source: https://github.com/oakoss/agent-skills/blob/main/skills/mise/references/tool-management.md Use `mise use` to install a tool and automatically update the `mise.toml` file. Pin an exact version using the `--pin` flag for precise control. ```bash mise use node@22 mise use python@3.12 mise use go@1.22 mise use terraform@1.7 ``` ```bash mise use --pin node@22.11.0 ``` ```bash mise use -g node@22 ``` -------------------------------- ### Basic SQLite Database Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/bun-runtime/references/runtime-apis.md Initialize a SQLite database file and set the journal mode to WAL for improved performance. Includes creating a 'users' table with basic schema. ```typescript import { Database } from 'bun:sqlite'; const db = new Database('app.db'); db.exec('PRAGMA journal_mode = WAL'); db.exec(` CREATE TABLE IF NOT EXISTS users ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT UNIQUE NOT NULL ) `); ``` -------------------------------- ### Configure Key Sequences Source: https://github.com/oakoss/agent-skills/blob/main/skills/ghostty/references/configuration.md Example of setting up keybinds that involve a sequence of key presses, indicated by `>`. Useful for custom shortcuts. ```text keybind = ctrl+a>1=goto_tab:1 ``` ```text keybind = ctrl+a>2=goto_tab:2 ``` -------------------------------- ### Configure Static Routes in Service Worker Install Event Source: https://github.com/oakoss/agent-skills/blob/main/skills/service-worker/references/static-routing.md Define static routes within the 'install' event of a service worker. This setup allows for bypassing the fetch handler for specified URL patterns and request methods. ```typescript self.addEventListener('install', (event: ExtendableEvent) => { const installEvent = event as ExtendableEvent & { addRoutes: (routes: StaticRoute[]) => void; }; if (!('addRoutes' in installEvent)) { return; } installEvent.addRoutes([ { condition: { urlPattern: new URLPattern({ pathname: '/api/*' }), requestMethod: 'GET', runningStatus: 'not-running', }, source: 'network', }, { condition: { urlPattern: new URLPattern({ pathname: '/' }), runningStatus: 'not-running', }, source: 'race-network-and-fetch-handler', }, { condition: { urlPattern: new URLPattern({ pathname: '/analytics/*' }), }, source: 'network', }, { condition: { urlPattern: new URLPattern({ pathname: '/static/*' }), }, source: { type: 'cache', cacheName: 'static-assets', }, }, ]); }); ``` -------------------------------- ### Initialize a shadcn Project Source: https://github.com/oakoss/agent-skills/blob/main/skills/shadcn-ui/references/cli-and-registry.md Sets up configuration, installs dependencies, adds the `cn` utility, and configures CSS variables. Supports framework auto-detection. ```bash npx shadcn@latest init ``` ```bash npx shadcn@latest init --defaults ``` ```bash npx shadcn@latest init --base-color slate --template next ``` ```bash npx shadcn@latest init button card dialog ``` -------------------------------- ### Full React Example Setup Source: https://github.com/oakoss/agent-skills/blob/main/skills/pglite/references/multi-tab-worker.md Integrate `PGliteWorker` with React using `PGliteProvider`. This example demonstrates setting up the worker file, creating a `PGliteWorker` instance, and providing it to the React application, enabling seamless use of PGlite hooks. ```typescript // pglite-worker.ts import { PGlite } from '@electric-sql/pglite'; import { worker } from '@electric-sql/pglite/worker'; import { live } from '@electric-sql/pglite/live'; worker({ async init() { return await PGlite.create({ dataDir: 'idb://my-app', relaxedDurability: true, extensions: { live }, }); }, }); ``` ```typescript // db.ts import { PGliteWorker } from '@electric-sql/pglite/worker'; import { live } from '@electric-sql/pglite/live'; export const db = new PGliteWorker( new Worker(new URL('./pglite-worker.ts', import.meta.url), { type: 'module', }), { extensions: { live }, }, ); ``` ```tsx // App.tsx import { PGliteProvider } from '@electric-sql/pglite-react'; import { db } from './db'; function App() { return ( ); } ``` -------------------------------- ### Initialize Mise Project Source: https://github.com/oakoss/agent-skills/blob/main/skills/mise/references/configuration.md Create a new `mise.toml` with common defaults using `mise init`, or manually add tools using `mise use`. ```bash # Create a new mise.toml with common defaults mise init ``` ```bash # Or manually create mise.toml and add tools mise use node@22 mise use python@3.12 ``` -------------------------------- ### Configure Project-Level Agent Hooks Source: https://github.com/oakoss/agent-skills/blob/main/skills/meta-agent-creator/references/agent-configuration.md Set up project-level hooks in `settings.json` to respond to agent lifecycle events like starting or stopping. This example configures a script to run when a 'db-agent' starts and another for general cleanup when any agent stops. ```json { "hooks": { "SubagentStart": [ { "matcher": "db-agent", "hooks": [ { "type": "command", "command": "./scripts/setup-db-connection.sh" } ] } ], "SubagentStop": [ { "hooks": [{ "type": "command", "command": "./scripts/cleanup.sh" }] } ] } } ``` -------------------------------- ### Start Services with Docker Compose Profiles Source: https://github.com/oakoss/agent-skills/blob/main/skills/docker/references/compose.md Start only the default services by running 'docker compose up'. To include services defined under a specific profile, use the '--profile' flag, for example, 'docker compose --profile debug up'. ```bash # Start default services only docker compose up # Start with debug tools docker compose --profile debug up ``` -------------------------------- ### Context API Before Zustand Source: https://github.com/oakoss/agent-skills/blob/main/skills/zustand/references/migration.md Example of React Context API setup for managing state, including a provider and a custom hook. ```ts const CountContext = createContext(null); function CountProvider({ children }) { const [count, setCount] = useState(0); return ( setCount((c) => c + 1) }}> {children} ); } function useCount() { const context = useContext(CountContext); if (!context) throw new Error('useCount must be within CountProvider'); return context; } ``` -------------------------------- ### Configure Release Settings and Changelog Generation with release-plz Source: https://github.com/oakoss/agent-skills/blob/main/skills/rust/references/release-pipeline.md Set up release-plz configuration in release-plz.toml, including enabling publishing, Git releases, and specifying changelog configuration. This example also shows per-package settings for version checking and publishing. ```toml # release-plz.toml [workspace] changelog_config = "cliff.toml" publish = true git_release_enable = true git_tag_enable = true [[package]] name = "my-crate" semver_check = true [[package]] name = "my-internal-crate" publish = false ``` -------------------------------- ### Execution Boundary Examples - TanStack Start Source: https://github.com/oakoss/agent-skills/blob/main/skills/tanstack-start/references/file-organization.md Demonstrates the usage of `createServerFn`, `createServerOnlyFn`, `createClientOnlyFn`, and `createIsomorphicFn` for defining execution boundaries. ```typescript import { createServerFn, createServerOnlyFn, createClientOnlyFn, createIsomorphicFn, } from '@tanstack/react-start'; // RPC: runs on server, callable from client via network request const fetchUser = createServerFn().handler(async () => { return await db.users.findFirst(); }); // Server-only: crashes if called from client const getSecret = createServerOnlyFn(() => process.env.DATABASE_URL); // Client-only: crashes if called from server const saveToStorage = createClientOnlyFn((data: unknown) => { localStorage.setItem('data', JSON.stringify(data)); }); // Different implementations per environment const logger = createIsomorphicFn() .server((msg: string) => serverLogger.info(msg)) .client((msg: string) => console.log(`[CLIENT]: ${msg}`)); ``` -------------------------------- ### Initialize Project as Library with uv Source: https://github.com/oakoss/agent-skills/blob/main/skills/python-uv/references/project-management.md Initialize a project specifically as a library using the '--lib' flag. This sets up a 'src/' directory structure and includes a 'py.typed' marker. ```bash uv init --lib my-lib ``` ```text my-lib/ pyproject.toml src/ my_lib/ __init__.py py.typed ``` -------------------------------- ### Configure adapter-auto Source: https://github.com/oakoss/agent-skills/blob/main/skills/svelte/references/adapters-deployment.md Use adapter-auto to automatically select the best adapter for your deployment environment. This is the default and recommended for getting started. ```javascript import adapter from '@sveltejs/adapter-auto'; /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { adapter: adapter(), }, }; export default config; ``` -------------------------------- ### Initialize pg_partman Source: https://github.com/oakoss/agent-skills/blob/main/skills/postgres-tuning/references/pooling-and-patterns.md Installs the pg_partman extension and creates a parent table configuration for automated partitioning. 'p_premake' creates future partitions in advance. ```sql CREATE EXTENSION pg_partman; SELECT partman.create_parent( p_parent_table => 'public.events', p_control => 'occurred_at', p_interval => 'monthly', p_premake => 3 ); ``` -------------------------------- ### useDebouncedCallback Hook Example Source: https://github.com/oakoss/agent-skills/blob/main/skills/tanstack-pacer/references/react-integration.md Use `useDebouncedCallback` to get a stable debounced function reference. Ideal for event handlers and simple callbacks. ```tsx import { useDebouncedCallback } from '@tanstack/react-pacer'; function SearchInput() { const handleSearch = useDebouncedCallback( (query: string) => fetchSearchResults(query), { wait: 500 }, ); return handleSearch(e.target.value)} />; } ```