Favicon of cross-platform-paths

cross-platform-paths Skill

AI Agent SkillTypeScriptOpen source

Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the 1 source of issues. Use this skill when reviewing or writing path-related code. Published by microsoft in vscode-python-environments.

What is cross-platform-paths Skill?

Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the 1 source of issues. Use this skill when reviewing or writing path-related code. Published by microsoft in vscode-python-environments. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.

Trust signal
95/100
Maintenance signal
90/100
Adoption signal
53/100

Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.

Key capabilities

  • Includes SKILL.md support
  • Reusable instructions support
  • Testing
  • Writing
  • Testing use cases
  • Writing use cases

Technical details

Copy skill directory
  • Install or run with Copy skill directory

When to use cross-platform-paths Skill

  • Use it for testing.
  • Use it for writing.

Built with

TypeScriptCopy skill directory

Editorial notes

Source

  • Creator: microsoft
  • Repository: microsoft/vscode-python-environments
  • Skill file: .github/skills/cross-platform-paths/SKILL.md

What it does

Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the 1 source of issues. Use this skill when reviewing or writing path-related code.

Skill instructions

Cross-Platform Path Handling CRITICAL: This extension runs on Windows, macOS, and Linux. Path bugs are the 1 source of issues. Core Rules Rule 1: Never Concatenate Paths with / typescript // ❌ WRONG: POSIX-style path concatenation const envPath = homeDir + '/.venv/bin/python'; // ✅ RIGHT: Use path.join() const envPath = path.join(homeDir, '.venv', 'bin', 'python'); Rule 2: Use path.resolve() for Comparisons, Not path.normalize() typescript // ❌ WRONG: path.normalize keeps relative paths relative on Windows const normalized = path.normalize(fsPath); // path.normalize('\test') → '\test' (still relative!) // ✅ RIGHT: path.resolve adds drive letter on Windows const normalized = path.resolve(fsPath); // path.resolve('\test') → 'C:\test' (absolute!) // When comparing paths, use resolve() on BOTH sides: const pathA = path.resolve(fsPath); const pathB = path.resolve(e.environmentPath.fsPath); return pathA === pathB; Rule 3: Use Uri.file().fsPath for VS Code Paths typescript // ❌ WRONG: Raw str

Explore related resources

Frequently asked questions

What is cross-platform-paths?

cross-platform-paths is a open-source AI agent skill with Copy skill directory. Critical patterns for cross-platform path handling in this VS Code extension. Windows vs POSIX path bugs are the 1 source of issues. Use this skill when reviewing or writing path-related code.

Who is cross-platform-paths best for?

cross-platform-paths is best for reusing agent instructions, scripts, and references, testing workflows, writing workflows.

How do I install cross-platform-paths?

Install or run cross-platform-paths using Copy skill directory. Check cross-platform-paths for the latest setup command.

Is cross-platform-paths actively maintained?

cross-platform-paths may need a closer maintenance check before production use.

Share:

Stars
132
Forks
51
Last commit
17 days ago
Repository age
2 years
License
MIT

Auto-fetched from GitHub.

Ad
Favicon

 

  
 

Similar to cross-platform-paths