← Back to Skills Marketplace
charlie-morrison

Htaccess Toolkit

by charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
96
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install htaccess-toolkit
Description
Generate, validate, lint, and explain Apache .htaccess files. Use when asked to create htaccess rules, redirect URLs, set security headers, enable caching, c...
README (SKILL.md)

htaccess Toolkit

Generate, validate, lint, and explain Apache .htaccess files with security headers, caching, CORS, compression, and more.

Generate

# HTTPS redirect + security headers + compression
python3 scripts/htaccess.py generate --rewrites http-to-https --security strict --compression

# Full production setup
python3 scripts/htaccess.py generate \
  --rewrites http-to-https www-to-non-www \
  --security strict \
  --caching standard \
  --compression \
  --protect directory-listing dotfiles sensitive-files \
  --error-pages 404 500 \
  -o .htaccess

# WordPress hardening
python3 scripts/htaccess.py generate --protect wp-config xmlrpc dotfiles --security strict

# CORS for specific domain
python3 scripts/htaccess.py generate --cors specific --domain example.com

# Custom redirects
python3 scripts/htaccess.py generate --redirects "/old-page -> /new-page" "/blog -> https://blog.example.com"

# Hotlinking protection
python3 scripts/htaccess.py generate --protect hotlinking --domain example.com

Lint

# Basic lint
python3 scripts/htaccess.py lint .htaccess

# Strict mode (exit 1 on errors, CI-friendly)
python3 scripts/htaccess.py lint .htaccess --strict

# Filter by severity
python3 scripts/htaccess.py lint .htaccess --severity error warning

# JSON output
python3 scripts/htaccess.py lint .htaccess -f json

Lint Checks (10 rules)

  • rewrite-no-engine — RewriteRule without RewriteEngine On
  • duplicate-rewrite-engine — Multiple RewriteEngine On
  • redirect-no-slash — Redirect path not starting with /
  • missing-l-flag — RewriteRule without [L] flag
  • mixed-redirect-rewrite — Mixing Redirect and RewriteRule
  • unclosed-ifmodule — Unclosed IfModule blocks
  • unclosed-files — Unclosed Files/FilesMatch blocks
  • wildcard-cors — Wildcard origin with credentials
  • no-hsts — HTTPS without HSTS header
  • options-minus-indexes — Directory listing not disabled

Explain

# Human-readable explanation of each directive
python3 scripts/htaccess.py explain .htaccess

List Presets

python3 scripts/htaccess.py presets
python3 scripts/htaccess.py presets -f json

Available Presets

Rewrites: http-to-https, www-to-non-www, non-www-to-www, trailing-slash-add, trailing-slash-remove, remove-extension

Security: basic, strict

Caching: standard, aggressive

CORS: permissive, specific

Protection: directory-listing, dotfiles, sensitive-files, wp-config, xmlrpc, hotlinking

Error Pages: 404, 403, 500, 503

Usage Guidance
This skill appears to do what it claims, but take normal precautions before running: (1) Inspect the included scripts yourself (they are pure Python and bundled). (2) Back up any existing .htaccess before writing or using the --output option to avoid accidental lockout. (3) Test generated rules on a staging environment (HSTS, 'Require all denied', CORS permissive rules, and redirects can break site access). (4) The tool writes the file path you supply without sanitizing the name—avoid running it as a privileged user and avoid pointing output at system paths. (5) If you will use it in automation/CI, review the linter rules and strict exit behavior. If you want extra assurance, run it in a sandboxed environment first.
Capability Analysis
Type: OpenClaw Skill Name: htaccess-toolkit Version: 1.0.0 The htaccess-toolkit is a legitimate utility for generating, linting, and explaining Apache .htaccess files. The core logic in scripts/htaccess.py relies solely on the Python standard library, performing string manipulation and file I/O consistent with its stated purpose, with no evidence of network activity, shell execution, or data exfiltration.
Capability Assessment
Purpose & Capability
Name/description (htaccess generation, linting, explanation) align with the included SKILL.md and the Python script. The script implements generators, lint rules, explain/presets functionality and does not request unrelated resources (no cloud keys or unrelated binaries).
Instruction Scope
Runtime instructions are limited to invoking the included Python script (generate, lint, explain, presets) and operating on .htaccess paths or writing an output file. They do not instruct the agent to read unrelated system files or transmit data externally.
Install Mechanism
No install spec is present (instruction-only + included script). The code is pure Python stdlib and will run locally; nothing is downloaded or executed from external URLs.
Credentials
The skill declares no environment variables, no credentials, and no config paths. The script does not appear to access secrets or unrelated env vars; its generated .htaccess content includes SetEnvIf which only affects Apache behavior when deployed, not the host environment.
Persistence & Privilege
The skill is not always-enabled and is user-invocable. It does not request persistent system-wide privileges or modify other skills' configurations.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install htaccess-toolkit
  3. After installation, invoke the skill by name or use /htaccess-toolkit
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug htaccess-toolkit
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Htaccess Toolkit?

Generate, validate, lint, and explain Apache .htaccess files. Use when asked to create htaccess rules, redirect URLs, set security headers, enable caching, c... It is an AI Agent Skill for Claude Code / OpenClaw, with 96 downloads so far.

How do I install Htaccess Toolkit?

Run "/install htaccess-toolkit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Htaccess Toolkit free?

Yes, Htaccess Toolkit is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Htaccess Toolkit support?

Htaccess Toolkit is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Htaccess Toolkit?

It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.

💬 Comments