Skip to main content

platform-detect

Multi-platform path detection for AI agent skills.

Supports: Hermes (profile) / OpenClaw (workspace) / Claude Code / Codex / Cursor / VSCode

Install

pip install platform-detect

Usage

from platform_detect import detect, skill_dir, config_dir, state_file

# Detect current platform
platform = detect()  # -> 'hermes' | 'openclaw' | 'claude_code' | 'codex' | 'cursor' | 'vscode' | 'unknown'

# Skill installation directory
skill_dir('target-skill')  # -> ~/.hermes/skills/target-skill (Hermes)

# Skill config/state directory (profile/workspace isolated)
config_dir('my-skill')  # -> ~/.hermes/profiles/baijie/.my-skill

# State file path
state_file('.my-state.json')  # -> ~/.hermes/profiles/baijie/.my-state.json

Platform paths

Platform Skill Dir Config Dir
Hermes ~/.hermes/skills/<name>/ ~/.hermes/profiles/<profile>/.<name>/
OpenClaw ~/.openclaw/<workspace>/skills/<name>/ ~/.openclaw/<workspace>/.<name>/
Claude Code ~/.claude/skills/<name>/ ~/.claude/.config/<name>/
Codex ~/.codex/skills/<name>/ ~/.codex/.config/<name>/
Cursor ~/.cursor/plugins/<name>/ ~/.cursor/.config/<name>/
VSCode ~/.vscode/extensions/<name>/ ~/.vscode/.config/<name>/

Zero dependencies

Only uses Python standard library (pathlib, os, platform).

License

MIT

Metadata

Release files for platform-detect 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for platform-detect 0.1.1
File Size Uploaded Provenance Actions
platform_detect-0.1.1.tar.gz 5.0 kB Without provenance Details for platform_detect-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for platform-detect 0.1.1
File Interpreter ABI Platform Actions
platform_detect-0.1.1-py3-none-any.whl Python 3 none any Details for platform_detect-0.1.1-py3-none-any.whl

Total release size: 10.2 kB

Release files / platform_detect-0.1.1.tar.gz

Download URL platform_detect-0.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e2f66afc9370df169b7d7ea61952cf8839587cbd413fac81ec7d8b66ea8860ef
BLAKE2b-256 checksum
How to use checksums
4db1072cc5f52f598b03e89b17ca06b7bf2e43116547f246d25dc8d284fcb259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / platform_detect-0.1.1-py3-none-any.whl

Download URL platform_detect-0.1.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfcd37eaf0134e5cdd91445c0524a43644da0032a5c91560e9d3f1e522a786a9
BLAKE2b-256 checksum
How to use checksums
438625472b4196c06e49ae15d5bb4e236e975e59b47bae39101b2b8a697c9209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for platform-detect 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page