### Initial Authentication Setup Workflow Source: https://github.com/practicalswan/agent-skills/blob/main/notebooklm-management/references/workflows.md Guides the user through the first-time authentication setup for NotebookLM, which involves opening a browser for Google OAuth. Requires internet connection and browser permissions. ```python def initial_authentication_setup(): """Complete first-time authentication setup""" print("=== NotebookLM Authentication Setup ===") print("This will open a browser window for Google OAuth.") print("\nRequirements:") print("• Google account with NotebookLM access") print("• Browser window permission") print("• Internet connection\n") proceed = input("Proceed? (yes/no): ").lower() if proceed != "yes": print("Setup cancelled.") return False print("\nOpening browser for authentication...") notebooklm.auth_setup() print("\n✓ Authentication complete!") print("\nVerifying health...") health_status = get_health() if health_status.get("status") == "authenticated": print("✓ Successfully authenticated!") return True else: print("✗ Authentication may have failed.") print("Please run authentication again or check troubleshoot guide.") return False ``` -------------------------------- ### Create New Project with shadcn/ui Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-shadcn-ui/resources/setup-guide.md Use this command to start a new project with shadcn/ui. It offers an interactive setup to customize framework, style, and more. ```bash npx shadcn@latest create ``` -------------------------------- ### Run NotebookLM Authentication Setup Source: https://github.com/practicalswan/agent-skills/blob/main/notebooklm-management/references/troubleshooting.md Use this command for the initial authentication setup. It opens a browser for OAuth, requests Google account login and NotebookLM permissions, and saves credentials locally. Verify setup with a health check. ```python # Run authentication setup notebooklm.auth-setup() # This will: # 1. Open browser for OAuth flow # 2. Request Google account login # 3. Request NotebookLM permissions # 4. Save session credentials locally # After setup, verify with health check get_health() ``` -------------------------------- ### Add Individual shadcn/ui Components Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-design/references/shadcn-components.md Install specific shadcn/ui components using the 'add' command. This example shows how to add 'button', 'card', and 'dialog'. ```bash npx shadcn-ui@latest add button npx shadcn-ui@latest add card npx shadcn-ui@latest add dialog ``` -------------------------------- ### Manual Setup for Vite + React Project Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-shadcn-ui/resources/setup-guide.md Steps to manually set up shadcn/ui in a Vite + React project. This involves creating the Vite project, installing Tailwind CSS, initializing shadcn/ui, and adding components. ```bash npm create vite@latest my-app -- --template react-ts cd my-app npm install npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p npx shadcn@latest init npx shadcn@latest add button ``` -------------------------------- ### YAML Configuration Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/nvinfer_config.md Example of nvinfer configuration using the recommended YAML format. ```yaml property: gpu-id: 0 net-scale-factor: 0.00392156862745098 onnx-file: /path/to/model.onnx batch-size: 1 # ... more properties class-attrs-all: topk: 20 pre-cluster-threshold: 0.2 ``` -------------------------------- ### GitHub Actions npm Cache Setup Source: https://github.com/practicalswan/agent-skills/blob/main/devops-tooling/examples/github-actions-templates.md Sets up Node.js and enables npm caching for faster dependency installation. ```yaml # .github/workflows/caching-examples.yml name: Caching Reference on: workflow_dispatch: jobs: npm-cache: name: npm with built-in cache runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - run: npm ci ``` -------------------------------- ### Multi-Stream Camera Configuration Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/tracker_config.md This snippet demonstrates how to configure camera calibration files for multi-stream setups. Each stream requires its own calibrated camera information file due to varying positions and orientations. ```yaml ObjectModelProjection: cameraModelFilepath: - configs/camInfo_stream0.yml # stream 0 - configs/camInfo_stream1.yml # stream 1 - configs/camInfo_stream2.yml # stream 2 outputVisibility: 1 outputFootLocation: 1 outputConvexHull: 1 minPoseConfidence: 0.5 ``` -------------------------------- ### Start Benchmark Timer Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-import-vision-model/references/engine-build.md Records the start time for Step 5 of the benchmarking process. ```bash STEP5_START=$(date +%s.%N) ``` -------------------------------- ### Install Tracker Support (libmosquitto) Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/docker_containers.md Installs the libmosquitto1 package, which may be required for certain tracker functionalities. ```bash apt-get install -y libmosquitto1 ``` -------------------------------- ### INI-style Configuration Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/nvinfer_config.md Example of nvinfer configuration using the INI-style text format. ```ini [property] gpu-id=0 net-scale-factor=0.00392156862745098 onnx-file=/path/to/model.onnx batch-size=1 # ... more properties [class-attrs-all] topk=20 pre-cluster-threshold=0.2 ``` -------------------------------- ### Setup Instructions for Icon Libraries Source: https://github.com/practicalswan/agent-skills/blob/main/excalidraw-diagram-generator/SKILL.md Use these instructions when a user requests specific architecture icons that are not yet available. This involves downloading a library, placing it correctly, and running a script to split it into individual icons. ```text To use [AWS/GCP/Azure/etc.] architecture icons, please follow these steps: 1. Visit https://libraries.excalidraw.com/ 2. Search for "[AWS Architecture Icons/etc.]" and download the .excalidrawlib file 3. Create directory: skills/excalidraw-diagram-generator/libraries/[icon-set-name]/ 4. Place the downloaded file in that directory 5. Run the splitter script: python skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py skills/excalidraw-diagram-generator/libraries/[icon-set-name]/ This will split the library into individual icon files for efficient use. After setup is complete, I can create your diagram using the actual AWS/cloud icons. Alternatively, I can create the diagram now using simple shapes (rectangles, ellipses) which you can later replace with icons manually in Excalidraw. ``` -------------------------------- ### Install rag-perf with uv Source: https://github.com/practicalswan/agent-skills/blob/main/rag-perf/SKILL.md Installs the rag-perf package into its own uv-managed virtual environment. Use this for basic setup. ```bash uv sync --project scripts/rag-perf ``` -------------------------------- ### NVIDIA Container Toolkit Installation Message Source: https://github.com/practicalswan/agent-skills/blob/main/rag-blueprint/references/deploy.md Guides the user to install the NVIDIA Container Toolkit if it is missing and required for self-hosted deployments. ```shell Install NVIDIA Container Toolkit. See https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html ``` -------------------------------- ### Set up Cosmos DB Emulator Source: https://github.com/practicalswan/agent-skills/blob/main/microsoft-development/examples/azure-function-api-example.md Instructions for setting up the Cosmos DB Emulator, either by downloading for Windows or using a Docker container. ```bash # Windows: Download from https://aka.ms/cosmosdb-emulator # Docker: docker run -p 8081:8081 -p 10250-10255:10250-10255 mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator ``` -------------------------------- ### Example File Structure Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-shadcn-ui/resources/setup-guide.md Illustrates a typical project structure for integrating shadcn/ui components. ```tree src/ ├── components/ │ └── ui/ ├── lib/ │ └── utils.ts └── index.css (or globals.css) ``` -------------------------------- ### Get Stream Info using curl Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/rest_api_dynamic.md Example curl command to retrieve information about the current streams using the GET /api/v1/stream/get-stream-info endpoint. ```bash # Get stream info curl -X GET 'http://localhost:9000/api/v1/stream/get-stream-info' ``` -------------------------------- ### Complete MCP Server Example Source: https://github.com/practicalswan/agent-skills/blob/main/mcp-builder/reference/node_mcp_server.md This script sets up an MCP server for the Example Service, including user search functionality. It requires the EXAMPLE_API_KEY environment variable and can run via stdio or HTTP transport. ```typescript #!/usr/bin/env node /** * MCP Server for Example Service. * * This server provides tools to interact with Example API, including user search, * project management, and data export capabilities. */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; import axios, { AxiosError } from "axios"; // Constants const API_BASE_URL = "https://api.example.com/v1"; const CHARACTER_LIMIT = 25000; // Enums enum ResponseFormat { MARKDOWN = "markdown", JSON = "json" } // Zod schemas const UserSearchInputSchema = z.object({ query: z.string() .min(2, "Query must be at least 2 characters") .max(200, "Query must not exceed 200 characters") .describe("Search string to match against names/emails"), limit: z.number() .int() .min(1) .max(100) .default(20) .describe("Maximum results to return"), offset: z.number() .int() .min(0) .default(0) .describe("Number of results to skip for pagination"), response_format: z.nativeEnum(ResponseFormat) .default(ResponseFormat.MARKDOWN) .describe("Output format: 'markdown' for human-readable or 'json' for machine-readable") }).strict(); type UserSearchInput = z.infer; // Shared utility functions async function makeApiRequest( endpoint: string, method: "GET" | "POST" | "PUT" | "DELETE" = "GET", data?: any, params?: any ): Promise { try { const response = await axios({ method, url: `${API_BASE_URL}/${endpoint}`, data, params, timeout: 30000, headers: { "Content-Type": "application/json", "Accept": "application/json" } }); return response.data; } catch (error) { throw error; } } function handleApiError(error: unknown): string { if (error instanceof AxiosError) { if (error.response) { switch (error.response.status) { case 404: return "Error: Resource not found. Please check the ID is correct."; case 403: return "Error: Permission denied. You don't have access to this resource."; case 429: return "Error: Rate limit exceeded. Please wait before making more requests."; default: return `Error: API request failed with status ${error.response.status}`; } } else if (error.code === "ECONNABORTED") { return "Error: Request timed out. Please try again."; } } return `Error: Unexpected error occurred: ${error instanceof Error ? error.message : String(error)}`; } // Create MCP server instance const server = new McpServer({ name: "example-mcp", version: "1.0.0" }); // Register tools server.registerTool( "example_search_users", { title: "Search Example Users", description: `[Full description as shown above]`, inputSchema: UserSearchInputSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true } }, async (params: UserSearchInput) => { // Implementation as shown above } ); // Main function // For stdio (local): async function runStdio() { if (!process.env.EXAMPLE_API_KEY) { console.error("ERROR: EXAMPLE_API_KEY environment variable is required"); process.exit(1); } const transport = new StdioServerTransport(); await server.connect(transport); console.error("MCP server running via stdio"); } // For streamable HTTP (remote): async function runHTTP() { if (!process.env.EXAMPLE_API_KEY) { console.error("ERROR: EXAMPLE_API_KEY environment variable is required"); process.exit(1); } const app = express(); app.use(express.json()); app.post('/mcp', async (req, res) => { const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined, enableJsonResponse: true }); res.on('close', () => transport.close()); await server.connect(transport); await transport.handleRequest(req, res, req.body); }); const port = parseInt(process.env.PORT || '3000'); app.listen(port, () => { console.error(`MCP server running on http://localhost:${port}/mcp`); }); } // Choose transport based on environment const transport = process.env.TRANSPORT || 'stdio'; if (transport === 'http') { runHTTP().catch(error => { console.error("Server error:", error); process.exit(1); }); } else { runStdio().catch(error => { console.error("Server error:", error); process.exit(1); }); } ``` -------------------------------- ### Explicitly State Package Dependencies Source: https://github.com/practicalswan/agent-skills/blob/main/writing-skills/anthropic-best-practices.md Clearly list required package installations before providing code examples. This ensures users know what needs to be installed to run the script. ```markdown Install required package: `pip install pypdf` Then use it: ```python from pypdf import PdfReader reader = PdfReader("file.pdf") ``` ``` -------------------------------- ### DeepStream Configuration Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-import-vision-model/references/report-generation.md Example of nvinfer configuration key fields, typically used in DeepStream applications. This block shows essential parameters for inference engine setup. ```ini [property] gpu-id=0 net-scale-factor=0.00392156862745098 ... (other parameters) ``` -------------------------------- ### Run Example Validation for Various Languages Source: https://github.com/practicalswan/agent-skills/blob/main/code-examples-sync/references/verification.md Execute these commands to validate code examples for JavaScript/TypeScript, Python, Rust, and Go. Ensure your project has the necessary tools and dependencies installed. ```bash # Example validation for various languages ``` ```bash npm run docs:test-examples # JavaScript/TypeScript ``` ```bash python -m doctest docs/ # Python ``` ```bash cargo test --doc # Rust ``` ```bash go test -run=Doc # Go ``` -------------------------------- ### AMQP Configuration File Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/kafka_messaging.md Example configuration for connecting to a RabbitMQ server, including hostname, port, credentials, and exchange details. ```ini [message-broker] hostname = localhost port = 5672 username = guest password = guest exchange = amq.topic topic = deepstream-analytics amqp-framesize = 131072 ``` -------------------------------- ### Local Testing Source: https://github.com/practicalswan/agent-skills/blob/main/microsoft-development/examples/azure-function-api-example.md Examples of how to test the API endpoints locally using curl after starting the function app. ```APIDOC ## Local Development ### Run Locally ```bash # Start function app func start # Test endpoints curl http://localhost:7071/api/recipes curl -X POST http://localhost:7071/api/recipes \ -H "Content-Type: application/json" \ -d '{"title":"Test Pasta","description":"Delicious","ingredients":["pasta","sauce"],"instructions":["boil","mix"],"prepTimeMinutes":20}' # OpenAPI/Swagger UI # Navigate to http://localhost:7071/api/swagger/ui ``` ``` -------------------------------- ### Install Tailwind CSS and Initialize Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-shadcn-ui/resources/setup-guide.md Installs Tailwind CSS and its peer dependencies, then initializes Tailwind CSS with PostCSS and Autoprefixer. ```bash npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p ``` -------------------------------- ### Install MQTT Broker and Clients Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/troubleshooting.md Install the `mosquitto` broker and `mosquitto-clients` packages if you need to run an MQTT broker locally or use CLI testing tools. ```bash sudo apt-get install -y mosquitto # broker daemon sudo apt-get install -y mosquitto-clients # CLI tools (mosquitto_pub, mosquitto_sub) ``` -------------------------------- ### GitHub Actions Workflow for Playwright Tests Source: https://github.com/practicalswan/agent-skills/blob/main/web-testing/references/test-patterns.md This workflow automates the checkout, Node.js setup, dependency installation, Playwright installation, test execution, and artifact upload for Playwright tests on every push or pull request. ```yaml name: Playwright Tests on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci - run: npx playwright install --with-deps - run: npx playwright test - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: name: playwright-report path: playwright-report/ retention-days: 30 ``` -------------------------------- ### GitHub Actions pip Cache Setup Source: https://github.com/practicalswan/agent-skills/blob/main/devops-tooling/examples/github-actions-templates.md Sets up Python and enables pip caching for faster package installation. ```yaml pip-cache: name: pip with built-in cache runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.12' cache: 'pip' - run: pip install -r requirements.txt ``` -------------------------------- ### Install ffmpeg for Video Preparation Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/docker_containers.md Installs ffmpeg and related libraries, useful for sample video preparation scripts. ```bash apt-get install --reinstall libflac8 libmp3lame0 libxvidcore4 ffmpeg ``` -------------------------------- ### Configuration File Example Source: https://github.com/practicalswan/agent-skills/blob/main/documentation-patterns/references/config-templates.md This template illustrates the structure of a configuration file. It includes a table for detailing options and a sample YAML configuration. ```yaml optionName: value ``` -------------------------------- ### Manual Setup for Next.js Project Source: https://github.com/practicalswan/agent-skills/blob/main/stitch-shadcn-ui/resources/setup-guide.md Follow these steps to manually set up shadcn/ui in an existing or new Next.js project. This includes initializing the project, initializing shadcn/ui, and adding components. ```bash npx create-next-app@latest my-app cd my-app npx shadcn@latest init npx shadcn@latest add button ``` -------------------------------- ### RabbitMQ Queue and Binding Setup Commands Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/kafka_messaging.md Commands to enable the RabbitMQ management plugin, declare a queue, and bind it to an exchange. ```bash sudo rabbitmq-plugins enable rabbitmq_management sudo rabbitmqadmin -u guest -p guest -V / declare queue name=myqueue durable=false auto_delete=true rabbitmqadmin -u guest -p guest -V / declare binding source=amq.topic destination=myqueue routing_key=deepstream-analytics ``` -------------------------------- ### Front-Loading Key Information Example Source: https://github.com/practicalswan/agent-skills/blob/main/documentation-authoring/references/writing-style-guide.md Shows how to place the most important information at the beginning of a sentence to improve comprehension and guide the reader's attention effectively. ```text To deploy, run `npm run build` first. ``` ```text Before you can deploy your application to the production server, you need to first run `npm run build`. ``` -------------------------------- ### Check Pipeline Readiness using curl Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/rest_api_dynamic.md Example curl command to check the DeepStream pipeline's readiness state using the GET /api/v1/health/get-dsready-state endpoint. ```bash # Check pipeline readiness curl -X GET 'http://localhost:9000/api/v1/health/get-dsready-state' ``` -------------------------------- ### Continuity: Sequential Steps Example Source: https://github.com/practicalswan/agent-skills/blob/main/canvas-design/references/design-principles.md Shows how elements arranged along a line are perceived as more related. A connecting line guides the eye and implies order in sequential steps. ```text Step 1 ──────── Step 2 ──────── Step 3 ──────── Step 4 ● ● ● ○ The connecting line guides the eye and implies order. ``` -------------------------------- ### Skill Directory Structure Example Source: https://github.com/practicalswan/agent-skills/blob/main/writing-skills/SKILL.md Illustrates the standard directory structure for a skill, including the main SKILL.md file and optional supporting files. ```bash skills/ skill-name/ SKILL.md # Main reference (required) supporting-file.* # Only if needed ``` -------------------------------- ### Document Modification Workflow Source: https://github.com/practicalswan/agent-skills/blob/main/writing-skills/anthropic-best-practices.md Guide Claude through decision points for document modification. This example outlines distinct workflows for creating new content versus editing existing content. ```markdown ## Document modification workflow 1. Determine the modification type: **Creating new content?** → Follow "Creation workflow" below **Editing existing content?** → Follow "Editing workflow" below 2. Creation workflow: - Use docx-js library - Build document from scratch - Export to .docx format 3. Editing workflow: - Unpack existing document - Modify XML directly - Validate after each change - Repack when complete ``` -------------------------------- ### MQTT Configuration File (cfg_mqtt.txt) Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/kafka_messaging.md Example configuration for the MQTT protocol adaptor. Customize client ID, TLS settings, and threading options. ```ini [message-broker] # Username for broker authentication (deprecated - use env var) #username = user # Password for broker authentication (deprecated - use env var) #password = password # Unique client ID (empty = random) client-id = deepstream-client # TLS Configuration #enable-tls = 1 #tls-cafile = /path/to/ca-cert.pem #tls-capath = /path/to/ca-certs-dir/ #tls-certfile = /path/to/client-cert.pem #tls-keyfile = /path/to/client-key.pem # Connection sharing #share-connection = 1 # Mosquitto loop timeout in ms #loop-timeout = 2000 # Keep-alive interval in seconds #keep-alive = 60 # Enable threaded mode (required for nvmsgbroker plugin) #set-threaded = 1 ``` -------------------------------- ### Azure IoT Configuration File Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/kafka_messaging.md Example configuration for connecting to Azure IoT Hub, including connection string and custom message properties. ```ini [message-broker] #connection_str = HostName=.azure-devices.net;DeviceId=;SharedAccessKey= #custom_msg_properties = key1=value1;key2=value2; #share-connection = 1 #cleanup-timeout = 20 ``` -------------------------------- ### Setup isolated virtual environment for ONNX export Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-import-vision-model/references/model-acquire.md This script sets up and activates a shared virtual environment for model conversion tools like optimum, transformers, and torch. It ensures that these heavy dependencies are installed once and reused across models, preventing system pollution and saving installation time. The venv is located at build/.venv_optimum. ```bash mkdir -p build VENV=build/.venv_optimum if [ ! -x "$VENV/bin/optimum-cli" ]; then python3 -m venv "$VENV" source "$VENV/bin/activate" pip install --upgrade pip pip install optimum[exporters] torch transformers safetensors onnxruntime matplotlib numpy markdown else source "$VENV/bin/activate" fi ``` -------------------------------- ### Setup Python Virtual Environment Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-import-vision-model/SKILL.md Creates and populates a shared Python virtual environment for model development. Installs necessary packages like optimum, torch, transformers, onnxruntime, and matplotlib. ```bash mkdir -p build VENV=build/.venv_optimum if [ ! -x "$VENV/bin/python3" ]; then python3 -m venv "$VENV" "$VENV/bin/pip" install --upgrade pip -q "$VENV/bin/pip" install "optimum[exporters]>=1.20,<2.0" "torch<2.12" \ transformers onnxruntime matplotlib numpy markdown -q fi ``` -------------------------------- ### Example Skill Directory Structure Source: https://github.com/practicalswan/agent-skills/blob/main/writing-skills/anthropic-best-practices.md Illustrates a recommended directory structure for a skill, separating the main SKILL.md from reference files organized by domain. This structure helps Claude efficiently access information on demand. ```bash bigquery-skill/ ├── SKILL.md (overview, points to reference files) └── reference/ ├── finance.md (revenue metrics) ├── sales.md (pipeline data) └── product.md (usage analytics) ``` -------------------------------- ### SmartRecordConfig Example Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/utilities_config.md Example demonstrating the creation of a SmartRecordConfig object with specific paths and settings for smart recording. This includes setting cache, container format, directory, and mode. ```python from pyservicemaker import SmartRecordConfig # Create smart recording configuration sr_config = SmartRecordConfig( proto_lib="/opt/nvidia/deepstream/deepstream/lib/libnvds_kafka_proto.so", conn_str="localhost;9092", msgconv_config_file="/opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor/cfg_kafka.txt", proto_config_file="/opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor/cfg_kafka.txt", topic_list="sr-events", smart_rec_cache=30, # 30 seconds cache smart_rec_container=0, # MP4 format smart_rec_dir_path="./recordings", smart_rec_mode=0 # Record audio and video ) ``` -------------------------------- ### Setup Virtual Environment with Pyservicemaker Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/SKILL.md When a task requires a Python virtual environment for dependencies like model downloads, ensure pyservicemaker and pyyaml are installed within that venv. This prevents ModuleNotFoundError. ```bash python3 -m venv venv source venv/bin/activate pip install /opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl pyyaml pip install -r requirements.txt # other dependencies ``` -------------------------------- ### Multi-Source Pipeline Configuration (INI) Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-dev/references/kafka_messaging.md This INI-style configuration example illustrates how to set up sensor and place entries for multi-source pipelines. Sensor entries map to source IDs, and place entries also map to source IDs. ```ini # Sensor entries map to source_id in the pipeline [sensor0] enable=1 type=Camera id=STREAM_0 description=Camera 0 [sensor1] enable=1 type=Camera id=STREAM_1 description=Camera 1 # Place entries map to source_id [place0] enable=1 id=0 type=intersection name=Location_0 [place1] enable=1 id=1 type=intersection name=Location_1 ``` -------------------------------- ### Install Microsoft Learn Docs MCP Source: https://github.com/practicalswan/agent-skills/blob/main/microsoft-development/references/microsoft-learn-mcp.md Use this command to install the Microsoft Learn Docs MCP tool globally. ```bash npx -y @microsoft/learn-docs-mcp ``` -------------------------------- ### PHP Session Management Class Source: https://github.com/practicalswan/agent-skills/blob/main/php-development/SKILL.md A utility class for managing PHP sessions, including starting sessions, setting and getting session variables, removing variables, destroying the session, and regenerating the session ID. ```php /dev/null || echo "NO_DOCKER"; echo "=== GPU ===" && nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null || echo "NO_GPU"; echo "=== PYTHON ===" && python3 --version 2>/dev/null || echo "NO_PYTHON"; echo "=== PKG_MANAGER ===" && which uv 2>/dev/null && echo "UV_AVAILABLE" || (which pip3 2>/dev/null && echo "PIP_AVAILABLE" || echo "NO_PKG_MANAGER"); echo "=== VENV ===" && ls -d .venv/ venv/ nvidia-rag-env/ 2>/dev/null || echo "NO_EXISTING_VENV"; echo "=== INSTALLED ===" && pip3 show nvidia_rag 2>/dev/null | head -3 || echo "NOT_INSTALLED" ``` -------------------------------- ### Install System Tools Source: https://github.com/practicalswan/agent-skills/blob/main/deepstream-import-vision-model/SKILL.md Installs required system utilities like wkhtmltopdf and mediainfo if they are not already present. Also checks for the presence of deepstream-app. ```bash which wkhtmltopdf || apt-get install -y wkhtmltopdf ``` ```bash which mediainfo || apt-get install -y mediainfo ``` ```bash which deepstream-app # required for KITTI dump (Step 6g) and benchmark perf-measurement (Step 7c); shipped with DeepStream SDK ``` -------------------------------- ### CI Quality Gate Workflow Source: https://github.com/practicalswan/agent-skills/blob/main/code-quality/SKILL.md An example GitHub Actions workflow for a CI quality gate. It checks out code, sets up Node.js, installs dependencies, runs linting, checks formatting, runs tests with coverage, and performs a SonarQube scan. This gate fails fast on issues before code review. ```yaml jobs: quality: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - run: npm ci - run: npm run lint - run: npm run format:check - run: npm test -- --coverage - run: sonar-scanner ```