Openclaw Skills Python Hardener transforms one or more Python scripts into secure, production-ready versions with better errors, logging, docs, and safer I/O.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install skill-python-hardener
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install skill-python-hardener using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Python Hardener is an Openclaw Skills workflow for taking uploaded or referenced Python files and rewriting them in place with safer control flow, cleaner structure, and production-grade observability.
It performs a full review for injection risks, weak exception handling, resource leaks, unsafe path and subprocess usage, non-atomic writes, and missing documentation, then produces a companion Markdown file that explains the security measures applied and how each module works.
except: blocks and silent pass statements with specific exceptions and explicit logging.RotatingFileHandler and a console StreamHandler..py files in one pass while preserving the original filenames exactly.shell=True, os.chdir(), path traversal, hardcoded secrets, and broad exception handlers, then choose safer replacements.RotatingFileHandler for file output, StreamHandler for console output, and an environment-driven log level.Args, Returns, and Raises coverage.<primary-script-name>.md that documents the architecture, configuration, APIs, security fixes, and error handling behavior.except:, no os.chdir(), closed resources, atomic writes, and no extra files beyond the approved documentation artifact..py file or files and request hardening; no separate install step is required for Openclaw Skills.export LOG_LEVEL=INFO
<primary-script-name>.md companion document for the applied fixes and module behavior.Do not expect the skill to create .env.example, requirements.txt, or migration guides unless you explicitly ask for them.
| Artifact | Structure | Purpose |
|---|---|---|
| Input scripts | One or more .py files supplied by the user |
Source code to analyze and harden |
| Patched scripts | The same filenames as the input files | Corrected code written in place |
| Companion documentation | <primary-script-name>.md |
Single Markdown report for the primary script |
| Runtime configuration | Environment variables consumed by the script | Replaces hardcoded secrets and controls log level |
| Metadata bucket | Typical contents | Notes |
|---|---|---|
| Security | SQL/NoSQL injection, shell injection, path traversal, secrets | Each threat maps to an explicit countermeasure |
| Error handling | Specific exceptions, warnings, error logs, fallback behavior | Bare except: and silent pass are removed |
| Resource management | Context managers, connection closure, atomic writes | Prevents leaks and torn writes |
| Code quality | Type hints, naming, function decomposition, docstrings | Preserves intent while improving readability |
| Documentation | Overview, architecture, configuration, API/functions, security, error handling | Captures the final state for review |
The skill does not generate extra scaffolding files or a persistent schema beyond the rewritten source and the single Markdown artifact.
shell=True.os.replace() to prevent torn state updates.Loading
Skill Batch Publisher turns a local Openclaw Skills library into a safe, resumable ClawHub publish queue.

Lazaretto helps Openclaw Skills users verify untrusted skills and packages before install by checking known-bad hashes, scanning behavior, and revalidating on-disk bytes.

Openclaw Skills for ProxyLLM lets an agent create, verify, and configure a gateway account, then provision fallback routing keys without a browser.

Openclaw Skills for querying ancient Chinese classic chapters by ID through TianAPI, with script and direct HTTP access.

An Openclaw Skills assistant that turns rough notes into a concise, audience-safe wedding toast with a strong emotional arc.

Openclaw Skills turns a project list into an evidence-driven portfolio page that shows your role, impact, and proof.








































