Logo Botblocker Addon Skill

Botblocker Addon Skill

Cộng đồng
MADEVAL
botblocker-addon-skill

Use when building, reviewing, debugging, packaging, or validating BotBlocker Security add-ons - WordPress anti-bot firewall extensions that ship as Add-on API v2 packages with a bbcs-addon.json manifest. Trigger keywords: BotBlocker add-on, bbcs-addon.json, Add-on API v2, addon lifecycle callback, settings.option sanitizer, traffic_decision_provider, runtime.pre_run, BotBlockerAddons::fileUrl, validate-addon, package-addon. Use ONLY for BotBlocker add-on development; do not use for general WordPress plugins or for editing BotBlocker core itself.

Tổng quan

Nhà phát hànhMADEVAL
Kho mãBotBlocker-Add-on-Developer-Kit
Tên kỹ năngbotblocker-addon-skill
Sao
23
Bản fork
1
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépGPL-2.0-or-later
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được MADEVAL công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Botblocker Addon Skill trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/MADEVAL/BotBlocker-Add-on-Developer-Kit/tree/main/ai/botblocker-addon-skill
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MADEVAL/BotBlocker-Add-on-Developer-Kit.git /tmp/BotBlocker-Add-on-Developer-Kit
mkdir -p .claude/skills
cp -r /tmp/BotBlocker-Add-on-Developer-Kit/ai/botblocker-addon-skill .claude/skills/botblocker-addon-skill
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Botblocker Addon Skill trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Botblocker Addon Skill ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Botblocker Addon Skill không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

BotBlocker Add-on Developer Skill

This skill is the orchestrator for the BotBlocker Add-on Developer Kit. It routes you to the right kit document for each task instead of restating it. Read the mapped doc before writing code.

Kit scope and wiring

  • All docs/, tools/, and examples/ paths below are relative to the kit root (the folder that contains this kit's README.md). The skill assumes the kit repository is the working directory.
  • To register as an opencode skill: add the kit's ai directory to skills.paths in opencode.json, or copy ai/botblocker-addon-skill/ into .opencode/skills/. Keep the full kit reachable so the referenced docs and tools resolve.
  • This skill never edits BotBlocker core. It builds and reviews third-party add-on packages only.

Product context

BotBlocker Security is a WordPress anti-bot firewall and Web Application Firewall. It protects production traffic through request checks, rules, CAPTCHA layers, logs, live monitoring, early-init protection, and add-on extensions.

  • Baseline: BotBlocker Security 1.7.5 (minimum version for the Add-on API v2 system), WordPress 5.9+ (tested to 7.1), PHP 7.4+.
  • Add-ons must extend protection, integrations, reporting, diagnostics, admin workflows, privacy notices, or safe automation without weakening core.

Runtime truth (memorize)

  • Installed add-ons are scanned and loaded from wp-content/uploads/botblocker/addons/{slug} - not from this kit and not from your source folder.
  • Delivery flow: build a source folder → ZIP it with exactly one root folder named after the slug → upload in BotBlocker -> Add-ons → activate from the Installed tab → configure in BotBlocker -> Add-ons from the add-on settings tab when settings exist.
  • A normal active add-on core file is included after the main request-check cycle. Only a runtime.pre_run traffic_decision_provider participates inside the cycle. See docs/botblocker-runtime-contract.md.

When to use

Building Add-on API v2 packages; editing bbcs-addon.json; implementing core files, settings views, sanitizers, lifecycle callbacks, or feature providers; packaging/validating add-on ZIPs; reviewing compatibility with 1.7.5+. Current core is Add-on API v2 only - a package without bbcs-addon.json is skipped by the scanner and never loads.

Do NOT use for

  • General WordPress plugin work unrelated to BotBlocker add-ons.
  • Editing BotBlocker core unless the user explicitly requests it.
  • Add-ons that disable, weaken, or silently bypass BotBlocker protections.
  • Add-ons that collect visitor personal data without a clear, documented purpose.
  • Publishing credentials, private URLs, license keys, or production secrets.

Pre-flight: mandatory discovery

Before writing any code, settle these. Ask the user when unknown:

slug · name · purpose · runtime surface (admin / frontend / request-headers / cron / API / diagnostics) · whether BotBlocker request data is needed · whether decisions can run after BotBlocker allows the request, or must run in-cycle · minimum BotBlocker and PHP versions · function/class prefix · option name · settings fields · sanitizer behavior · lifecycle needs · feature capability names · asset/icon paths · help text and links · admin/frontend test steps.

Reference map - read the doc, do not guess

TaskRead
Scan/install/activate/load model, runtime dirsdocs/botblocker-runtime-contract.md
Manifest schema, fields, validity, packagingdocs/addon-api-v2.md
ZIP shape, upload flow, common upload errorsdocs/packaging-and-upload.md
Lifecycle callbacks, $addon/$context, features, BotBlockerAddons APIdocs/lifecycle-and-features.md
Settings save/read contract and option arraydocs/settings-contract.md
Settings tab layout, field wrappers, markupdocs/settings-ui-patterns.md
Add-on abilities (abilities manifest key)docs/abilities.md
Reading the live BotBlocker object safelydocs/botblocker-core-object.md
Available visitor/request/decision fieldsdocs/botblocker-request-data.md
Read-only core settings for decisionsdocs/botblocker-settings-reference.md
Post-check redirects vs pre-run providersdocs/traffic-and-redirect-addons.md
In-cycle pre-run traffic_decision_provider contractdocs/core-hook-integration.md
Weekly-report add-ons (cron only, no pre-run)docs/addon-api-v2.md (Weekly-report add-ons)
Custom CAPTCHA mode (Turnstile/hCaptcha-style provider)docs/addon-api-v2.md (Captcha modes)
Required security/quality bardocs/code-quality-standard.md
Static / package / WordPress / asset / multisite testsdocs/testing.md
Kit/core/runtime compatibility comparisondocs/compatibility-matrix.md
Known core implementation gaps to verifydocs/known-core-contract-gaps.md
Public links, banners, icons, screenshotsdocs/links-and-assets.md

Reference packages: examples/acme-botblocker-sample (canonical normal add-on) and examples/acme-traffic-guard (advanced pre-run traffic provider - use only when in-cycle decisions are truly required).

Fast path

  1. Copy examples/acme-botblocker-sample to a folder named with the final slug.
  2. Rename the folder, manifest slug, root PHP file, text domain, function prefix, option name, handles, CSS classes, and JS globals.
  3. Define behavior in inc/core.php; admin controls in inc/settings.php.
  4. Declare every field under settings.option; implement the manifest sanitizer.
  5. For visitor/request data or traffic control, follow the mapped docs above.
  6. Validate the folder, package the ZIP, validate the ZIP, then upload and test.

Essential patterns (full detail in the mapped docs)

  • Manifest minimum (docs/addon-api-v2.md): a valid package needs slug, name, version, requires_core, and an existing core file. Always also declare schema: "2.0", requires_php, description, main, assets.icon, and assets.readme.

  • Abilities (docs/abilities.md): use the manifest abilities array. Core registers, capability-checks and audits; never call wp_register_ability(). The toggle key lives in your settings.option, not in core settings.

  • Settings field naming (docs/settings-contract.md) - third-party v2 must use the option array; plain names only work for BotBlocker's built-in core logic:

    php
    <input type="hidden"   name="vendor_addon_settings[enabled]" value="0">
    <input type="checkbox" name="vendor_addon_settings[enabled]" value="1">
  • Asset URLs (docs/addon-api-v2.md) - uploaded add-ons run outside the plugin source; never use plugin_dir_url():

    php
    BotBlockerAddons::fileUrl( 'vendor-addon', 'assets/admin.js' );
  • Lifecycle signature (docs/lifecycle-and-features.md): every callback is function vendor_addon_event( array $addon, array $context, string $event, string $slug ): void and must be idempotent. Use your own prefixed function names.

  • Captcha add-on (docs/addon-api-v2.md, Captcha modes; example examples/acme-hcaptcha): declare captcha.modes with ids >= 90 only. Callbacks live in the core file (loaded pre-run). Declare an optional keys_callback: fn(): bool readiness probe so the mode stays disabled in the CAPTCHA dropdown until the provider keys are stored. The renderer JS MUST define renderMode{ID}Captcha(params); on success append the provider token to window.data and call window[bbcsJsData.checkFunctionName]('post', window.data, params.hash).

    php
    // verify_callback semantics (fail-safe contract):
    '' === $token                    -> return false;   // provider never called
    $data['success'] === true/false  -> return bool;    // false = bot path = wrong-click ban
    outage / non-200 / bad JSON      -> throw RuntimeException; // core degrades to mode 1

    Never echo, never die(), never return non-bool from verify_callback. Provider keys belong on YOUR addon settings page (settings.option), not in core.

Hard rules (non-negotiable guardrails)

  • Prefix every symbol: function, class, option, action, filter, transient, cron hook, asset handle, JS global, and package-owned CSS class.
  • Guard every PHP file with ABSPATH; pre-run files may also require BOTBLOCKER.
  • Never echo from inc/core.php (or a pre-run file) during load.
  • Register WordPress hooks only when the add-on is active and should run.
  • Escape all output; sanitize every stored field in the declared sanitizer.
  • Use activation callbacks for defaults and delete callbacks for owned cleanup.
  • Never write into the BotBlocker plugin source directory; never assume the kit repository exists in production.
  • Never read raw unsanitized $_GET/$_POST/$_FILES/$_COOKIE/$_SERVER.
  • Keep remote calls explicit, documented, timeout-bound, and optional.
  • Stay PHP 7.4 compatible (no match, enums, readonly, named args, str_contains, typed properties in add-on style that targets 7.4).

Traffic add-ons: critical-risk gate

A traffic add-on can redirect, allow, bypass, block, or challenge real production requests. Treat every decision as a security change.

  • Prefer post-check WordPress hooks. Use the runtime.pre_run traffic_decision_provider contract only when in-cycle decisions are truly required (docs/core-hook-integration.md).
  • Ship disabled by default, dry-run (log_only) first, staging-tested, with documented rollback.
  • Skip BotBlocker check/block/denied pages, admin, AJAX, cron, REST, unsafe HTTP methods, payment callbacks, and verified legal bots by default.
  • Use wp_safe_redirect(), loop protection, and same-site or allowlisted hosts.
  • Do not use allow, bypass, block, or captcha decisions for marketing routing - those require an explicit security/integration rationale.

Review checklist

  • Root folder name equals manifest slug; ZIP archives the folder, not loose files.
  • bbcs-addon.json is valid JSON; required fields present; requires_core/requires_php accurate.
  • Declared core, settings.view, assets.icon, assets.readme paths exist.
  • description explains purpose, runtime surface, and configurable behavior.
  • Settings view opens with a BotBlocker help block; inputs use {settings.option}[field] names.
  • Sanitizer normalizes every stored field; lifecycle callbacks are callable and idempotent.
  • Assets use BotBlockerAddons::fileUrl() with unique handles; no plugin_dir_url().
  • No unprefixed globals; no raw superglobal use; no writes outside the owned data plan.
  • Package passes tools/validate-addon.php (folder and ZIP).
  • Package installs, activates, saves settings, deactivates, deletes, and reinstalls cleanly.

Packaging and validation

From the kit root (see kit README.md for the full reference):

powershell
php  .\tools\validate-addon.php .\examples\acme-botblocker-sample
.\tools\package-addon.ps1 -AddonPath .\examples\acme-botblocker-sample -DestinationPath .\dist\acme-botblocker-sample.zip
php  .\tools\validate-addon.php .\dist\acme-botblocker-sample.zip

Manual ZIP must archive the folder itself (one root folder): zip -r {slug}.zip {slug}. Do not use Compress-Archive (backslash separators break extraction on Linux hosting); prefer .\tools\package-addon.ps1.

Output format when creating an add-on

Return: file tree · manifest summary · runtime behavior summary · settings summary · lifecycle summary · feature providers · asset paths · packaging command · validation command · manual test steps · compatibility notes (target BotBlocker version, PHP version, and WordPress version).

Câu hỏi thường gặp

Kỹ năng AI Botblocker Addon Skill làm được gì?

Use when building, reviewing, debugging, packaging, or validating BotBlocker Security add-ons - WordPress anti-bot firewall extensions that ship as Add-on API v2 packages with a bbcs-addon.json manifest. Trigger keywords: BotBlocker add-on, bbcs-addon.json, Add-on API v2, addon lifecycle callback, settings.option sanitizer, traffic_decision_provider, runtime.pre_run, BotBlockerAddons::fileUrl, validate-addon, package-addon. Use ONLY for BotBlocker add-on development; do not use for general WordPress plugins or for editing BotBlocker core itself.

Vì sao nên dùng Botblocker Addon Skill trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Botblocker Addon Skill là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Botblocker Addon Skill trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/MADEVAL/BotBlocker-Add-on-Developer-Kit/tree/main/ai/botblocker-addon-skill. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Botblocker Addon Skill?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Botblocker Addon Skill với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Botblocker Addon Skill với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Botblocker Addon Skill có miễn phí không?

Có. Kỹ năng này được MADEVAL phát hành trên GitHub theo giấy phép GPL-2.0-or-later. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇