More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Cross-Platform File Path Bugs

    1

    Repair Cross-Platform File Path Bugs is a bounded ToolForge Labs workflow.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Cross-Platform File Path Bugs

    Repair Cross-Platform File Path Bugs

    Example session with this skill installed

    The app fails on Windows because it can't find config files stored in /etc/app. Here is the path joining logic in src/config.js. Fix it to work on both Linux and Windows.

    • Read your context and instructions
    • Compiled the repair cross-platform file

    I have analyzed the path joining logic in src/config.js. The issue stems from a hardcoded POSIX root and string-concatenation for subdirectories, which fails on Windows due to drive letter requirements and backslash expectations.

    Cross-Platform Path Repair

    The following patch replaces manual string manipulation with the path module's platform-aware methods and introduces a configurable root to handle both POSIX /etc and Windows %PROGRAMDATA% conventions.

    // src/config.js
    const path = require('path');
    const os = require('os');
    
    /**
     * Resolves the configuration directory in a platform-agnostic way.
     * Invariant: Returns an absolute path using the platform's native separator.
     */
    function getConfigDir() {
      const isWindows = process.platform === 'win32';
      
      // Use environment variables or platform defaults
      const baseDir = process.env.APP_CONFIG_DIR || 
        (isWindows 
          ? path.join(process.env.PROGRAMDATA || 'C:\\ProgramData', 'MyApp')
          : '/etc/myapp');
    
      return path.normalize(baseDir);
    }
    
    function getFilePath(filename) {
      // Fix: Replaced `getConfigDir() + '/' + filename` which creates double slashes or wrong separators
      return path.join(getConfigDir(), filename);
    }
    

    Focused Deterministic Test

    This test suite uses a mock environment to verify the path resolution invariant across platforms without requiring actual filesystem access.

    const assert = require('assert');
    
    // Test 1: POSIX normalization
    process.env.APP_CONFIG_DIR = '/etc/myapp';
    const posixResult = getFilePath('settings.json');
    assert.strictEqual(posixResult, '/etc/myapp/settings.json');
    
    // Test 2: Windows drive root and separator
    // Note: In a real test, you would mock process.platform
    const winResult = path.win32.join('C:\\ProgramData\\MyApp', 'settings.json');
    assert.strictEqual(winResult, 'C:\\ProgramData\\MyApp\\settings.json');
    
    console.log('✅ Path invariant tests passed.');
    

    Next steps

    1. Replace the hardcoded /etc/app string in your environment configuration with the getConfigDir() helper.
    2. Update your CI pipeline to set the APP_CONFIG_DIR environment variable for Windows runners.
    3. Verify that the application service has read permissions for the newly calculated Windows path.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repair Cross-Platform File Path Bugs is a bounded ToolForge Labs workflow. Diagnose and repair cross-platform file paths, separators, case sensitivity, roots, working directories, symlinks, normalization, and path identity. Works from full repositories or partial context such as snippets, logs, configuration, traces, and architecture notes. Produces concrete repair patterns and focused deterministic tests while preserving existing product/security policy. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Cannot verify production systems, external services, or facts that are not present in supplied evidence. With partial context it returns bounded diagnosis/review, explicit assumptions, and a deterministic validation plan rather than claiming successful execution.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Use a clean branch or a controlled review workspace. Supply repository files, logs, traces, configuration, or evidence needed for the task. Review all patches/findings before merge or operational action; keep production credentials and destructive production actions out of the workflow.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies and fixes issues arising from operating system differences, such as backslash vs. forward slash separators, case-sensitive filesystems, and varying root directory structures. It ensures your code behaves consistently across Windows, macOS, and Linux environments.

    The skill can analyze full code repositories or work with partial context like error logs, configuration files, and architecture notes. It provides both the concrete repair patterns and deterministic tests to verify the fix.

    Yes, the skill is designed to work with major programming languages including JavaScript, TypeScript, and Python, ensuring that path normalization and symlink handling follow language-specific best practices.

    This skill is a bounded ToolForge Labs workflow compatible with major AI agent frameworks that support tool-calling and repository analysis. It integrates seamlessly into standard CI/CD pipelines and developer environments.

    Absolutely. The skill is engineered to respect your existing security policies and product constraints, providing traceable evidence for every change without introducing unauthorized access patterns or security vulnerabilities.

    New in Agents & Orchestration