platform-support-cross-platform-compatibility

Detect operating systems and CPU architectures using environment variables and system commands.

836|66|Updated Feb 3, 2025
One-click install
npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill platform-support-cross-platform-compatibility-kreuzberg-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: platform-support-cross-platform-compatibility
Source: https://github.com/kreuzberg-dev/html-to-markdown/tree/main/.codex/skills/platform-support-cross-platform-compatibility
Command: npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill platform-support-cross-platform-compatibility-kreuzberg-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities of building and deploying software across different operating systems and architectures, ensuring a smooth and consistent user experience.

Core Features & Use Cases

  • Platform Detection: Automatically identifies the operating system (Windows, Linux, macOS) and CPU architecture.
  • Platform-Specific Commands: Allows for the execution of different commands or scripts based on the detected platform.
  • Cross-Platform Best Practices: Provides guidance on writing portable code and using Taskfile variables effectively.
  • Use Case: When building a command-line tool, use this Skill to ensure that installation and execution commands work correctly whether the user is on Windows, macOS, or Linux.

Quick Start

Use the platform-support-cross-platform-compatibility skill to determine the current operating system and architecture.

Frequently Asked Questions about platform-support-cross-platform-compatibility

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ensure cross-platform compatibility when building command-line tools?

Cross-platform compatibility is achieved by using platform detection to identify the operating system and CPU architecture, abstracting platform-specific details in build and task execution workflows to ensure consistent behavior across Windows, Linux, and macOS.

How do I detect the operating system and CPU architecture during a build workflow?

Detect the operating system and CPU architecture by utilizing environment variables and system commands within your task automation workflows. This identifies whether the system is Windows, Linux, or macOS to enable platform-specific execution.

Can I use Taskfile variables to run platform-specific commands for Windows, macOS, and Linux?

Yes, you can use Taskfile variables to execute different commands or scripts based on the detected platform. This abstracts platform-specific details in task execution workflows, ensuring commands run correctly on Windows, macOS, and Linux.

What are cross-platform development best practices for CI/CD pipelines?

Cross-platform development best practices for CI/CD involve abstracting platform-specific details in build and task execution workflows. This ensures a smooth, consistent deployment experience across diverse operating systems and CPU architectures.

Why does my task automation script fail on different operating systems?

Task automation scripts fail across operating systems when platform-specific details are not abstracted. Implementing platform detection and using Taskfile variables to handle environment differences ensures consistent execution across Windows, Linux, and macOS.