← Back to Skills Marketplace
d0roro

the king is watching

by D0roro · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
99
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install kingswatching
Description
AI Workflow Enforcer inspired by the Steam game "The King Is Watching". Just like subjects in the game only work when the King's gaze is upon them, this tool...
README (SKILL.md)

King's Watching - AI Workflow Enforcer + Task Translator

The Three Core Problems We Solve

Problem Scenario King's Watching Solution
Step Skipping AI says "Here's the result" skipping intermediate steps Code-level forced sequence, hard constraints
Timeout Disconnect 15min no response, agent killed by system Heartbeat mechanism + background execution + async notification
Continuity Loss Start from scratch after disconnect State persistence + checkpoint resume
Cutting Corners AI completes 14 items and says "that's enough" Auto task chunking + step verification
Progress Black Box No visibility on long-running tasks Periodic progress reports (natural language intervals)

v0.4.0 Major Upgrade: Task Translator + Progress Reports

The Problem

User says: "Download 100 research reports"

  • Human understands: This is one task
  • AI understands: "100 is too many, I'll do 14 and call it done"
  • Result: Only 14 downloaded, 86 "intelligently skipped"

Solution: TaskTranslator

from overseer import TaskTranslator, translate_and_run

# Natural language command
command = "Download 100 photochemistry research reports"

# Auto translate and execute
result = translate_and_run(command)

Execution Process:

User: "Download 100 reports"
    ↓
TaskTranslator parses intent
    ↓
Identifies: batch download task, target 100 items
    ↓
Calculates: 10 items per batch → need 10 rounds
    ↓
Generates 10 Steps:
  Step 1: Download 1-10 (verify: must complete 10)
  Step 2: Download 11-20 (verify: must complete 10)
  ...
  Step 10: Download 91-100 (verify: must complete 10)
    ↓
King's Watching executes sequentially
    ↓
✅ All 100 completed

Key Innovation: Every Step has forced verification, AI cannot cut corners


Core Usage Patterns

Pattern 1: One-liner Natural Language (Recommended)

from overseer import translate_and_run

# Download 100 reports
result = translate_and_run("Download 100 photochemistry research reports")

# Write 100k word report
result = translate_and_run("Write a 100,000-word industry research report")

# Analyze 1000 data entries
result = translate_and_run("Analyze 1000 user feedback entries")

Pattern 2: Translate First, Then Execute

from overseer import TaskTranslator, Overseer

# Translate natural language
translator = TaskTranslator()
plan = translator.translate("Download 100 reports")

# View execution plan
print(translator.explain_plan(plan))
# 📋 Task Translation Result
# Original command: Download 100 reports
# Task scale: 100 items
# Estimated time: 3000 seconds
# Auto split into 10 execution steps:
#   Step 1: Process 1-10 (of 100)
#          └─ Verify: must complete 10 items
#   Step 2: Process 11-20 (of 100)
#          └─ Verify: must complete 10 items
# ...
# ✅ Each Step has forced verification, AI cannot cut corners

# Create Overseer and execute
workflow = Overseer.from_plan(plan)
result = workflow.run()

Pattern 3: Traditional (Manual Step Definition)

from overseer import Overseer

workflow = Overseer("data_analysis")

@workflow.step("Fetch Data")
def step1(ctx): 
    return download_data()

@workflow.step("Analyze Data", heartbeat_interval=68)
def step2(ctx):
    for i, item in enumerate(items):
        if i % 10 == 0:
            ctx.heartbeat(f"Processed {i}/{len(items)} items...")
        analyze(item)
    return results

@workflow.step("Generate Report")
def step3(ctx): 
    return generate_report()

workflow.run()

AI Capacity Limits Configuration

TaskTranslator has built-in AI capacity limits (prevents overload):

Task Type Per-batch Limit Timeout Verification
Search/Download 10 items 5 min Count check
Writing 2000 words 10 min Word count check
Data Analysis 100 rows 5 min Completeness check
API Calls 20 calls 1 min Count check
File Processing 10 files 3 min Count check

Custom Configuration:

from overseer import TaskTranslator

custom_capacity = {
    "search_download": {
        "max_items": 15,
        "time_limit": 400,
        "verification": "count_check"
    }
}

translator = TaskTranslator(capacity_config=custom_capacity)

Intent Pattern Library

TaskTranslator has built-in common task pattern recognition:

Pattern Recognition Example Task Type
batch_download "Download 100 reports" Batch search and download
report_writing "Write 100k word report" Segmented writing
data_analysis "Analyze 1000 data entries" Batch data analysis
api_batch "Call API 500 times" Batch API calls
file_processing "Process 200 files" Batch file processing

Custom Patterns:

from overseer import TaskTranslator

custom_patterns = [
    {
        "name": "batch_crawl",
        "regexes": [r"Crawl (\d+) web pages", r"Scrape (\d+) data entries"],
        "task_type": "web_crawl",
        "unit": "items",
        "parameters": {"respect_robots": True}
    }
]

translator = TaskTranslator(patterns=custom_patterns)

Step Verification Mechanism

Verification Types

# Count verification (download/analysis tasks)
{
    "type": "count_check",
    "min_required": 10,
    "max_retries": 3,
    "on_failure": "retry_this_chunk"
}

# Word count verification (writing tasks)
{
    "type": "word_count_check",
    "min_required": 2000,
    "max_retries": 3
}

# Completeness verification (data processing tasks)
{
    "type": "completeness_check",
    "required_fields": ["field1", "field2"]
}

Failure Handling

@workflow.step("Batch Download", verification={
    "type": "count_check",
    "min_required": 10,
    "on_failure": "retry",
    "max_retries": 3
})
def download(ctx):
    # If download count \x3C 10, auto retry
    # After 3 retries, mark as failed
    pass

Long-running Task Anti-Timeout

Problem: 15-minute Timeout

User: Analyze 1000 financial reports
Agent: OK, starting analysis...
      [10 minutes later...]
      [15 minutes later... System: Is this agent dead? Kill!]
User: ?

Solution A: Heartbeat Mode (Recommended)

@workflow.step("Batch Analysis", heartbeat_interval=68)  # Report every 68s

def analyze(ctx):
    for i, file in enumerate(files):
        if i % 10 == 0:
            ctx.heartbeat(f"Processed {i}/{len(files)}...")
    return results

Solution B: Background Execution Mode

job = workflow.run_async(
    notify_on_complete=True,
    notify_channel="discord"
)

print(f"Job started: {job.id}")
print(f"ETA: {job.eta}")

Complete Examples

Example 1: Report Collection (Auto-chunking)

from overseer import translate_and_run

# One-liner starts complete workflow
result = translate_and_run(
    "Download 100 photochemistry industry reports covering policy, market, tech, and companies",
    notify_on_complete=True,
    notify_channel="discord"
)

# Output:
# 📋 Task Translation Result
# Original command: Download 100 photochemistry industry reports...
# Task scale: 100 items
# Estimated time: 3000 seconds
# Auto split into 10 execution steps:
#   Step 1: Process 1-10 (of 100)
#   Step 2: Process 11-20 (of 100)
# ...
# ✅ Each Step has forced verification, AI cannot cut corners
#
# ⏳ Step 1/10: download_batch_1...
#    💓 Processed 5/10 items...
#    💓 Processed 10/10 items...
# ✅ Step 1/10 complete
#
# ⏳ Step 2/10: download_batch_2...
# ...
# 🎉 All complete!

Example 2: Report Writing (Auto-chunking)

from overseer import translate_and_run

result = translate_and_run("Write a 100,000-word deep research report on photochemistry industry")

# Auto split into 50 Steps (2000 words each)
# Each Step verifies word count before proceeding

API Reference

TaskTranslator

class TaskTranslator:
    def translate(self, natural_command: str, context: Dict = None) -> Dict:
        """Natural language → YAML execution plan"""
        
    def explain_plan(self, plan: Dict) -> str:
        """Generate human-readable plan description"""

Overseer.from_plan

@classmethod
def from_plan(cls, plan: Dict, **kwargs) -> "Overseer":
    """Create Overseer instance from translation plan"""

translate_and_run

def translate_and_run(natural_command: str, **kwargs) -> Dict:
    """One-liner translate and execute"""

Integration with OpenClaw

# Use OpenClaw cron for chunked scheduling
cron.add(
    schedule={"kind": "every", "everyMs": 600000},  # Check every 10 min
    payload={
        "kind": "agentTurn",
        "message": "Check King's Watching task progress",
        "workflow_id": workflow_id
    }
)

# Use OpenClaw messaging to notify user
message.send(
    channel="discord",
    to=user_id,
    message="🎉 Task complete!",
    file=package_path
)

ProgressReporter (Periodic Reports)

Long-running tasks need progress visibility. King's Watching v0.4.0 adds periodic reporting with natural language interval configuration.

Core Features

Feature Description
Natural Language Config "Every 5 minutes", "Every 10 minutes", "Quarterly"
Default Interval 15 minutes (auto-used when not configured)
Report Content Overall progress, elapsed time, ETA, current step
Smart Estimation Predicts remaining time based on completed steps

Usage

from overseer import Overseer, translate_and_run

# Pattern 1: Default 15-min reports
wf = Overseer("My Workflow")

# Pattern 2: Natural language interval
wf = Overseer(
    "My Workflow",
    report_interval="Every 5 minutes"
)

# Pattern 3: Combined with TaskTranslator
translate_and_run(
    "Download 100 reports",
    report_interval="Every 10 minutes"
)

Supported Interval Formats

# English
"Every 5 minutes"     # → 300 seconds
"Every 10 minutes"    # → 600 seconds
"Quarterly"           # → 900 seconds
"Every 30 seconds"    # → 30 seconds
"Every 1 hour"        # → 3600 seconds

Sample Report Output

============================================================
📊 [14:30:00] Progress Report #3
============================================================
Task: auto_batch_xxx
Overall Progress: 5/10 (50.0%)
Elapsed: 25 minutes
ETA: 25 minutes
Current Step: download_batch_5
Step Status: 5 complete / 10 total
============================================================

Disable Reports

wf = Overseer(
    "Silent Task",
    report_progress=False  # Disable reporting
)

Summary

King's Watching v0.4.0 solves five problems:

  1. Forced Sequence → Hard constraints, AI cannot skip steps
  2. Timeout Disconnect → Heartbeat + background execution + async notification
  3. Continuity Loss → State persistence + checkpoint resume
  4. Cutting Corners → TaskTranslator auto-chunking + step verification
  5. Progress Black Box → ProgressReporter periodic reports (natural language intervals)

Core Value: Enables AI to reliably execute complex, multi-step, large-workload tasks.

One-liner summary:

User says "Download 100", King's Watching auto-splits into 10 Steps, reports every 5 minutes, AI cannot cut corners.

Usage Guidance
What to check before installing or running this skill: 1) Inspect translator and runtime execution paths: open overseer/translator.py and overseer/__init__.py (the files that compile/execute translated workflows). Confirm whether the translator executes arbitrary Python, spawns subprocesses, or performs network calls. If it uses exec()/eval() or writes and imports generated .py files, assume arbitrary code execution is possible. 2) Run in an isolated environment first: test the skill in a disposable VM or container with minimal permissions and no sensitive mounted files. That limits damage if generated workflows perform unwanted actions. 3) Check notification integrations: search the codebase for Feishu/Discord/HTTP clients or webhook usage. If you plan to enable notifications, provide tokens only after auditing the implementation and using scoped secrets / webhooks rather than full-account credentials. 4) Review persistence paths and retention: the skill uses a .overseer state directory by default. Confirm where it writes files and whether those files might contain sensitive data. Consider configuring a dedicated state_dir on non-sensitive storage. 5) Be cautious with the one-liner/auto-run features: translate_and_run and auto-generated skill code can create and immediately execute workflows. Prefer the translate→preview→run pattern (translator.explain_plan, Overseer.from_plan) so you can inspect the generated plan before execution. 6) Note oddities in test code: test_overseer.py inserts an absolute path (/root/.openclaw/...) which may indicate assumptions about environment layout; that is not harmful by itself but worth being aware of. If you cannot review the translator/runtime code yourself, treat the skill as untrusted: avoid running it with access to secrets, system-level directories, or production data.
Capability Analysis
Type: OpenClaw Skill Name: kingswatching Version: 1.0.0 The 'kingswatching' skill is a comprehensive workflow management framework designed to ensure AI agents complete multi-step tasks sequentially and handle long-running processes without timing out. It features state persistence, progress reporting, and a 'TaskTranslator' that uses regex to split natural language commands into manageable execution steps. Review of the core logic in 'overseer/__init__.py', 'translator.py', and 'reporter.py' reveals no evidence of data exfiltration, unauthorized remote control, or malicious prompt injection. The code uses local file storage for state management and standard Python threading for asynchronous tasks, all of which are well-documented and aligned with the tool's stated purpose of improving task reliability.
Capability Assessment
Purpose & Capability
Name/description (AI workflow enforcer: forced sequence, heartbeat, checkpointing, translation) align with the included code and docs. The repository contains a TaskTranslator that claims to convert NL→YAML→Python and then execute that code; that capability is powerful and consistent with the stated purpose, but is also a potential source of unexpected behavior if not constrained.
Instruction Scope
SKILL.md instructs runtime use of translate_and_run and producing enforced workflows. The docs and tests show the skill writes persistent state to .overseer state directories, runs background threads (heartbeats, reporter), and can run generated Python workflows. Those instructions do not explicitly constrain what generated code can do (file I/O, subprocesses, network). The test suite also inserts an absolute sys.path (/root/.openclaw/...) which is an odd hard-coded assumption.
Install Mechanism
No install spec is provided (instruction-only for the skill registry), but the package contains Python source and setup.py. No remote downloads, no extract-from-URL steps were specified in the metadata — low install mechanism risk. The package exposes a console entry point mapping to test_overseer:main which will run tests if installed as a script.
Credentials
The skill declares no required environment variables or credentials, which is proportional to basic offline workflow control. However the docs mention notification integrations (Feishu, Discord) and background notifications (notify_channel), which in practice will require API tokens or webhooks — those are not declared nor documented as required. If you configure notifications, you must supply credentials; absence from the manifest means the skill won't request them up-front, so manually inspect code that performs notifications before providing secrets.
Persistence & Privilege
The skill writes persistent state files (default .overseer, archive directories) and runs background threads to maintain heartbeats and periodic reports. That level of persistence and background activity is consistent with purpose, but it does mean the skill will create and modify files in your agent environment and can run asynchronous tasks. Because the TaskTranslator can generate and execute Python, persisted workflows could contain user-generated code that will be executed on your host.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kingswatching
  3. After installation, invoke the skill by name or use /kingswatching
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of King's Watching: An AI workflow enforcer inspired by "The King Is Watching" game. - Enforces strict sequential execution—no skipping steps. - Adds state persistence with checkpoint resume for continuity after disconnects. - Introduces a heartbeat mechanism to prevent 15-minute timeouts on long tasks. - Features a Task Translator for natural language instructions with auto-chunking and batching. - Implements step verification to guarantee every step is fully completed before moving on. - Provides detailed progress reporting in natural language intervals. - Highly configurable for task types, chunk sizes, verification, timeouts, and intent patterns.
Metadata
Slug kingswatching
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is the king is watching?

AI Workflow Enforcer inspired by the Steam game "The King Is Watching". Just like subjects in the game only work when the King's gaze is upon them, this tool... It is an AI Agent Skill for Claude Code / OpenClaw, with 99 downloads so far.

How do I install the king is watching?

Run "/install kingswatching" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is the king is watching free?

Yes, the king is watching is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does the king is watching support?

the king is watching is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created the king is watching?

It is built and maintained by D0roro (@d0roro); the current version is v1.0.0.

💬 Comments