Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

python-harmony-compatibility-checkerPython harmony compatibility checker 搜索

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

12,876

周安装

526

GitHub Stars

公开资料未说明

下载量

4,166
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:python-harmony-compatibility-checker(Python harmony compatibility checker 搜索)
来源仓库:https://github.com/terryking1992/python-harmony-compatibility-checker
安装命令:
openclaw skills install python-harmony-compatibility-checker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install python-harmony-compatibility-checker

简介

检查 Python 库与 HarmonyOS 平台的兼容性情况。

  • 适合在 OpenClaw 中评估第三方依赖是否适用于鸿蒙生态时使用。
  • 自动下载源码并运行针对性测试用例。
  • 安装命令:openclaw skills install python-harmony-compatibility-checker。
  • 结果仅供参考,实际部署前仍需全面验证。

SKILL.md

name
python-harmony-compatibility-checker
description
Check Python library compatibility with HarmonyOS. Downloads source from GitHub/PyPI, detects Windows-specific dependencies, runs pytest with per-test-case reporting, and generates detailed compatibility reports.

Python HarmonyOS Compatibility Checker

When to Use

  • Check if a Python package works on HarmonyOS
  • Validate multiple packages before deployment
  • Migrate a Python project to HarmonyOS
  • Detect Windows-specific API dependencies (win32api, pythoncom, pywin32, etc.)

Usage

# Single package
python scripts/check_compatibility.py requests

# Multiple packages (parallel, 4 workers default)
python scripts/check_compatibility.py requests numpy pandas flask

# Specify workers
python scripts/check_compatibility.py --workers 8 requests numpy pandas

# From requirements file
python scripts/check_compatibility.py -r requirements.txt
python scripts/check_compatibility.py -w 8 -r requirements.txt

# Sequential mode (debugging)
python scripts/check_compatibility.py --sequential requests numpy

# Keep downloaded source for verification
python scripts/check_compatibility.py --keep-source numpy

Options

OptionDescriptionDefault
-w, --workers NNumber of parallel workers4
--sequentialRun checks one at a timeFalse
-r, --requirements FILECheck packages from requirements file-
--keep-sourceKeep downloaded source code for verificationFalse

Output

Reports saved to current directory:

  • compatibility_report_*.md - Markdown with summary and details
  • compatibility_report_*.json - Machine-readable with per-test-case results

Timestamps use 东八区时间 (UTC+8/北京时间).

Example (numpy)

📦 numpy v2.2.1
   Status: ✅ Compatible
   Test Pass Rate: 88.9%
   Total: 45 tests | Passed: 40 | Failed: 5

Metrics

MetricDescription
Total TestsIndividual test functions run
PassedSuccessfully completed
FailedFailed due to code issues
Environment IssuesPermission/temp dir failures (not counted)
Pass Ratepassed / total
Valid Pass Ratepassed / (passed + failed) - excludes environment issues

Test Workflow

  1. Download Source - GitHub (preferred) or PyPI
  2. Windows Check - Scan for Windows-specific imports (win32api, pythoncom, pywin32, ctypes.windll)

- Found → Incompatible (no further testing)

  1. Find Tests - From installed package (preferred) or source
  2. Run Tests - pytest with verbose output, per-function reporting
  3. Analyze - Categorize: environment issues vs code issues
  4. Report - Markdown + JSON with detailed results

Status

StatusCriteria
✅ CompatibleInstalls + valid pass rate ≥ 80% + no Windows deps
⚠️ PartialInstalls + valid pass rate 50-79%
❌ IncompatibleCannot install OR valid pass rate < 50% OR Windows deps detected

Error Classification

TypeDescriptionCounts Against
EnvironmentPermission errors, temp dir issues❌ No
CodeImport errors, API incompatibilities✅ Yes
PlatformWindows/macOS/X11 dependencies✅ Yes

Known Issues

Platform Dependencies

PlatformProblematic PackagesAlternative
Windowspywin32, wmi, pythoncom, xlwingsCross-platform libs
macOSapplescript, quartz, cocoa-
X11python-xlib, xcbpynput

Windows Module Detection

Scans for: win32api, win32con, win32gui, win32com, pythoncom, pywintypes, ctypes.windll, winsound, msvcrt

Detection includes:

  • Direct imports: import win32api, from win32com import ...
  • Dynamic imports: importlib.import_module('pythoncom')
  • ctypes Windows DLL: ctypes.windll, ctypes.WinDLL
  • References in setup.py, pyproject.toml

Compatible Packages

  • requests, numpy (45 tests, 88.9%), pandas, flask, django, pytest, beautifulsoup4, pillow

Scripts

check_compatibility.py

Features:

  • Source download from GitHub/PyPI
  • Windows dependency detection
  • Test discovery from installed package or source
  • pytest integration with per-test-case reporting
  • Environment issue detection
  • Source code retention (--keep-source)

pytest Integration:

  • Uses pytest -v --tb=short --import-mode=importlib
  • Runs from /tmp to avoid source import conflicts
  • Parses output for individual test function results
  • Limits to 15 test files, shows progress every 5 files

Troubleshooting

Permission Errors

# Clean up pytest temp directories
rm -rf pytest-of-*

Source Verification

# Keep source for inspection
python scripts/check_compatibility.py --keep-source xlwings

# Check Windows imports
grep -r "import win32" /path/to/source/

False Positives

Some failures may be due to:

  • Missing optional system libraries
  • Network-dependent tests
  • pytest configuration issues

Review detailed reports to distinguish real incompatibilities from environment issues.

Integration

CI/CD

- name: HarmonyOS Compatibility
  run: python scripts/check_compatibility.py -r requirements.txt --keep-source

Programmatic

from scripts.check_compatibility import check_package
result = check_package("requests")
print(f"Compatible: {result.compatible}, Issues: {result.issues}")

Limitations

  • Binary dependencies may fail to compile
  • Some packages require system-level dependencies
  • Pure HarmonyOS (NEXT) has stricter security policies
  • Not all packages have unit tests
  • Network required for source download

Related

  • references/python-env-setup.md - Python setup on HarmonyOS
  • references/compatibility-database.md - Known package status

Best Practices

For Users

  1. Review error classifications (environment vs code)
  2. Use --keep-source to verify tested code
  3. Run multiple times for transient failures
  4. Check Windows dependencies first

For Authors

  1. Include tests in your package
  2. Use pytest
  3. Avoid platform-specific tests (or use @pytest.mark.skipif)
  4. Document system dependencies
  5. Use conditional imports: if sys.platform == 'win32'

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.55%
按下载量换算4,106

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills