### Install Forem API Skill and Publish Article (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Installs the Forem API skill from the SkillsForge marketplace and provides an example prompt for publishing an article to DEV.to. Requires the 'forem-api' skill to be installed. ```bash # Install the Forem API skill /plugin install forem-api@skillsforge-marketplace # Create a new article Hey Claude, can you publish my article in article.md to DEV.to? ``` -------------------------------- ### Basic Linode Python Client Setup Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/linode-api/SKILL.md Demonstrates a fundamental setup pattern for the Linode Python client. It shows how to initialize the client with a token and then access resources like regions and instances. This serves as a starting point for most Python-based Linode API interactions. ```python from linode import LinodeClient # Initialize the client token = "your-personal-access-token" client = LinodeClient(token) # Now you can access resources regions = client.get_regions() instances = client.linode.get_instances() ``` -------------------------------- ### Vision Models with Structured Outputs Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-txt.md This example demonstrates using the `format` parameter with vision models to get deterministic descriptions of images in a structured format. ```bash curl http://localhost:11434/api/chat -d '{ "model": "llava", "messages": [ { "role": "user", "content": "Describe this image in a JSON object with a 'description' key.", "image": "base64_encoded_image_data" } ], "format": "json" }' ``` -------------------------------- ### Install Laravel Skills and Use Features (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Installs Laravel-specific skills from the SkillsForge marketplace and provides an example prompt for using Laravel features, such as creating an Artisan command. Requires 'laravel' and 'laravel-prompts' skills. ```bash # Install Laravel skills /plugin install laravel@skillsforge-marketplace /plugin install laravel-prompts@skillsforge-marketplace # Use Laravel-specific features Help me create a new Artisan command with interactive prompts ``` -------------------------------- ### Marketplace Integration Example (Python SDK) Source: https://context7.com/rawveg/skillsforge-marketplace/llms.txt Shows an example of integrating with the SkillsForge Marketplace using a Python SDK. This demonstrates a programmatic approach to discovering, installing, and utilizing skills within a Python application. ```python # Example: Using a hypothetical Python SDK for SkillsForge Marketplace # (This is a conceptual example, actual SDK methods will vary) from skillsforge_sdk import SkillsForgeClient client = SkillsForgeClient(api_key="YOUR_API_KEY") # Install a skill try: client.install_skill(skill_id="vercel-deployment") print("Vercel deployment skill installed successfully.") except Exception as e: print(f"Error installing skill: {e}") # Use a skill (e.g., trigger a deployment) project_config = { "repository_url": "https://github.com/user/repo.git", "branch": "main" } try: deployment_result = client.run_skill("vercel-deployment", config=project_config) print(f"Deployment successful: {deployment_result}") except Exception as e: print(f"Error during deployment: {e}") ``` -------------------------------- ### Run a Model with Ollama CLI Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-txt.md This example demonstrates how to run a model using the Ollama command-line interface. It shows the basic command to start an interactive session with a specified model. ```bash ollama run gemma3 ``` -------------------------------- ### Install and Setup Laravel Cashier Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/laravel-cashier-stripe/SKILL.md Commands to install Laravel Cashier via Composer, publish its migrations, and run them to set up the necessary database tables. Optionally, it also shows how to publish the configuration file. ```bash # Install Cashier composer require laravel/cashier # Publish migrations and migrate php artisan vendor:publish --tag="cashier-migrations" php artisan migrate # Publish config (optional) php artisan vendor:publish --tag="cashier-config" ``` -------------------------------- ### FLUX 1.1 Pro Prompt Optimization Examples (Plain Text) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/midjourney-replicate-flux/references/flux-model-optimization.md Illustrates how to craft prompts to leverage FLUX 1.1 Pro's strengths in photorealism, text rendering, complex compositions, and color accuracy. These examples demonstrate specific phrasing for achieving high-quality, detailed outputs. ```text "ultra-realistic portrait, photographic quality, accurate skin texture with visible pores, natural lighting, highly detailed, 8k resolution" ``` ```text "vintage neon sign reading 'OPEN', glowing red letters, weathered metal frame, urban nighttime photography, highly detailed" ``` ```text "bustling Tokyo street at night, multiple neon signs with Japanese text, crowds of people, reflections on wet pavement, cinematic street photography, rich detail throughout" ``` ```text "sunset over ocean, accurate warm orange and pink tones, natural color gradient, photographic color accuracy, no oversaturation" ``` -------------------------------- ### JSON Template Example for Project Configuration Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/skill-extractor/references/skill-patterns.md Shows a JSON file formatted as a template for project configuration. It contains placeholders for project name and version, signifying its role as a reusable asset. ```json { "project": "{PROJECT_NAME}", "version": "{VERSION}", "dependencies": [] } ``` -------------------------------- ### List Available Models in Ollama (curl) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-txt.md This example demonstrates how to list all the models currently available in your Ollama installation using a curl request to the /v1/models endpoint. This is useful for checking which models are ready for use. ```shell curl http://localhost:11434/v1/models ``` -------------------------------- ### Install Word Count Checker and Get Word Count (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Installs the word count checker skill and shows an example of how to get an accurate word count for a file. Requires the 'word-count-checker' skill. ```bash # Install the word count checker /plugin install word-count-checker@skillsforge-marketplace # Get accurate word counts What's the word count of my manuscript.md file? ``` -------------------------------- ### Install SkillsForge Marketplace (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Installs the entire SkillsForge marketplace to access all available skills. This is the recommended method for comprehensive access. ```bash /plugin marketplace add rawveg/skillsforge-marketplace ``` -------------------------------- ### Image Optimization API Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md Transform and optimize images to improve page load performance. This includes getting started guides, limits, pricing, and usage management. ```APIDOC ## Image Optimization API ### Description Transform and optimize images to improve page load performance. This includes getting started guides, limits, pricing, and usage management. ### Method GET, POST (specific methods depend on the operation) ### Endpoint /v10/images ### Parameters #### Path Parameters None #### Query Parameters - **url** (string) - Required - The URL of the image to optimize. - **width** (integer) - Optional - The desired width of the optimized image. - **height** (integer) - Optional - The desired height of the optimized image. - **quality** (integer) - Optional - The desired quality of the optimized image (1-100). #### Request Body None for basic optimization requests. ### Request Example ```json { "url": "https://example.com/image.jpg", "width": 500, "quality": 80 } ``` ### Response #### Success Response (200) - **url** (string) - The URL of the optimized image. #### Response Example ```json { "url": "https://cdn.vercel.com/images/optimized/example.com/image.jpg?width=500&quality=80" } ``` ``` -------------------------------- ### Start and Verify Ollama Service Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-txt.md Commands to start the Ollama service and verify that it is running. This is typically done after installation. ```bash # Start Ollama sudo systemctl start ollama # Verify Ollama is running systemctl status ollama ``` -------------------------------- ### Install Individual Skill from GitHub (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Installs a specific skill directly from its GitHub repository URL. Useful for installing skills without adding the entire marketplace. ```bash # Install directly from GitHub /plugin install https://github.com/rawveg/skillsforge-marketplace/tree/main/skill-name ``` -------------------------------- ### Deploy Hexo Blog with Vercel Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md This guide walks you through creating a Hexo blog and deploying it live on Vercel. Hexo is a fast, simple, and powerful blogging framework. ```bash # Install Hexo CLI globally npm install -g hexo-cli # Create a new Hexo blog hexo init my-hexo-blog cd my-hexo-blog # Install dependencies npm install # Generate the static site hexo generate # Deploy to Vercel vercel ``` -------------------------------- ### Laravel Dusk Installation and Setup Commands Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/laravel-dusk/SKILL.md Provides the necessary Composer command to install Laravel Dusk as a development dependency, along with artisan commands for initial setup, updating the ChromeDriver, making binaries executable, and running tests. ```bash # Install Laravel Dusk composer require laravel/dusk --dev # Run installation php artisan dusk:install # Update ChromeDriver php artisan dusk:chrome-driver # Make binaries executable (Unix) chmod -R 0755 vendor/laravel/dusk/bin/ # Run tests php artisan dusk ``` -------------------------------- ### Pinterest API Pagination Example (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/pinterest-api/SKILL.md Demonstrates how to paginate through results from the Pinterest API, showing an initial request and a follow-up request using a bookmark. This is crucial for handling large datasets efficiently. ```bash # Initial request curl -X GET "https://api.pinterest.com/v5/boards/{BOARD_ID}/pins?page_size=25" \ -H "Authorization: Bearer {ACCESS_TOKEN}" # Follow-up with bookmark from response curl -X GET "https://api.pinterest.com/v5/boards/{BOARD_ID}/pins?page_size=25&bookmark={BOOKMARK}" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Troubleshoot Node.js Dependencies Not Installed Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/figlet-text-converter/references/usage-guide.md This error message suggests that the necessary Node.js dependencies for the project are missing. To resolve this, run the 'npm install' command to install them. ```text ❌ Dependencies not installed. Please run: npm install ``` -------------------------------- ### Improve Serverless Function Cold Start Performance on Vercel Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md This guide helps you enhance the performance of your Vercel Functions by understanding and mitigating cold start latency. It provides strategies to determine if latency is due to cold starts and how to optimize them. ```javascript // Example: Optimizing a Serverless Function // api/my-function.js // Keep dependencies minimal and load them efficiently // Avoid heavy computations at the top level if possible // Example of a potentially slow initialization: // const largeLibrary = require('some-large-library'); // This might increase cold start time // Better approach: Lazy loading or only requiring what's needed let initializedService; async function getInitializedService() { if (!initializedService) { // Simulate a potentially slow initialization console.log('Initializing service...'); await new Promise(resolve => setTimeout(resolve, 500)); // Simulate async work initializedService = { /* ... service setup ... */ }; console.log('Service initialized.'); } return initializedService; } export default async function handler(req, res) { try { const service = await getInitializedService(); // Use the service... res.status(200).json({ message: 'Function executed successfully' }); } catch (error) { res.status(500).json({ message: 'Error executing function' }); } } // To further optimize: // - Choose smaller, faster Node.js runtimes if applicable. // - Keep function deployment packages small. // - Consider Vercel's Edge Functions for lower latency if your use case fits. // - Use Vercel's built-in caching mechanisms. ``` -------------------------------- ### SDK Configuration and Initialization (JavaScript) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms-full.md This snippet defines a class `d` for initializing and managing the KPSDK. It handles loading the SDK script, configuring it with provided routes, and exposing a `loaded` status. It throws an error if used in a server environment or if the KPSDK is not available. ```javascript class d { #a = !1; #b; constructor(a) { this.#b = a; } get loaded() { return this.#a; } load = async () => { this.#a || await this.#f(); }; #c = () => { if (typeof globalThis.window > "u") throw Error("KPSDK is not available in the server"); if (!window.KPSDK) throw Error("KPSDK is not loaded"); let b = this.#b.map(b => { let c = a.#e(b.path); return { domain: c.host, path: c.pathname, method: b.method }; }); try { window.KPSDK.configure(b); } catch (a) { console.error("Error configuring KPSDK...", a); } }; #f = async () => { let a = this; return new Promise((c, d) => { let e = () => { document.removeEventListener("kpsdk-load", e); this.#c(); }, f = () => { document.removeEventListener("kpsdk-ready", f); a.#a = !0; c(); }; document.addEventListener("kpsdk-load", e, { once: !0 }); document.addEventListener("kpsdk-ready", f, { once: !0 }); b("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch(a => { document.removeEventListener("kpsdk-load", e); document.removeEventListener("kpsdk-ready", f); d(a); }); }); }; static #e(a) { let b; try { b = new URL(a); } catch { b = new URL(a, location.origin); } return b; } } ``` -------------------------------- ### Install FrankenPHP via Homebrew Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/frankenphp/SKILL.md Installs FrankenPHP using the Homebrew package manager and starts a basic PHP server in the current directory. ```bash brew install dunglas/frankenphp/frankenphp frankenphp php-server ``` -------------------------------- ### List Linode Resources Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/linode-cli/SKILL.md Examples for listing various Linode resources including compute instances (Linodes), domains, volumes, and Kubernetes clusters. Shows how to format output as tables, JSON, or with custom fields. ```bash # List all Linodes on your account linode-cli linodes list # List domains linode-cli domains list # List volumes linode-cli volumes list # List Kubernetes clusters linode-cli lke clusters-list # Format output with custom fields linode-cli linodes list --format "id,label,status,region" # Output as JSON linode-cli linodes list --json # Output all available fields linode-cli linodes list --all ``` -------------------------------- ### Install Droid CLI using curl Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-full.md Installs the Droid command-line interface by downloading and executing a script from the provided URL. This is the initial setup step for Droid. ```bash curl -fsSL https://app.factory.ai/cli | sh ``` -------------------------------- ### Ollama Modelfile Example Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-full.md An example of a `Modelfile` used to define a custom Ollama model. It specifies the base model and a system prompt to guide the model's behavior. ```plaintext FROM gemma3 SYSTEM """You are a happy cat.""" ``` -------------------------------- ### Deploy Foundation App with Vercel Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md This guide covers the process of creating a Foundation application and deploying it live on Vercel. It simplifies the deployment of Foundation projects, making them accessible online quickly. ```javascript import Foundation from '@foundation/core'; const app = new Foundation({ // Configuration options }); app.listen(process.env.PORT || 3000); ``` -------------------------------- ### Install FrankenPHP via Curl Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/frankenphp/SKILL.md Installs the FrankenPHP binary on Linux/macOS using curl and moves it to the local bin directory. It then starts a basic PHP server in the current directory. ```bash curl https://frankenphp.dev/install.sh | sh mv frankenphp /usr/local/bin/ # Start server in current directory frankenphp php-server ``` -------------------------------- ### List All Marketplaces (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/README.md Lists all currently configured marketplaces. This command is used to verify that the SkillsForge marketplace has been successfully added and is recognized. ```bash # List all marketplaces /plugin marketplace list ``` -------------------------------- ### Error Handling Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/pinterest-api/SKILL.md Information on common error responses and examples. ```APIDOC ## Error Handling ### Common Error Response #### Description This is a general structure for error responses from the Pinterest API. #### Response Example ```json { "code": 3, "message": "Requested pin not found" } ``` ### Common Error Codes - **1** - Invalid request parameters - **2** - Rate limit exceeded - **3** - Resource not found - **4** - Insufficient permissions - **8** - Invalid access token ### Python Error Handling Example #### Description An example of how to handle potential HTTP errors when making requests to the Pinterest API using Python's `requests` library. #### Code Example ```python import requests def create_pin(access_token, board_id, title, image_url): url = "https://api.pinterest.com/v5/pins" headers = { "Authorization": f"Bearer {access_token}", "Content-Type": "application/json" } data = { "board_id": board_id, "title": title, "media_source": { "source_type": "image_url", "url": image_url } } try: response = requests.post(url, headers=headers, json=data) response.raise_for_status() # Raise an exception for bad status codes (4xx or 5xx) return response.json() except requests.exceptions.HTTPError as e: # Attempt to parse JSON error response from Pinterest API try: error_data = e.response.json() print(f"Error {error_data.get('code')}: {error_data.get('message')}") except ValueError: # If response is not JSON, print raw text print(f"HTTP Error: {e.response.status_code} - {e.response.text}") return None except requests.exceptions.RequestException as e: # Handle other request-related errors (e.g., network issues) print(f"Request failed: {str(e)}") return None ``` ``` -------------------------------- ### Deploy Eleventy Site with Vercel Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md Steps to create an Eleventy static site and deploy it live with Vercel. This guide covers using the Eleventy CLI and Vercel for deployment. ```bash npm create eleventy@latest cd my-eleventy-site vercel ``` -------------------------------- ### Resolve Missing Dependencies in package.json on Vercel Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/llms.md This guide addresses the issue of missing dependencies after installation during a Vercel build. It helps understand the root causes and provides solutions to ensure all necessary packages are correctly installed. ```bash # Ensure your package.json is correctly formatted # Check for peer dependency conflicts # Try clearing the npm/yarn cache and reinstalling locally npm cache clean --force yarn cache clean ``` -------------------------------- ### Forem API Authentication Setup (Bash) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/forem-api/SKILL.md Sets up the necessary headers for authenticated requests to the Forem API v1. Requires an 'api-key' and the 'accept' header specifying the API version. ```bash # Required headers for authenticated requests curl -X GET "https://dev.to/api/articles/me" \ -H "api-key: YOUR_API_KEY" \ -H "accept: application/vnd.forem.api-v1+json" ``` -------------------------------- ### Setting up a Node.js Project for Web Scraping Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/apify-js-sdk/references/llms.md Learn how to create a new project using npm and Node.js, which is the foundation for building web scrapers. This involves initializing a project and setting up the necessary environment for JavaScript development. ```bash npm init -y npm install cheerio got-scraping ``` -------------------------------- ### Authentication Example - Get Drafts Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/hashnode-api/SKILL.md Retrieve drafts for a publication, requires authentication. ```APIDOC ## GET /graphql ### Description Retrieves a list of draft posts for the authenticated publication owner. This endpoint requires an Authorization header with a Personal Access Token (PAT). ### Method POST ### Endpoint /graphql ### Parameters #### Query Parameters - **host** (String) - Required - The hostname of the publication (e.g., "your-blog-host.hashnode.dev"). - **first** (Int) - Required - The number of drafts to retrieve. #### Headers - **Authorization** (String) - Required - Your Personal Access Token (PAT) in the format: `your-personal-access-token-here`. #### Request Body ```json { "query": "query Publication($first: Int!, $host: String) {\n publication(host: $host) {\n id\n drafts(first: $first) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n}", "variables": { "first": 10, "host": "your-blog-host.hashnode.dev" } } ``` ### Response #### Success Response (200) - **data.publication.drafts.edges** (Array) - A list of draft post objects, each containing id and title. #### Response Example ```json { "data": { "publication": { "id": "publication-id", "drafts": { "edges": [ { "node": { "id": "draft-1-id", "title": "My Draft Post 1" } }, { "node": { "id": "draft-2-id", "title": "Another Draft" } } ] } } } } ``` #### Error Response (401) - **message** (String) - "Authentication required" or similar if the PAT is invalid or missing. - **extensions.code** (String) - "UNAUTHENTICATED" ``` -------------------------------- ### Create Ollama Model from Modelfile Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/ollama/references/llms-txt.md This example demonstrates the command-line steps to create a new Ollama model using a Modelfile. It involves saving the Modelfile, creating the model with `ollama create`, and then running it. ```shell ollama create choose-a-model-name -f ollama run choose-a-model-name ``` -------------------------------- ### Get Board Pins Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/pinterest-api/SKILL.md Retrieves a list of pins belonging to a specific board. ```APIDOC ## GET /v5/boards/{BOARD_ID}/pins ### Description Retrieves a list of pins belonging to a specific board. ### Method GET ### Endpoint /v5/boards/{BOARD_ID}/pins ### Parameters #### Path Parameters - **BOARD_ID** (string) - Required - The ID of the board to retrieve pins from. #### Query Parameters None ### Request Example ```bash curl -X GET https://api.pinterest.com/v5/boards/{BOARD_ID}/pins \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **items** (array) - A list of pin objects. - **bookmark** (string) - Token for fetching the next page of results. #### Response Example ```json { "items": [ { "id": "123456789012345", "link": "https://www.pinterest.com/pin/123456789012345/", "title": "Example Pin Title", "description": "This is an example pin description.", "dominant_color": "#634A41" } ], "bookmark": "some_bookmark_token" } ``` ``` -------------------------------- ### JavaScript/Node.js Integration Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/pinterest-api/SKILL.md An example client class for interacting with the Pinterest API using JavaScript. ```APIDOC ## JavaScript/Node.js Client Example ### Description This example provides a `PinterestClient` class to simplify making requests to the Pinterest API using JavaScript (compatible with browser and Node.js environments that support `fetch`). ### Code Example ```javascript // Pinterest API Client Example class PinterestClient { constructor(accessToken) { this.accessToken = accessToken; this.baseUrl = 'https://api.pinterest.com/v5'; } async request(endpoint, options = {}) { const url = `${this.baseUrl}${endpoint}`; const headers = { 'Authorization': `Bearer ${this.accessToken}`, 'Content-Type': 'application/json', ...options.headers }; // Ensure fetch is available in the environment if (typeof fetch === 'undefined') { throw new Error('fetch API is not available in this environment. Consider using a polyfill or Node.js built-in fetch.'); } const response = await fetch(url, { ...options, headers }); if (!response.ok) { let error; try { error = await response.json(); } catch (e) { // If the error response is not JSON, use status text error = { message: response.statusText }; } throw new Error(`Pinterest API Error (${response.status}): ${error.message || 'Unknown error'}`); } return response.json(); } /** * Creates a new pin. * @param {string} boardId - The ID of the board to add the pin to. * @param {string} title - The title of the pin. * @param {string} imageUrl - The URL of the image for the pin. * @param {string} [description=''] - Optional description for the pin. * @param {string} [link=''] - Optional link for the pin. * @returns {Promise} The created pin object. */ async createPin(boardId, title, imageUrl, description = '', link = '') { return this.request('/pins', { method: 'POST', body: JSON.stringify({ board_id: boardId, title: title, description: description, link: link, media_source: { source_type: 'image_url', url: imageUrl } }) }); } /** * Retrieves a list of the user's boards. * @returns {Promise} An object containing a list of boards. */ async getUserBoards() { return this.request('/boards'); } /** * Retrieves analytics for a specific pin. * @param {string} pinId - The ID of the pin. * @param {string} startDate - The start date for the analytics range (YYYY-MM-DD). * @param {string} endDate - The end date for the analytics range (YYYY-MM-DD). * @returns {Promise} An object containing pin analytics data. */ async getPinAnalytics(pinId, startDate, endDate) { const params = new URLSearchParams({ start_date: startDate, end_date: endDate, metric_types: 'IMPRESSION,SAVE,PIN_CLICK' }); return this.request(`/pins/${pinId}/analytics?${params}`); } } // Usage Example: // Assuming you have obtained an access token // const accessToken = 'YOUR_ACCESS_TOKEN'; // const client = new PinterestClient(accessToken); // async function exampleUsage() { // try { // // Create a pin // const newPin = await client.createPin( // 'BOARD_ID_HERE', // 'My Awesome Pin', // 'https://example.com/path/to/your/image.jpg' // ); // console.log('Pin created:', newPin); // // Get user boards // const boards = await client.getUserBoards(); // console.log('User boards:', boards); // // Get pin analytics (replace with a valid pin ID) // // const analytics = await client.getPinAnalytics('PIN_ID_HERE', '2023-01-01', '2023-01-31'); // // console.log('Pin analytics:', analytics); // } catch (error) { // console.error('Failed to use Pinterest client:', error); // } // } // exampleUsage(); ``` ``` -------------------------------- ### KPSDK Configuration and Loading (JavaScript) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/vercel/references/api.md Manages the configuration and loading of the KPSDK. It ensures the SDK is available in the browser environment and configures it with provided API endpoint details. Dependencies include the global `window` object and the `KPSDK` global variable. ```javascript static #d(){ let a,b; return{promise:new Promise((c,d)=>{ a=c, b=d }),resolve:a,reject:b} } d=class a{ #a=!1; #b; constructor(a){ this.#b=a } get loaded(){ return this.#a } load=async()=>{ this.#a|| await this.#f() }; #c(){ if(typeof globalThis.window>"u")throw Error("KPSDK is not available in the server"); if(!window.KPSDK)throw Error("KPSDK is not loaded"); let b=this.#b.map(b=>{ let c=a.#e(b.path); return{domain:c.host, path:c.pathname, method:b.method} }); try{ window.KPSDK.configure(b) } catch(a){ console.error("Error configuring KPSDK...",a) } }; #f=async()=>{ let a=this; return new Promise((c,d)=>{ let e=()=>{ document.removeEventListener("kpsdk-load",e), this.#c() }, f=()=>{ document.removeEventListener("kpsdk-ready",f), a.#a=!0, c() }; document.addEventListener("kpsdk-load",e,{once:!0}), document.addEventListener("kpsdk-ready",f,{once:!0}), b("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch(a=>{ document.removeEventListener("kpsdk-load",e), document.removeEventListener("kpsdk-ready",f), d(a) }) }) }; static #e(a){ let b; try{ b=new URL(a) } catch{ b=new URL(a,location.origin) } return b }} ``` -------------------------------- ### Create Linode Compute Instances Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/linode-cli/SKILL.md Provides examples for creating Linode compute instances with various configurations, including specifying instance type, region, image, label, root password, and authorized SSH keys. ```bash # Create a basic Linode (uses defaults from config) linode-cli linodes create \ --type g6-standard-2 \ --region us-east \ --image linode/debian11 \ --label my-server \ --root_pass "SecurePassword123!" # Create with specific configuration linode-cli linodes create \ --type g6-standard-4 \ --region us-central \ --image linode/ubuntu22.04 \ --label production-web \ --root_pass "MySecurePass!" \ --group webservers # Create with authorized SSH keys linode-cli linodes create \ --type g6-standard-2 \ --region us-west \ --image linode/debian11 \ --label secure-server \ --root_pass "Password123!" \ --authorized_keys "ssh-rsa AAAAB3Nz..." ``` -------------------------------- ### Get Pin Analytics Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/pinterest-api/SKILL.md Retrieves analytics data for a specific pin within a date range. ```APIDOC ## GET /v5/pins/{PIN_ID}/analytics ### Description Retrieves analytics data for a specific pin within a specified date range and for given metric types. ### Method GET ### Endpoint /v5/pins/{PIN_ID}/analytics ### Parameters #### Path Parameters - **PIN_ID** (string) - Required - The ID of the pin to retrieve analytics for. #### Query Parameters - **start_date** (string) - Required - The start date for the analytics range (YYYY-MM-DD). - **end_date** (string) - Required - The end date for the analytics range (YYYY-MM-DD). - **metric_types** (string) - Required - A comma-separated list of metric types to retrieve (e.g., IMPRESSION,SAVE,PIN_CLICK). ### Request Example ```bash curl -X GET "https://api.pinterest.com/v5/pins/{PIN_ID}/analytics?start_date=2025-01-01&end_date=2025-01-31&metric_types=IMPRESSION,SAVE,PIN_CLICK" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **all** (object) - Contains daily metrics for the specified period. - **daily_metrics** (array) - An array of daily metric objects. - **date** (string) - The date for the metrics (YYYY-MM-DD). - **data_status** (string) - The status of the data (e.g., READY). - **metrics** (object) - An object containing the requested metric values for the day. - **IMPRESSION** (integer) - Number of times pin was shown. - **SAVE** (integer) - Number of times pin was saved. - **PIN_CLICK** (integer) - Number of clicks to pin destination. - **OUTBOUND_CLICK** (integer) - Clicks to external website. - **VIDEO_START** (integer) - Video plays started. #### Response Example ```json { "all": { "daily_metrics": [ { "date": "2025-01-01", "data_status": "READY", "metrics": { "IMPRESSION": 1250, "SAVE": 45, "PIN_CLICK": 89 } } ] } } ``` ``` -------------------------------- ### Test Fixture Pattern for Test Setup Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/tdd-methodology-expert/references/testing-patterns.md The Test Fixture pattern uses setup and teardown methods (or fixtures) to create a consistent and reusable environment for tests. This ensures that each test starts with the same preconditions, promoting isolation and reliability. ```python import pytest @pytest.fixture def cart(): """Create a fresh shopping cart for each test""" return ShoppingCart() @pytest.fixture def sample_items(): """Create sample items for testing""" return [ Item("Book", 29.99), Item("Pen", 1.99), Item("Notebook", 5.99) ] def test_should_calculate_correct_total(cart, sample_items): for item in sample_items: cart.add_item(item) total = cart.calculate_total() assert total == 37.97 ``` ```javascript describe('ShoppingCart', () => { let cart; beforeEach(() => { cart = new ShoppingCart(); }); test('should calculate correct total', () => { cart.addItem(new Item("Book", 29.99)); cart.addItem(new Item("Pen", 1.99)); const total = cart.calculateTotal(); expect(total).toBe(31.98); }); }); ``` -------------------------------- ### Marketplace Integration Example (REST API) Source: https://context7.com/rawveg/skillsforge-marketplace/llms.txt Illustrates how to interact with the SkillsForge Marketplace using REST API calls, typically with `curl`. This example shows a generic pattern for API interaction, which would be adapted for specific skills. ```bash # Example: Using curl to interact with a marketplace skill API # (This is a conceptual example, actual endpoints will vary) curl -X POST "https://api.skillsforge.com/v1/skills/deploy" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"skill_id": "tdd-methodology", "project_path": "/path/to/your/project"}' ``` -------------------------------- ### REST API - Get Customer Info Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/revenuecat/SKILL.md Example of using the RevenueCat REST API to retrieve subscriber information. ```APIDOC ## REST API - Get Customer Info ```bash curl --request GET \ --url https://api.revenuecat.com/v1/subscribers/app_user_id \ --header 'Authorization: Bearer PUBLIC_API_KEY' ``` ``` -------------------------------- ### Get Entity Count (Series Count Example) Source: https://github.com/rawveg/skillsforge-marketplace/blob/main/hashnode-api/SKILL.md Retrieve the total count of entities, such as series, without fetching the entities themselves. ```APIDOC ## GET /graphql ### Description Fetches the total number of documents (e.g., series) for a publication without retrieving the actual documents. ### Method POST ### Endpoint `https://gql.hashnode.com` ### Parameters #### Query Parameters None (All parameters are within the GraphQL request body). #### Request Body ```json { "query": "query SeriesCount($host: String!) {\n publication(host: $host) {\n id\n seriesList(first: 0) {\n totalDocuments\n }\n }\n}", "variables": { "host": "engineering.hashnode.com" } } ``` ### Response #### Success Response (200) - **data** (object) - The response payload. - **publication** (object) - Publication details. - **id** (string) - Publication ID. - **seriesList** (object) - Information about series. - **totalDocuments** (integer) - The total count of series. #### Response Example ```json { "data": { "publication": { "id": "60b7a7a7a7a7a7a7a7a7a7a7", "seriesList": { "totalDocuments": 3 } } } } ``` ```