← 返回 Skills 市场
charlie-morrison

Htaccess Toolkit

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
96
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install htaccess-toolkit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /htaccess-toolkit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug htaccess-toolkit
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 96 次。

如何安装 Htaccess Toolkit?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install htaccess-toolkit」即可一键安装,无需额外配置。

Htaccess Toolkit 是免费的吗?

是的,Htaccess Toolkit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Htaccess Toolkit 支持哪些平台?

Htaccess Toolkit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Htaccess Toolkit?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论