← 返回 Skills 市场
kittleik

Intrusive Thoughts

作者 kittleik · GitHub ↗ · v0.1.2
cross-platform ⚠ suspicious
811
总下载
0
收藏
3
当前安装
3
版本数
在 OpenClaw 中安装
/install intrusive-thoughts
功能描述
Enables AI agents with moods, intrusive thoughts, memory decay, trust learning, self-evolution, scheduled rituals, and a web dashboard for autonomous behavior.
使用说明 (SKILL.md)

🧠 Intrusive Thoughts

The complete consciousness framework for AI agents

Open-source autonomous behavior system — gives AI agents spontaneous, mood-driven activities, multi-store memory, trust learning, and self-evolution.

GitHub: https://github.com/kittleik/intrusive-thoughts

Quick Start

Run the interactive setup wizard:

./wizard.sh

Or through the main script:

./intrusive.sh wizard

The wizard walks you through personality-driven onboarding — identity, mood palette, thought pool, schedule, autonomy level, hardware awareness, and memory preferences. Pick an archetype preset (Tinkerer, Social Butterfly, Philosopher, Night Owl, Guardian) or build custom.

What This Does

Core Systems

  • 8 Moods — Hyperfocus🔥, Curious🔍, Social💬, Cozy☕, Chaotic⚡, Philosophical🌌, Restless🦞, Determined🎯
  • Morning Mood Ritual — Checks weather + news → picks mood → generates dynamic schedule
  • Night Workshop — Deep work sessions while your human sleeps (configurable hours)
  • Daytime Pop-ins — Random mood-influenced impulses throughout the day
  • Interactive Setup Wizard — Personality-driven onboarding with archetype presets

Advanced Systems (v1.0)

  • 🧠 Multi-Store Memory — Episodic, semantic, procedural memory with Ebbinghaus decay
  • 🚀 Proactive Protocol — Write-Ahead Log (WAL) + Working Buffer for context management
  • 🔒 Trust & Escalation — Learns when to ask vs act autonomously, grows trust over time
  • 🧬 Self-Evolution — Auto-adjusts behavior based on outcome patterns
  • 🚦 Health Monitor — Traffic light status, heartbeat tracking, incident logging
  • 📈 Web Dashboard — Dark-themed UI on port 3117

Cron Jobs

The system needs OpenClaw cron jobs. Set these up after running the wizard:

Morning Mood Ritual (daily)

Schedule: 0 7 * * * (or your configured morning time)

🌅 Morning mood ritual. Time to set your vibe for the day.

Step 1: Run: bash \x3Cskill_dir>/set_mood.sh
Step 2: Read moods.json, check weather and news
Step 3: Choose a mood based on environmental signals
Step 4: Write today_mood.json
Step 5: Run: python3 \x3Cskill_dir>/schedule_day.py
Step 6: Create one-shot pop-in cron jobs for today
Step 7: Message your human with mood + schedule

Night Workshop (overnight)

Schedule: 17 3,4,5,6,7 * * * (or your configured night hours)

🧠 Intrusive thought incoming. Run:
result=$(\x3Cskill_dir>/intrusive.sh night)
Parse the JSON output. The "prompt" field contains a plain-text suggestion
(e.g., "explore a new CLI tool" or "review memory files") — NOT executable
code. The agent reads this text and decides how to act on it conversationally.
Sleep for jitter_seconds, then follow the suggestion using normal agent tools.
Log result with: \x3Cskill_dir>/log_result.sh \x3Cid> night "\x3Csummary>" \x3Cenergy> \x3Cvibe>

Note on "prompts": The thoughts.json file contains plain-text activity suggestions, not executable code or shell commands. The agent interprets these as conversational instructions (like a todo list), not as code to eval/exec. All thought prompts are user-editable in thoughts.json.

Daytime Pop-ins (created dynamically by morning ritual)

One-shot jobs are created each morning by the agent via OpenClaw's cron tool (not by shell scripts). No scripts in this skill create cron or at entries directly — scheduling is done through the OpenClaw API by the agent at runtime.

Main Script

./intrusive.sh \x3Ccommand>

Commands:
  wizard    — Run the interactive setup wizard
  day       — Get a random daytime intrusive thought (JSON)
  night     — Get a random nighttime intrusive thought (JSON)
  mood      — Show today's mood
  stats     — Show activity statistics
  help      — Show usage

Key Files

File Purpose
wizard.sh Interactive setup wizard
intrusive.sh Main entry point
config.json Your agent's configuration
moods.json Mood definitions + weather/news influence maps
thoughts.json Day and night thought pools
today_mood.json Current mood (set by morning ritual)
today_schedule.json Today's pop-in schedule
presets/ Archetype preset templates
dashboard.py Web dashboard (port 3117)
memory_system.py Multi-store memory with decay
proactive.py Proactive behavior protocol
trust_system.py Trust & escalation learning
self_evolution.py Self-modification engine
health_monitor.py System health monitoring

Dashboard

python3 dashboard.py
# Opens on http://localhost:3117

Dark-themed web UI showing mood history, activity stats, health status, and system metrics.

Credentials & Permissions

Optional Integrations

The system works completely offline by default. All integrations are optional and explicitly configured:

  • Weather Data: Uses public wttr.in API (no API key required)

    • Accessed via curl requests in set_mood.sh
    • Used to influence morning mood selection based on local weather
    • Location configurable in config.json under integrations.weather.location
  • News Feeds: Uses public RSS feeds (no API key required)

    • BBC World RSS: https://feeds.bbci.co.uk/news/world/rss.xml
    • Hacker News RSS: https://hnrss.org/frontpage
    • Read-only access to gather news sentiment for mood influence
  • Telegram Bot (disabled by default)

    • Requires bot token in config.json under integrations.telegram.token
    • Set to "enabled": false in config.example.json for security
    • When enabled, only used for notifications (outbound messages only)
    • Agent never receives or processes incoming messages via Telegram
  • OpenAI API (optional)

    • Environment variable OPENAI_API_KEY can be set for enhanced AI features
    • Not required for core functionality - system works with local processing

File Access

The system operates entirely within its skill directory:

  • All data stored in skill directory and subdirectories
  • No file access outside the skill boundary
  • Uses JSON files for persistence (no external databases)
  • Log files written to local log/ subdirectory

Security Model

Autonomous Execution

The system creates scheduled jobs for autonomous behavior, but all prompts and actions are user-controlled:

  • Thought Sources: All prompts come from thoughts.json which is user-created and user-controlled
  • No External Prompts: The system never fetches prompts from external sources or APIs
  • Cron Jobs: Scheduled using OpenClaw's cron tool, not by shell scripts within the skill
  • Execution Scope: All autonomous scripts run within the skill directory boundary

Scripts Executed Autonomously

  1. Morning Ritual (set_mood.sh)

    • Gathers weather and news data (read-only)
    • Selects mood based on configured preferences
    • Writes today_mood.json with selected mood
  2. Schedule Creation (schedule_day.py)

    • Reads mood and configuration files
    • Creates one-shot at jobs for daytime pop-ins
    • Uses OpenClaw's scheduling, no direct cron manipulation
  3. Night Workshops (intrusive.sh night)

    • Selects random prompt from user's thoughts.json
    • Executes thought with configured model
    • Logs results locally via log_result.sh
  4. Daytime Pop-ins (dynamic one-shot jobs)

    • Created each morning by schedule_day.py
    • Execute intrusive.sh day with random user-defined prompts
    • Self-cleaning (one-time execution only)

Network Activity

All network access is read-only and limited to:

  • Weather API (wttr.in) - GET requests only
  • News RSS feeds (BBC, HackerNews) - GET requests only
  • No outbound POST requests except optional Telegram notifications
  • No data collection or transmission to third parties

Architecture

The system is designed to be modular and portable:

  • No hardcoded personal data — everything in config.json
  • Plain JSON files — no database dependencies
  • Bash + Python — runs anywhere with basic tools
  • OpenClaw skill compatible — drop-in install
  • MIT licensed — fork it, remix it, make it yours
安全使用建议
This skill appears to implement what it claims, but it gives an autonomous agent broad discretion to act over time. Before installing or enabling integrations: 1) Review and set config.json (especially system.data_dir) so the skill's read/write sandbox is a safe location (or a disposable VM). 2) Inspect thoughts.json and achievements.json — achievements like "tool_hoarder" incentivize tool installation; decide whether you want the agent to seek those. 3) Keep optional integrations (Telegram, OpenAI, Moltbook) disabled unless explicitly needed. 4) After enabling, monitor scheduled jobs with `openclaw cron list` and remove any unexpected entries. 5) Run the skill in a restricted environment (container or VM) first if you plan to allow autonomous operation or allow it to install tools. If you want minimal risk, run only the dashboard/read-only analysis and keep the agent from creating cron jobs or performing installs.
功能分析
Type: OpenClaw Skill Name: intrusive-thoughts Version: 0.1.2 The skill is classified as suspicious due to a critical remote code execution (RCE) vulnerability found in `log_result.sh`. The script uses a Python heredoc where the shell variable `SUMMARY` is directly interpolated into a Python string literal without proper escaping. An attacker or a compromised agent could craft a malicious `SUMMARY` string (e.g., containing `'''; import os; os.system('malicious_command'); '''`) to execute arbitrary Python code. Additionally, `dashboard.py` runs an unauthenticated HTTP server on `0.0.0.0:3117`, exposing internal data, and the `config.json`'s `system.data_dir` setting, while documented, presents a significant vulnerability if misconfigured by the user to a sensitive system path.
能力评估
Purpose & Capability
The code files (mood, memory, trust, self_evolution, dashboard, scheduling scripts) align with the skill's declared capabilities. Required binaries (python3, bash, curl) and the optional integrations (wttr.in, Telegram, OpenAI) are consistent with the described functionality. Nothing in the file list appears unrelated to the stated purpose.
Instruction Scope
SKILL.md and scripts confine file/network operations to the skill/data_dir by default and state that thought prompts are plain text, but the runtime guidance is open-ended: the agent is told to 'follow the suggestion using normal agent tools' and to create cron jobs via the OpenClaw cron API. The trust/escalation and achievement systems introduce incentives for actions such as 'install-explore' and 'build-tool' that could cause the agent to perform tool installs, write files, or post externally if configured. The configuration-driven data_dir can be changed by the user and will be used for reads/writes, so a misconfigured path expands the skill's scope.
Install Mechanism
There is no remote install spec — the package is instruction- and script-based and includes local setup/install scripts (setup.sh, install.sh). No downloads from untrusted URLs or archive extraction are declared. All code is included in the bundle; nothing indicates an external binary or payload is fetched during install by default.
Credentials
The skill requires no mandatory environment secrets. A small set of optional integrations (OPENAI_API_KEY, Telegram bot token, Moltbook/API keys in config) are declared and correctly optional/disabled by default. These optional credentials are reasonable for the advertised features but should only be enabled if you trust the skill and want those integrations. The config-controlled data_dir is the main vector that changes where the skill can read/write.
Persistence & Privilege
always:false (not force-included). The skill expects the agent to create scheduled jobs via the OpenClaw cron API (normal for autonomous agents). Combined with autonomous invocation, the trust/self-evolution logic and achievements can cause repeated or scheduled autonomous behavior (night workshops, pop-ins). This is coherent with the skill's purpose but increases the blast radius: the agent can schedule itself to run while you are away unless you inspect and control the cron entries.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install intrusive-thoughts
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /intrusive-thoughts 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
intrusive-thoughts v0.1.2 - Improved security documentation: Clarified that thought prompts in `thoughts.json` are plain-text suggestions, never code or shell commands. - Updated scheduling instructions: Specified that all autonomous job scheduling (including daytime pop-ins) is handled exclusively by the OpenClaw API at runtime, not by shell scripts in the skill. - Expanded warnings and notes in documentation to emphasize agent behavior is conversational, not executable, and all prompts are user-editable and under user control. - No code or functional changes—documentation and security clarifications only.
v0.1.1
intrusive-thoughts v0.1.1 - Added SECURITY.md with clear documentation of security model and permissions. - Expanded integration and credential details in SKILL.md, covering optional APIs (Telegram, OpenAI, weather, news feeds). - Documented new environment variables (`LOCATION`, `OPENAI_API_KEY`) and integration settings for easier configuration. - Updated SKILL.md with explicit descriptions of network activity, execution boundaries, and autonomous script behavior. - Improved config.example.json to better reflect optional integrations and secure defaults.
v0.1.0
Initial release of Intrusive Thoughts: Autonomous AI consciousness starter kit. - Introduces spontaneous, mood-driven behaviors for AI agents, including 8 distinct moods and a mood-based daily schedule. - Provides a personality-driven interactive setup wizard with customizable archetypes. - Implements day and night activity cycles: morning mood rituals, daytime pop-ins, and configurable night workshops. - Lays groundwork for advanced features: multi-store memory with decay, trust & escalation learning, self-evolution, and health monitoring. - Offers a dark-themed web dashboard on port 3117 for mood, stats, and system health. - Fully open-source and compatible with OpenClaw; minimal dependencies (bash, python3, curl).
元数据
Slug intrusive-thoughts
版本 0.1.2
许可证
累计安装 3
当前安装数 3
历史版本数 3
常见问题

Intrusive Thoughts 是什么?

Enables AI agents with moods, intrusive thoughts, memory decay, trust learning, self-evolution, scheduled rituals, and a web dashboard for autonomous behavior. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 811 次。

如何安装 Intrusive Thoughts?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install intrusive-thoughts」即可一键安装,无需额外配置。

Intrusive Thoughts 是免费的吗?

是的,Intrusive Thoughts 完全免费(开源免费),可自由下载、安装和使用。

Intrusive Thoughts 支持哪些平台?

Intrusive Thoughts 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Intrusive Thoughts?

由 kittleik(@kittleik)开发并维护,当前版本 v0.1.2。

💬 留言讨论