netresearch/matrix-skill / skills/matrix-communication
matrix-communication
FlaggedUse when communicating via Matrix chat, notifying teams, or managing E2EE. Triggers on #room:server references, Matrix URLs, and chat requests.
scripts/_lib/deps.py
View on GitHub# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Netresearch DTT GmbH
"""Dependency checking for E2EE scripts.
All functions use ONLY stdlib.
"""
import os
import sys
def check_e2ee_dependencies() -> None:
"""Check that matrix-nio[e2e] dependencies are available.
Prints helpful installation instructions and exits with code 1
if dependencies are missing. Call this before importing nio.
"""
try:
from nio import AsyncClient # noqa: F401
except ImportError as e:
error_msg = str(e).lower()
script_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if "olm" in error_msg:
print("Error: libolm library not found.", file=sys.stderr)
print(file=sys.stderr)
print("Install libolm for your platform:", file=sys.stderr)
print(" Debian/Ubuntu: sudo apt install libolm-dev", file=sys.stderr)
print(" Fedora: sudo dnf install libolm-devel", file=sys.stderr)
print(" macOS 26+: brew won't help; python-olm", file=sys.stderr)
print(" build fails (Clang 17), see setup-guide.md.", file=sys.stderr)
elif "nio" in error_msg or "matrix" in error_msg:
print("Error: matrix-nio library not found.", file=sys.stderr)
print(file=sys.stderr)
print("Install with (try in order):", file=sys.stderr)
print(" uvx pip install 'matrix-nio[e2e]<0.26'", file=sys.stderr)
print(" pip install 'matrix-nio[e2e]<0.26'", file=sys.stderr)
print(" pip3 install 'matrix-nio[e2e]<0.26'", file=sys.stderr)
else:
print(f"Error: Missing dependency: {e}", file=sys.stderr)
print(file=sys.stderr)
print("Or run the health check to diagnose and fix:", file=sys.stderr)
print(f" uv run {script_dir}/matrix-doctor.py --install", file=sys.stderr)
sys.exit(1)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |