Clautron

By dudaster

0+ active installationsVersion 1.6.0

Get the feature. Not the plugin. Add exactly the WordPress capability you need: inspectable, secure, reversible.

Description

WordPress can do almost anything, and that flexibility built a bad habit: every small feature becomes a full plugin install. One feature becomes one plugin. Thirty features become thirty plugins, each with its own code, dependencies, updates, and attack surface, for functionality you might use once.

Get the feature. Not the plugin.

Clautron is the capability layer for WordPress. Describe what you need: an admin column, a 301 redirect, a WooCommerce rule, a login-form tweak, a scheduled report. Clautron adds exactly that, built from small, inspectable, reusable building blocks called primitives. Nothing more.

One secure layer. Thousands of capabilities.

Every capability Clautron builds can be activated and deactivated the same predictable way, without touching any data it wrote while it was on. Before you turn one on, you can see what it reads, what it writes, what it connects to, and how much it changes.

Key features:

  • Capabilities, not plugins: get exactly the functionality you asked for, composed from small, auditable primitives instead of one more oversized plugin
  • Search first, generate second: Clautron checks what already exists before generating anything new; when it does generate something, you review it before it runs
  • Know what runs on your site: every capability is built from a declared, inspectable set of primitives
  • Deactivate without data loss: turn any capability off without digging through code. Nothing it wrote while active is touched, and turning it back on reactivates the same capability instead of starting over
  • Machine-readable capability manifest: each capability can declare its own version, requirements, required permissions, and effects (what it reads, writes, or connects to). External tools like AICOM can inspect and manage capabilities through this same contract, without hardcoded per-capability logic
  • Know what a capability does before you turn it on: every building block declares whether it writes data, deletes data, sends data off the site or outputs code, and whether turning it off fully undoes it
  • Accessibility toolbar without an accessibility plugin: let visitors enlarge text, raise contrast, underline links and more, remembered per visitor; it helps them set their preferences and does not make a site compliant on its own
  • Security hardening without a security plugin: stop username discovery, add the missing security headers and hide the WordPress version, each as a small capability you can switch off again
  • Ready for AI agents: every Clautron operation is a WordPress Ability with its own schema, so AI agents and tools like AICOM can find and use them without custom integration code
  • Scheduled jobs and reports: recurring automations and on-demand data queries, without a separate plugin for each
  • Safe by construction: a safety policy layer blocks dangerous operations before they run

External Services

This plugin uses the WordPress AI Client (built into WordPress 7.0+) to generate blueprint configurations from natural language descriptions. Clautron does not directly connect to any external AI service.

All AI requests are routed through the WordPress AI Client. The provider that receives your prompts is determined by the AI provider configured in your WordPress installation’s AI settings. Please refer to the terms of service and privacy policy of your configured AI provider.

Installation

  1. Upload the clautron folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to Clautron in the admin menu.
  4. Go to Settings and enter your AI provider API key.

FAQ

Which AI providers are supported?

Clautron uses the WordPress AI Client (built into WordPress 7.0+). The provider is configured at the WordPress level: go to your WordPress AI settings to choose and configure a provider. No API keys are stored by this plugin.

Is my data sent to third-party services?

Only the natural language prompts you type in the AI Assistant are sent to your AI provider, via the WordPress AI Client. Clautron does not directly connect to any external AI service; all communication is handled by WordPress core. No WordPress content, posts, users, or site data is transmitted.

What are primitives, and what’s a capability?

Primitives are the small, reusable building blocks Clautron composes things from: custom post types, meta fields, admin columns, scheduled tasks, and more. A capability is what you actually get: a specific piece of functionality (a redirect, an admin column, a WooCommerce rule) built from one or more primitives, that you can activate or deactivate as one unit. Some capabilities also carry a manifest (a declared version, requirements, and effects) that lets external tools install, inspect, update, and deactivate them without capability-specific code.

Does this plugin store data in the database?

Yes. Clautron creates its own database tables (prefixed with wp_clautron_) to store blueprints, conversation history, scheduled jobs, workflow state, capability install state, and execution logs. All data is removed if you uninstall the plugin.

What permissions are required?

Clautron’s own screens are only available to administrators (manage_options capability). Clautron adds nothing to the frontend by itself: visitors only see changes from capabilities you activate, such as a consent banner, a redirect or security headers.

Screenshots

Changelog

1.6.0

  • Added add_inline_css and add_inline_script: CSS rules or JavaScript on frontend pages, loaded the WordPress way (wp_add_inline_style / wp_add_inline_script), so they print once, in the right place, and can carry a Content-Security-Policy nonce.
  • inject_wp_footer and inject_wp_head now accept
  • Added a ready-made Accessibility Toolbar capability: larger text that works with any font size unit a theme uses, high contrast, underlined links, a readable font, more spacing and stopped animations, remembered per visitor and usable with the keyboard and screen readers. It helps visitors set their preferences; it does not make a site accessible or compliant on its own.
  • hide_wp_version no longer deletes readme.html: block_readme and block_plugin_readmes make readme.html and every plugin’s readme and changelog answer 404 through rules in Clautron’s own .htaccess block on Apache and LiteSpeed, taken out again on deactivation. On nginx the check shows the server rule to add.
  • Adding JavaScript now needs the unfiltered_html capability and adding CSS the edit_css capability, the same rule WordPress applies to raw code. The check runs when a capability is created, never on page views.
  • Fixed templates printing the contents of
  • Fixed editing or importing a blueprint in the admin, and messages to the AI assistant, losing their HTML, CSS and JavaScript.
  • The cookie consent banner, its Google Consent Mode signal and gated third-party snippets are now printed through WordPress functions; the consent demo is renamed Cookie Consent Banner.

1.5.0

  • Added harden_user_enumeration: stops anonymous visitors from discovering usernames. Logged-out requests to the /wp/v2/users REST endpoints get a 401 (logged-in users and the block editor keep working), every author archive returns a 404, the users sitemap is removed, oEmbed shows the site instead of the author, and the login form gives the same error for an unknown username and a wrong password.
  • Added security_headers: sends Referrer-Policy, X-Content-Type-Options, X-Frame-Options and Permissions-Policy, plus Strict-Transport-Security (HSTS) on HTTPS when you opt in. Its check loads your homepage to confirm the headers actually reach visitors, so a page cache or CDN that drops them is reported.
  • Added hide_wp_version: removes the WordPress, WooCommerce and Elementor generator tags from pages and feeds, and masks the WordPress version in asset URLs while keeping browser caches working. Optionally deletes readme.html, and deletes it again after each WordPress update.
  • Added a ready-made Security Hardening capability built from these three primitives.
  • Every Clautron operation (catalog, install, inspect, update, deactivate, blueprints, events) is now a WordPress Ability with its own input schema and behavior annotations, so AI agents and management tools such as AICOM can discover and call them without Clautron-specific code. New: primitive-apply, which applies a single primitive as its own capability, validated and verified.
  • Every primitive now declares its effects: whether it writes data, writes files, deletes data, sends data off the site, outputs code from its configuration, or changes the content model, and whether turning it off fully undoes it. Installing, applying or ensuring a capability reports these effects, in a dry run too, together with the step that reverses the change.
  • Fixed ensuring a deactivated custom capability creating a second copy of it: it is now reactivated.
  • Fixed register_cpt writing the edit_post, read_post and delete_post meta capabilities into the administrator role on every page load.
  • http_request, fetch_feed, create_post and add_admin_notice are now flagged as needing approval, like the other primitives that can send data off the site, delete data or output code.

1.4.0

  • Added consent_banner: a category-based cookie-consent banner (necessary/analytics/marketing) with an anonymous REST endpoint to record the visitor’s choice, a full audit trail (who consented to what, when, from which source) in the events store, and automatic opt-out when the visitor’s browser sends the Global Privacy Control (Sec-GPC) signal.
  • Added gate_script_by_consent: outputs a script or HTML block only once its required consent category has been granted, reading the same cookie consent_banner writes.
  • consent_banner can emit Google Consent Mode v2 signals (gtag consent default/update), mapping consent categories to Google’s ad_storage/analytics_storage/ad_user_data/ad_personalization signals for GA4 and Ads.
  • Fixed handle_upload’s internal failure closure declaring a standalone false return type, valid only since PHP 8.2, which fataled on activation despite the plugin declaring Requires PHP 8.1.

1.3.0

  • Added a machine-readable capability manifest (version, platform/PHP/WordPress requirements, required permissions, declared effects, reversibility), kept separate from a capability’s blueprint and joined only by capability_id. Lets external tools like AICOM install, inspect, update, and deactivate capabilities through one consistent contract instead of capability-specific code.
  • Added a new wp_clautron_capabilities table tracking each capability’s installed version and status separately from its blueprint. This enables comparing installed vs. available version and reinstalling a deactivated capability without losing its edit history.
  • Added a deactivate operation: stops a capability from being re-applied on future requests without touching any data it wrote while active. Reinstalling afterward reactivates the same capability rather than creating a duplicate.
  • Added an update operation: re-syncs an installed capability to its manifest’s current declared version in place.
  • Primitive verification (used to confirm a compiled capability is correctly wired into WordPress) is no longer a fixed, hardcoded checklist covering a handful of primitive types: each primitive now declares its own check, and any primitive without one is reported explicitly rather than silently skipped.
  • Fixed the metabox verification check to look up the actual registered meta box ID (it was checking an ID that never matched, so it could never report success).

1.2.0

  • Added 8 new primitives: redirect (301 redirects), cookie (read/write first-party cookies), filter_query_by_language (multilingual query filtering), read_request_param (GET/POST input), register_payment_webhook (signed webhook receiver), filter_query_by_params (faceted product/content filtering), rate_limit_check (abuse throttling), register_sitemap (dynamic XML sitemaps).
  • Added configure_smtp, handle_file_upload, log_all_emails, and log_activity primitives for SMTP relay configuration, file uploads, outgoing email logging, and site activity/audit logging.
  • Extended add_metabox’s fields template and added add_options_page with select, radio, image, and repeater field types: structured custom fields and site-wide settings pages, no new plugin required.
  • Extended register_cpt and register_taxonomy with additional registration options: capability_type, menu_position, show_in_menu, exclude_from_search, show_admin_column, show_in_quick_edit, show_tagcloud.
  • Fixed query_posts, count_posts, and query_users to resolve {{variable}} placeholders inside meta_query/tax_query: dynamic filters (e.g. a price range from a URL parameter) now actually work.
  • Fixed inject_wp_footer to render on every frontend page (not just singular views) when post_types is left empty, and added suppress_if_cookie so a banner can hide itself after being dismissed.
  • Fixed register_shortcode’s HTML allowlist silently stripping form/input/textarea/select elements, breaking any shortcode-rendered form.
  • Fixed register_cpt to auto-grant a custom capability_type’s resulting capabilities to the administrator role; previously even admins got a 403 on the new post type.

1.1.0

  • Added Elementor widget primitive: create custom Elementor widgets from blueprints with full controls and template rendering.
  • Added WordPress widget primitive: create classic sidebar widgets from blueprints with text, textarea, select, number, URL, and checkbox controls.
  • Fixed missing nonce on the New Widget link in the Widgets admin page.
  • Updated admin menu icon to a custom SVG logo.

1.0.9

  • Hardened write_option primitive: added comprehensive denylist blocking WordPress core options and any option name containing sensitive substrings (password, secret, api_key, token, salt, private_key).
  • Hardened read_option primitive: added denylist blocking reads of auth keys, salts, passwords, and API credential options to prevent exposure of sensitive data.

1.0.8

  • Migrated AI integration to WordPress AI Client (WordPress 7.0+); removed direct Anthropic, OpenAI, Grok, and Ollama provider integrations.
  • Added missing nonce checks to handle_delete_blueprint, handle_rollback_version, handle_get_blueprint_preview AJAX handlers.
  • Added nonce to admin list table filter (primitive-ui) and verified on parse_query.
  • Fixed unsafe SQL in DB uninstall and migration: DROP TABLE, SHOW COLUMNS, ALTER TABLE now use wpdb::prepare() with %i placeholder.
  • Updated minimum WordPress requirement to 7.0.

1.0.7

  • Fixed SQL query builders: replaced dynamic WHERE/ORDER concatenation with fully literal SQL strings and bypass conditions to satisfy WordPress.DB.PreparedSQL.NotPrepared.
  • Moved tests/ directory outside the plugin folder (development-only, not distributed).
  • Removed stray .DS_Store file.

1.0.6

  • Fixed EscapeOutput: use JSON_HEX_TAG instead of str_replace for JSON-LD script output.
  • Fixed SQL preparation: refactored query/aggregate builders to use %i table placeholder and single prepare() call with explicit placeholders.
  • Fixed input handling: replaced direct $_GET/$_POST access with filter_input() throughout.
  • Renamed non-prefixed page-scope variables to use clautron_ prefix.

1.0.4

  • Replaced all external policy deep-links with root domain URLs to avoid Cloudflare-blocked automated checks.

1.0.3

  • Updated external service URLs in readme (OpenAI policy links).
  • Confirmed compatibility with WordPress 7.0.

1.0.2

  • Security: added explicit nonce checks in all AJAX handlers.
  • Security: added capability checks in admin page callbacks.
  • Removed create_user primitive per wp.org review guidelines.
  • Author URI updated to WordPress.org profile.

1.0.0

  • Initial release.