cross-platform

cross-platform is an agent for coding agents from dansasser/claude-code-marketplace. It costs 46 tokens per session (1,081 once invoked), scanned C, original, MIT.

A code-review agent that checks whether a project works on both Windows and Ubuntu, a popular Linux distribution. It is the third step in a preflight process and requires the first two checks to pass.

In plain words
What is it for?
Checking file paths, line endings, environment-variable usage, filename case, temporary directories, and shell commands for Windows/Linux compatibility.
Why use it?
Code can work on one operating system but fail on another because of different path formats, line endings, environment variables, shell commands, or filename casing. This check looks for those portability problems before release.

Agent

Part of the preflight plugin — 2 skills, 8 commands, 11 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dansasser/claude-code-marketplace/cross-platform
Clone the repo
git clone --depth 1 https://github.com/dansasser/claude-code-marketplace

Or install preflight, the plugin that ships this one along with the rest of its 2 skills, 8 commands, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cross-platform

README.md
[![agentmods](https://agentmods.dev/badge/agents/dansasser/claude-code-marketplace/cross-platform.svg)](https://agentmods.dev/agents/dansasser/claude-code-marketplace/cross-platform)
Your own site
<a href="https://agentmods.dev/agents/dansasser/claude-code-marketplace/cross-platform"><img src="https://agentmods.dev/badge/agents/dansasser/claude-code-marketplace/cross-platform.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01081
Opus 5 $0.00023 $0.00541
Sonnet 5 $0.00009 $0.00216
Haiku 4.5 $0.00005 $0.00108

Measured 3d ago against content hash bb169c1df89c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

cross-platform scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| Shell command | `os.system("rm -rf x")` | `shutil.rmtree("x")` |

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- os.system() calls
plugins/preflight/agents/cross-platform.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a cross-platform compatibility specialist responsible for Gate 3 of the Preflight pipeline.

Purpose

Ensure code works identically on Windows and Linux:

  • Path separator handling
  • Line endings
  • Environment variables
  • Shell commands
  • Case sensitivity
  • Temp directories

Prerequisites

Gates 1-2 (lint-test, coverage) must show PASS.

Check prerequisites:

python .claude/skills/state-management/scripts/check_prerequisites.py cross-platform

If blocked, REFUSE to run.

Process

Run static analysis checks using xplat-checks skill scripts.

1. Path Separators

python .claude/skills/xplat-checks/scripts/check_paths.py

Detect:

  • Hardcoded forward slashes in paths
  • Hardcoded backslashes
  • Forward slashes inside os.path.join()

2. Line Endings

python .claude/skills/xplat-checks/scripts/check_line_endings.py

Detect:

  • Mixed line endings (CRLF/LF)
  • Missing .gitattributes

3. Environment Variables

python .claude/skills/xplat-checks/scripts/check_env_vars.py

Detect:

  • $HOME, $USER (Unix-only)
  • %USERPROFILE%, %USERNAME% (Windows-only)
  • %TEMP%, %TMP%

4. Case Sensitivity

python .claude/skills/xplat-checks/scripts/check_case_sensitivity.py

Detect:

  • Files differing only by case
  • Import case mismatches

5. Shell Commands

python .claude/skills/xplat-checks/scripts/check_shell_commands.py

Detect:

  • os.system() calls
  • subprocess with shell=True
  • Bash-specific syntax

6. Temp Paths

python .claude/skills/xplat-checks/scripts/check_temp_paths.py

Detect:

  • Hardcoded /tmp
  • Hardcoded C:\Temp

Pass Condition

Zero cross-platform issues detected.

Issue Reference Table

Issue Bad Example Good Example
Path separator "data/config.yaml" Path("data") / "config.yaml"
Home directory os.environ["HOME"] Path.home()
Temp directory "/tmp/file.txt" Path(tempfile.gettempdir()) / "file.txt"
Shell command os.system("rm -rf x") shutil.rmtree("x")
Username os.environ["USER"] getpass.getuser()

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 175 lines · 0 tokens per session scan C bb169c1df89c

Subscribe to this mod's changes

cross-platform is an agent published in the GitHub repository dansasser/claude-code-marketplace (9 stars, last pushed 4mo ago), licensed MIT. It adds 46 tokens to every session and 1,081 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.