Platform Rules Engine for Openclaw

A local, zero-dependency Python CLI tool that scans social media drafts against 30+ algorithmic rules to prevent shadowbans, link penalties, and downranking.

phy041
v1.0.3
Mar 23, 2026
0
691
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install phy-platform-rules-engine

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install phy-platform-rules-engine using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Platform Rules Engine?

The Platform Rules Engine is an automated pre-flight checker designed to audit social media posts before they are published. Operating like an code linter but tailored for organic reach algorithms, this tool evaluates draft content against more than 30 invisible platform-specific rules. It provides a numeric score from 0 to 100, lists rule statuses as PASS, WARN, or FAIL, and offers precise, actionable recommendations to fix violations.

As a utility within the Openclaw Skills ecosystem, the rules engine executes entirely locally on Python 3.7+ without external dependencies or API overhead. By identifying reach-killing triggers such as LinkedIn's AI content flags, Reddit's self-promotion ratios, Twitter/X's external link penalties, and HackerNews' tutorial downranking, this skill ensures posts conform to native platform expectations before publication.

Platform Rules Engine Use Cases

  • Pre-publish optimization: Audit drafts for LinkedIn, X/Twitter, Reddit, and HackerNews to maximize reach and avoid shadowbans.
  • Algorithmic compliance checks: Scan content for secret penalty triggers like early outbound links, clickbait language, or engagement bait NLP patterns.
  • Automated editorial workflows: Run the tool within marketing platforms or developer command lines to enforce high editorial standards across multi-author teams.

How Platform Rules Engine Works

  1. Content input: The user feeds a draft post into the tool via text inputs, absolute file paths, or stdin pipelines.
  2. Platform targeting: The script parses arguments to target specific algorithmic rules for Reddit, LinkedIn, Twitter/X, or HackerNews.
  3. Pre-flight linting: It evaluates the content against over 30 algorithmic data thresholds, analyzing length, hook strength, link placement, and potential AI patterns.
  4. Diagnostic reporting: The engine calculates a compliance score and renders structured terminal output detailing PASS, WARN, or FAIL statuses.
  5. Automation processing: Integrations can request pure JSON responses and leverage deterministic exit codes to decide if drafts should proceed to scheduling.

Platform Rules Engine Setup

The tool runs natively in Python 3.7+ using only the standard library.

# Run audit on a Reddit draft via terminal pipe
echo "Draft post text" | python3 ~/.claude/skills/phy-platform-rules-engine/scripts/platform_rules.py --platform reddit

# Audit a LinkedIn post saved in a local file
python3 ~/.claude/skills/phy-platform-rules-engine/scripts/platform_rules.py --file draft.txt --platform linkedin

# Audit a Twitter/X thread draft
python3 ~/.claude/skills/phy-platform-rules-engine/scripts/platform_rules.py --text "My new thread..." --platform twitter

You can easily integrate this tool within your Openclaw Skills directory structure for localized, agent-driven content production pipelines.

Platform Rules Engine Data Schema & Taxonomy

CLI Arguments and Configurations

Argument Type Required Description
--platform string Yes Target platform for rule validation: reddit, linkedin, twitter, hackernews
--file string No Path to a text file containing the draft content
--text string No Raw content string to evaluate inline
--format string No Output formatting mode: text (default console format) or json

JSON Output Schema

When invoking the command with --format json, the response utilizes the following schema structure:

{
  "score": 20,
  "status": "HIGH RISK",
  "metrics": {
    "pass": 2,
    "warn": 3,
    "fail": 2
  },
  "results": [
    {
      "rule_id": "R001",
      "rule_name": "Self-promo in opening",
      "status": "FAIL",
      "suggestion": "Move product mention to a reply comment. Lead with value first."
    }
  ]
}

Platform Rules Engine Advanced Features

  • Zero External Dependencies: Operates exclusively using standard Python built-in libraries, resulting in lightweight, secure, and fast executions.
  • Pipeline-Ready Exit Codes: Returns 0 for perfect clear scores, 1 for minor warnings, and 2 for critical failures, allowing direct integration into CI/CD build scripts or webhooks.
  • AI Signal Matching: Uses a built-in database of 37 AI-flagged words and 10 engagement-bait regular expressions matching standard social media NLP filters.
  • Workspace Composition: Designed to chain seamlessly with other Openclaw Skills like phy-content-humanizer-audit for deep pre-publish automation and analysis.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*