rule-creation

Auto-triggers Context Engineering compliance and Lobster enforcement when proposing, creating, or formalizing rules, policies, processes, or behavioral constraints. Implements the principle: the act of stating a rule IS the trigger to wire it.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "rule-creation" with this command: npx skills add levineam/rule-creation

rule-creation Skill

Description

Auto-triggers Context Engineering compliance and Lobster enforcement evaluation when proposing, creating, or formalizing new rules, policies, processes, workflows, or behavioral constraints.

Context Engineering is the practice of wiring rules into your AI's context so they're reliably followed — not just hoped for via prompting. Credit: Muratcan Koylan (@koylanai)

Use this skill any time you are:

  • Declaring a new rule (e.g. "From now on, always X")
  • Formalizing a policy (e.g. "The policy for Y is Z")
  • Creating a behavioral constraint (e.g. "Never do X without doing Y first")
  • Proposing a process or workflow
  • Updating governance documents (TOOLS.md, CRITICAL-RULES.md, CONSTITUTION.md, etc.)

When This Skill Matches

Trigger phrases:

  • "Add this rule…"
  • "Create a policy…"
  • "From now on…"
  • "The rule is…"
  • "New constraint…"
  • "Formalize that…"
  • "Wire this rule…"
  • "Make it a HARD rule…"
  • Any governance/policy update request

Mandatory Workflow

When this skill triggers, always execute the following steps in order. Do NOT ask permission — CE-PROCESS compliance means wire first, report after.

Step 1: Identify the Rule

Extract:

  • Rule name — short slug (e.g. no-bare-spawns, external-message-gate)
  • Rule description — plain language statement of what the rule requires
  • Rule typeHARD (non-negotiable, always enforced) or soft (guideline, use judgment)

Step 2: Evaluate Enforcement Need (CR-012 Criteria)

Run scripts/evaluate-enforcement-need.js or apply manually:

A rule needs Lobster enforcement if ANY of the following are true:

CriterionExamples
High-stakesSends external messages, spends money, deletes data, publishes public content, deploys to production
Pattern of violationsA similar rule was already stated but broken or ignored
Multi-step sequenceRequires multiple ordered steps (do A, then B, then C)
External / public actionAffects things outside the user's local files

Scoring:

  • 0 criteria matched → needsEnforcement: false (wire to TOOLS.md only)
  • 1+ criteria matched → needsEnforcement: true (create Lobster workflow + wire)

Step 3: Lobster Availability Preflight

Before creating any workflow, verify Lobster is actually enabled:

Run scripts/check-lobster-available.js or check manually:

openclaw plugins list | grep -i lobster
OutputMeaningAction
lobster … loaded✅ AvailableProceed to Step 3a
lobster … disabled❌ UnavailableUse fallback (below)
No lobster row❌ Not installedUse fallback (below)

Fallback when Lobster is unavailable:

  • Skip workflow creation entirely
  • Proceed directly to Step 4 (wire to docs) — no Lobster reference in the entry
  • Report: ⚠️ Enforcement: unavailable (Lobster not enabled)
  • Include hint: Run: openclaw plugins enable lobster to activate

Never claim enforcement is wired when Lobster is disabled.

Step 3a: Create Lobster Workflow (enforcement needed AND Lobster available)

If needsEnforcement: true and Lobster preflight passed:

  1. Copy templates/lobster-workflow.template.lobster
  2. Fill in: name, description, steps specific to rule enforcement
  3. Save to workflows/<rule-name>.lobster
  4. Note the workflow path for wiring

Step 4: Wire to Docs

Run scripts/wire-rule-to-docs.js or manually append to the appropriate file:

Routing:

  • Operational rules → TOOLS.md
  • Identity/persona constraints → SOUL.md or agents/identity.md
  • Hard system rules → CRITICAL-RULES.md (if exists) or AGENTS.md
  • Project-specific rules → relevant project board or agents/projects.md

Entry format (from templates/tools-md-entry.template.md):

## <Rule Name> (<HARD|soft>)

<Rule description>

[If Lobster enforcement]: **Enforced by:** `workflows/<rule-name>.lobster`

Step 5: Report What Was Done

Your response must include:

✅ Rule wired: <Rule Name>
📄 Location: <file where it was added>
🔒 Enforcement: <Lobster workflow path OR "TOOLS.md entry only">
📋 Type: <HARD|soft>

Never say:

  • ❌ "Want me to add this to TOOLS.md?"
  • ❌ "Should I wire this through CE?"
  • ❌ "Is this CE compliant?"

Always say:

  • ✅ "Added <rule> to <file>. Enforcement: <status>."

Script Reference

ScriptPurpose
scripts/check-lobster-available.jsPreflight: verify Lobster plugin is enabled in this OpenClaw instance
scripts/evaluate-enforcement-need.jsEvaluate CR-012 criteria against rule description
scripts/wire-rule-to-docs.jsAppend rule entry to TOOLS.md or specified target file
scripts/report-rule-creation.jsGenerate user-facing summary of what was created

Workflow Reference

WorkflowPurpose
workflows/create-rule.lobsterFull end-to-end rule creation pipeline

Context Engineering Auto-Trigger (HARD)

This skill embodies the Context Engineering Auto-Trigger principle:

"When proposing any new rule, behavioral constraint, or policy change: Wire it first. Add the rule to the appropriate file BEFORE responding. Never ask permission to formalize a rule."

The act of recognizing a rule IS the trigger. Wire immediately. Report after.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

low-carbon-medicine

低碳生活方式医学咨询。当用户提到低碳饮食、生酮饮食、减肥控糖、糖尿病逆转、代谢综合征、胰岛素抵抗时触发。

Registry SourceRecently Updated
General

x0x-api-smoketest-1777556197822

Scratch skill used to validate CI API publish flow before merge.

Registry SourceRecently Updated
General

java-circular-dependency-breaker

Break circular dependencies in Java multi-module Gradle/Maven projects using interface extraction and business service separation. Triggers: 'circular depend...

Registry SourceRecently Updated
General

Options Trading Brain

Professional options trading intelligence system. Monitors whale flow (Unusual Whales), counts Elliott Waves, analyzes Bollinger Bands, multi-timeframe trend...

Registry SourceRecently Updated