Skip to content

Commit b5d030d

Browse files
ArchieIndianclaude
andauthored
Add 5 lossless-claw-inspired skills (49 total) (#40)
* Add skill-doctor: diagnose silent skill discovery failures Runs 6 diagnostic checks per skill (YAML parse, required fields, path conventions, cron format, stateful coherence, schema validity). Exits 1 when FAILs are present — suitable as a post-install gate in install.sh. * Add installed-skill-auditor: weekly post-install security audit Detects INJECTION, CREDENTIAL, EXFILTRATION, DRIFT, and ORPHAN issues in all installed skills. Maintains content baselines for drift detection. Cron: Mondays 9am. Exits 1 on CRITICAL findings. * Add skill-trigger-tester: validate description trigger quality before publish Scores a skill's description against should-fire/should-not-fire prompt sets. Computes precision, recall, F1, and assigns a grade A–F. Exits 1 on grade C or lower, suitable as a pre-publish gate. * Add skill-loadout-manager: named skill profiles to manage context bloat Defines and switches between curated skill subsets (loadouts). Ships 4 presets (minimal, coding, research, ops) and estimates token savings per loadout vs. all-skills-active mode. * Add skill-compatibility-checker: detect version/feature incompatibilities Reads requires_openclaw + requires_features frontmatter fields and compares against detected (or overridden) OpenClaw version. Ships feature registry with 5 runtime capabilities and their introduction versions. * Add skill-conflict-detector: detect name shadowing and description overlap (#21) Detects NAME_SHADOW (CRITICAL), EXACT_DUPLICATE (CRITICAL), HIGH_OVERLAP (HIGH), and MEDIUM_OVERLAP (MEDIUM) conflicts between installed skills using Jaccard similarity on description tokens. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * Add heartbeat-governor: per-skill execution budgets for cron skills (#22) Tracks 30-day rolling spend and wall-clock time per scheduled skill. Auto-pauses skills that exceed monthly/per-run budgets. Cron: every hour. Supports manual pause/resume and per-skill budget overrides. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * Add skill-portability-checker: validate OS/binary dependencies in scripts (#23) Detects OS_SPECIFIC_CALL, MISSING_BINARY, BREW_ONLY, PYTHON_IMPORT, and HARDCODED_PATH issues in companion scripts. Cross-checks against os_filter: frontmatter field. No external dependencies. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * Update README: document all 39 skills across 3 categories Adds 8 new integration-focused skills to the tables: - Core: skill-trigger-tester, skill-conflict-detector, skill-portability-checker - OpenClaw-native: skill-doctor, installed-skill-auditor, skill-loadout-manager, skill-compatibility-checker, heartbeat-governor Expands security section from 3 to 5 skills (adds installed-skill-auditor, skill-doctor). Updates companion script list and total skill counts. * Add community-skill-radar: scan Reddit for skill ideas every 3 days (#26) Searches 5 subreddits (openclaw, LocalLLaMA, ClaudeAI, MachineLearning, AIAgents) via Reddit's public JSON API. Scores candidates by upvotes, comments, recurrence, and keyword density. Writes prioritized PROPOSALS.md for review. Cron: every 3 days at 9am. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * Update README: add community-skill-radar (40 skills total) Adds community-skill-radar to the OpenClaw-Native table (24 skills), updates companion script list with radar.py, bumps total to 40 skills. * Add config-encryption-auditor skill (#29) Scans ~/.openclaw/ config files for plaintext API keys, tokens, and world-readable permissions. Suggests environment variable migration. Cron runs Sundays 9am. Companion script: audit.py with --scan, --fix-permissions, --suggest-env, --status commands. Inspired by OpenLobster's AES-GCM config encryption layer. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add tool-description-optimizer skill (#30) Scores skill descriptions for trigger quality across 5 dimensions: clarity, specificity, keyword density, uniqueness, and length. Grades A-F with concrete rewrite suggestions. Companion script: optimize.py with --scan, --skill, --suggest, --compare, --status. Inspired by OpenLobster's tool-description scoring layer. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add mcp-health-checker skill (#31) Monitors MCP server connections for health, latency, and availability. Probes stdio servers via JSON-RPC initialize and HTTP servers via GET. Detects stale connections, timeouts, unreachable servers. Cron runs every 6 hours. Companion script: check.py with --ping, --config, --status, --history commands. Inspired by OpenLobster's MCP connection health monitoring. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Update README: 40 → 44 skills (4 OpenLobster-inspired additions) Add memory-graph-builder, config-encryption-auditor, tool-description-optimizer, and mcp-health-checker to the OpenClaw-Native table. Update security section to 6 skills. Update companion scripts list. * Add memory-graph-builder: structured knowledge graph from MEMORY.md (#28) Parses flat MEMORY.md into nodes with categories, entities, and typed relationships. Detects duplicates (Jaccard >0.7), contradictions, and stale entries. Generates compressed memory digest saving 30-60% tokens. Inspired by OpenLobster's Neo4j graph memory. Cron: nightly 10pm. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * Rewrite README for maximum discoverability Restructured with SEO-rich opening, badges, comparison table, architecture diagram, use cases section, and defense-in-depth security overview. Leads with value proposition instead of implementation details. * Add memory-dag-compactor skill (#35) Builds hierarchical summary DAGs from MEMORY.md with depth-aware prompts (d0 leaf → d3+ durable). Supports search, tree visualization, inspect, and dissolve. Cron nightly 11pm. Companion script: compact.py. Inspired by lossless-claw's DAG-based summarization hierarchy. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add large-file-interceptor skill (#36) Detects oversized files that would blow the context window, generates structural exploration summaries (JSON schema, CSV columns, Python imports, log patterns), and stores compact reference cards. Supports scan, summarize, restore, and audit. No cron — invoked on demand. Inspired by lossless-claw's large file interception layer. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add context-assembly-scorer skill (#37) Scores how well current context represents full conversation history. 5 dimensions: topic coverage, recency bias, entity continuity, decision retention, task continuity. Detects blind spots — topics the agent has effectively forgotten. Cron every 4h. Inspired by lossless-claw's context assembly system. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add compaction-resilience-guard skill (#38) Monitors compaction for failures (empty, inflation, garbled, repetition) and enforces a 3-level fallback chain: normal → aggressive → deterministic truncation. Ensures compaction always makes forward progress. Inspired by lossless-claw's three-level escalation system. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Add memory-integrity-checker skill (#39) Validates memory summary DAGs with 8 structural checks: orphan nodes, circular references, token inflation, broken lineage, stale active, empty nodes, duplicate edges, depth mismatch. Auto-fixes safe issues. Cron Sundays 3am. Inspired by lossless-claw's DAG integrity checking system. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * Update README: 44 → 49 skills (5 lossless-claw-inspired additions) Add memory-dag-compactor, large-file-interceptor, context-assembly-scorer, compaction-resilience-guard, and memory-integrity-checker. Update badges, comparison table, architecture diagram, companion scripts list. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cfdf49b commit b5d030d

21 files changed

Lines changed: 3477 additions & 12 deletions

File tree

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# openclaw-superpowers
22

3-
**44 ready-to-use skills that make your AI agent autonomous, self-healing, and self-improving.**
3+
**49 ready-to-use skills that make your AI agent autonomous, self-healing, and self-improving.**
44

5-
[![Skills](https://img.shields.io/badge/skills-44-blue)](#skills-included)
5+
[![Skills](https://img.shields.io/badge/skills-49-blue)](#skills-included)
66
[![Security](https://img.shields.io/badge/security_skills-6-green)](#security--guardrails)
7-
[![Cron](https://img.shields.io/badge/cron_scheduled-12-orange)](#openclaw-native-28-skills)
8-
[![Scripts](https://img.shields.io/badge/companion_scripts-15-purple)](#companion-scripts)
7+
[![Cron](https://img.shields.io/badge/cron_scheduled-15-orange)](#openclaw-native-33-skills)
8+
[![Scripts](https://img.shields.io/badge/companion_scripts-20-purple)](#companion-scripts)
99
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
1010

1111
A plug-and-play skill library for [OpenClaw](https://github.com/openclaw/openclaw) — the open-source AI agent runtime. Gives your agent structured thinking, security guardrails, persistent memory, cron scheduling, self-recovery, and the ability to write its own new skills during conversation.
@@ -20,12 +20,13 @@ Built for developers who want their AI agent to run autonomously 24/7, not just
2020

2121
Most AI agent frameworks give you a chatbot that forgets everything between sessions. OpenClaw is different — it runs persistently, handles multi-hour tasks, and has native cron scheduling. But out of the box, it doesn't know *how* to use those capabilities well.
2222

23-
**openclaw-superpowers bridges that gap.** Install once, and your agent immediately knows how to:
23+
**openclaw-superpowers bridges that gap.** Install 49 skills in one command, and your agent immediately knows how to:
2424

2525
- **Think before it acts** — brainstorming, planning, and systematic debugging skills prevent the "dive in and break things" failure mode
2626
- **Protect itself** — 6 security skills detect prompt injection, block dangerous actions, audit installed code, and scan for leaked credentials
2727
- **Run unattended** — 12 cron-scheduled skills handle memory cleanup, health checks, budget tracking, and community monitoring while you sleep
2828
- **Recover from failures** — self-recovery, loop-breaking, and task handoff skills keep long-running work alive across crashes and restarts
29+
- **Never forget** — DAG-based memory compaction, integrity checking, and context scoring ensure the agent preserves critical information even in month-long conversations
2930
- **Improve itself** — the agent can write new skills during normal conversation using `create-skill`, encoding your preferences as permanent behaviors
3031

3132
---
@@ -50,7 +51,7 @@ cd ~/.openclaw/extensions/superpowers && ./install.sh
5051
openclaw gateway restart
5152
```
5253

53-
`install.sh` symlinks all 44 skills, creates state directories for stateful skills, and registers cron jobs — everything in one step. That's it. Your agent now has superpowers.
54+
`install.sh` symlinks all 49 skills, creates state directories for stateful skills, and registers cron jobs — everything in one step. That's it. Your agent now has superpowers.
5455

5556
---
5657

@@ -78,7 +79,7 @@ Methodology skills that work in any AI agent runtime. Adapted from [obra/superpo
7879
| `skill-conflict-detector` | Detects name shadowing and description-overlap conflicts between installed skills | `detect.py` |
7980
| `skill-portability-checker` | Validates OS/binary dependencies in companion scripts; catches non-portable calls | `check.py` |
8081

81-
### OpenClaw-Native (28 skills)
82+
### OpenClaw-Native (33 skills)
8283

8384
Skills that require OpenClaw's persistent runtime — cron scheduling, session state, or long-running execution. These are the skills that make a 24/7 autonomous agent actually work reliably.
8485

@@ -112,6 +113,11 @@ Skills that require OpenClaw's persistent runtime — cron scheduling, session s
112113
| `config-encryption-auditor` | Scans config directories for plaintext API keys, tokens, and world-readable permissions | Sundays 9am | `audit.py` |
113114
| `tool-description-optimizer` | Scores skill descriptions for trigger quality — clarity, specificity, keyword density — and suggests rewrites || `optimize.py` |
114115
| `mcp-health-checker` | Monitors MCP server connections for health, latency, and availability; detects stale connections | every 6h | `check.py` |
116+
| `memory-dag-compactor` | Builds hierarchical summary DAGs from MEMORY.md with depth-aware prompts (d0 leaf → d3+ durable) | daily 11pm | `compact.py` |
117+
| `large-file-interceptor` | Detects oversized files, generates structural exploration summaries, stores compact references || `intercept.py` |
118+
| `context-assembly-scorer` | Scores how well current context represents full conversation; detects blind spots | every 4h | `score.py` |
119+
| `compaction-resilience-guard` | Monitors compaction for failures; enforces normal → aggressive → deterministic fallback chain || `guard.py` |
120+
| `memory-integrity-checker` | Validates summary DAGs for orphans, circular refs, token inflation, broken lineage | Sundays 3am | `integrity.py` |
115121

116122
### Community (1 skill)
117123

@@ -142,12 +148,12 @@ Six skills form a defense-in-depth security layer for autonomous agents:
142148

143149
| Feature | openclaw-superpowers | obra/superpowers | Custom prompts |
144150
|---|---|---|---|
145-
| Skills included | **44** | 8 | 0 |
151+
| Skills included | **49** | 8 | 0 |
146152
| Self-modifying (agent writes new skills) | Yes | No | No |
147-
| Cron scheduling | **12 scheduled skills** | No | No |
153+
| Cron scheduling | **15 scheduled skills** | No | No |
148154
| Persistent state across sessions | **YAML state schemas** | No | No |
149155
| Security guardrails | **6 defense-in-depth skills** | No | No |
150-
| Companion scripts with CLI | **15 scripts** | No | No |
156+
| Companion scripts with CLI | **20 scripts** | No | No |
151157
| Memory graph / knowledge graph | Yes | No | No |
152158
| MCP server health monitoring | Yes | No | No |
153159
| API spend tracking & budget enforcement | Yes | No | No |
@@ -169,7 +175,7 @@ Six skills form a defense-in-depth security layer for autonomous agents:
169175
│ │ │ ├── SKILL.md
170176
│ │ │ └── TEMPLATE.md
171177
│ │ └── ...
172-
│ ├── openclaw-native/ # 28 persistent-runtime skills
178+
│ ├── openclaw-native/ # 33 persistent-runtime skills
173179
│ │ ├── memory-graph-builder/
174180
│ │ │ ├── SKILL.md # Skill definition + YAML frontmatter
175181
│ │ │ ├── STATE_SCHEMA.yaml # State shape (committed, versioned)
@@ -192,7 +198,7 @@ Six skills form a defense-in-depth security layer for autonomous agents:
192198

193199
Skills marked with a script ship a small executable alongside their `SKILL.md`:
194200

195-
- **15 Python scripts** (`run.py`, `audit.py`, `check.py`, `guard.py`, `bridge.py`, `onboard.py`, `sync.py`, `doctor.py`, `loadout.py`, `governor.py`, `detect.py`, `test.py`, `radar.py`, `graph.py`, `optimize.py`) — run directly to manipulate state, generate reports, or trigger actions. No extra dependencies; `pyyaml` is optional but recommended.
201+
- **20 Python scripts** (`run.py`, `audit.py`, `check.py`, `guard.py`, `bridge.py`, `onboard.py`, `sync.py`, `doctor.py`, `loadout.py`, `governor.py`, `detect.py`, `test.py`, `radar.py`, `graph.py`, `optimize.py`, `compact.py`, `intercept.py`, `score.py`, `integrity.py`) — run directly to manipulate state, generate reports, or trigger actions. No extra dependencies; `pyyaml` is optional but recommended.
196202
- **`vet.sh`** — Pure bash scanner; runs on any system with grep.
197203
- Every script supports `--help` and `--format json`. Dry-run mode available on scripts that make changes.
198204
- See the `example-state.yaml` in each skill directory for sample state and a commented walkthrough of cron behaviour.
@@ -228,3 +234,4 @@ Skills marked with a script ship a small executable alongside their `SKILL.md`:
228234

229235
- **[openclaw/openclaw](https://github.com/openclaw/openclaw)** — the open-source AI agent runtime
230236
- **[obra/superpowers](https://github.com/obra/superpowers)** — Jesse Vincent's skills framework; core skills adapted under MIT license
237+
- **[OpenLobster](https://github.com/Neirth/OpenLobster)** — inspiration for memory graph, config encryption auditing, tool-description scoring, and MCP health monitoring
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: compaction-resilience-guard
3+
version: "1.0"
4+
category: openclaw-native
5+
description: Monitors memory compaction for failures and enforces a three-level fallback chain — normal, aggressive, deterministic truncation — ensuring compaction always makes forward progress.
6+
stateful: true
7+
---
8+
9+
# Compaction Resilience Guard
10+
11+
## What it does
12+
13+
Memory compaction can fail silently: the LLM produces empty output, summaries that are *larger* than their input, or garbled text. When this happens, compaction stalls and context overflows.
14+
15+
Compaction Resilience Guard enforces a three-level escalation chain inspired by [lossless-claw](https://github.com/Martian-Engineering/lossless-claw):
16+
17+
| Level | Strategy | When used |
18+
|---|---|---|
19+
| L1 — Normal | Standard summarization prompt | First attempt |
20+
| L2 — Aggressive | Low temperature, reduced reasoning, shorter output target | After L1 failure |
21+
| L3 — Deterministic | Pure truncation: keep first N + last N lines, drop middle | After L2 failure |
22+
23+
This ensures compaction **always makes progress** — even if the LLM is broken.
24+
25+
## When to invoke
26+
27+
- After any compaction event — validate the output
28+
- When context usage approaches 90% — compaction may be failing
29+
- When summaries seem unusually long or empty — detect inflation
30+
- As a pre-check before memory-dag-compactor runs
31+
32+
## How to use
33+
34+
```bash
35+
python3 guard.py --check # Validate recent compaction outputs
36+
python3 guard.py --check --file <summary.yaml> # Check a specific summary file
37+
python3 guard.py --simulate <text> # Run the 3-level chain on sample text
38+
python3 guard.py --report # Show failure/escalation history
39+
python3 guard.py --status # Last check summary
40+
python3 guard.py --format json # Machine-readable output
41+
```
42+
43+
## Failure detection
44+
45+
The guard detects these compaction failures:
46+
47+
| Failure | How detected | Action |
48+
|---|---|---|
49+
| Empty output | Summary length < 10 chars | Escalate to next level |
50+
| Inflation | Summary tokens > input tokens | Escalate to next level |
51+
| Garbled text | Entropy score > 5.0 (random chars) | Escalate to next level |
52+
| Repetition | Same 20+ char phrase repeated 3+ times | Escalate to next level |
53+
| Truncation marker | Contains `[FALLBACK]` or `[TRUNCATED]` | Record as L3 usage |
54+
| Stale | Summary unchanged from previous run | Flag for review |
55+
56+
## Procedure
57+
58+
**Step 1 — Check recent compaction outputs**
59+
60+
```bash
61+
python3 guard.py --check
62+
```
63+
64+
Validates all summary nodes in memory-dag-compactor state. Reports failures by level and whether escalation was needed.
65+
66+
**Step 2 — Simulate the fallback chain**
67+
68+
```bash
69+
python3 guard.py --simulate "$(cat long-text.txt)"
70+
```
71+
72+
Runs the 3-level chain on sample text to test that each level produces valid output.
73+
74+
**Step 3 — Review escalation history**
75+
76+
```bash
77+
python3 guard.py --report
78+
```
79+
80+
Shows how often each level was used. High L2/L3 usage indicates the primary summarization prompt needs improvement.
81+
82+
## State
83+
84+
Failure counts, escalation history, and per-summary validation results stored in `~/.openclaw/skill-state/compaction-resilience-guard/state.yaml`.
85+
86+
Fields: `last_check_at`, `level_usage`, `failures`, `check_history`.
87+
88+
## Notes
89+
90+
- Read-only monitoring — does not perform compaction itself
91+
- Works alongside memory-dag-compactor as a quality gate
92+
- Deterministic truncation (L3) preserves first 30% and last 20% of input, drops middle
93+
- Entropy is measured using Shannon entropy on character distribution
94+
- High L3 usage (>10% of compactions) suggests a systemic LLM issue
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "1.0"
2+
description: Compaction failure tracking, escalation history, and level usage stats.
3+
fields:
4+
last_check_at:
5+
type: datetime
6+
level_usage:
7+
type: object
8+
description: How often each fallback level was used
9+
fields:
10+
l1_normal: { type: integer, default: 0 }
11+
l2_aggressive: { type: integer, default: 0 }
12+
l3_deterministic: { type: integer, default: 0 }
13+
failures:
14+
type: list
15+
description: Recent compaction failures detected
16+
items:
17+
summary_id: { type: string }
18+
failure_type: { type: enum, values: [empty, inflation, garbled, repetition, stale] }
19+
level_used: { type: integer, description: "1, 2, or 3" }
20+
input_tokens: { type: integer }
21+
output_tokens: { type: integer }
22+
detected_at: { type: datetime }
23+
check_history:
24+
type: list
25+
description: Rolling log of past checks (last 20)
26+
items:
27+
checked_at: { type: datetime }
28+
summaries_checked: { type: integer }
29+
failures_found: { type: integer }
30+
escalations: { type: integer }
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Example runtime state for compaction-resilience-guard
2+
last_check_at: "2026-03-16T23:05:00.000000"
3+
level_usage:
4+
l1_normal: 42
5+
l2_aggressive: 3
6+
l3_deterministic: 1
7+
failures:
8+
- summary_id: s-d0-012
9+
failure_type: inflation
10+
level_used: 2
11+
input_tokens: 500
12+
output_tokens: 620
13+
detected_at: "2026-03-16T23:04:58.000000"
14+
- summary_id: s-d1-005
15+
failure_type: repetition
16+
level_used: 3
17+
input_tokens: 800
18+
output_tokens: 200
19+
detected_at: "2026-03-15T23:05:00.000000"
20+
check_history:
21+
- checked_at: "2026-03-16T23:05:00.000000"
22+
summaries_checked: 18
23+
failures_found: 1
24+
escalations: 1
25+
- checked_at: "2026-03-15T23:05:00.000000"
26+
summaries_checked: 15
27+
failures_found: 1
28+
escalations: 1
29+
- checked_at: "2026-03-14T23:05:00.000000"
30+
summaries_checked: 12
31+
failures_found: 0
32+
escalations: 0
33+
# ── Walkthrough ──────────────────────────────────────────────────────────────
34+
# python3 guard.py --check
35+
#
36+
# Compaction Resilience Check — 2026-03-16 23:05
37+
# ──────────────────────────────────────────────────
38+
# Summaries checked: 18
39+
# Failures found: 1
40+
# Escalations needed: 1
41+
# Status: DEGRADED
42+
#
43+
# ! s-d0-012: inflation (entropy=3.2, 620 tok)
44+
#
45+
# python3 guard.py --report
46+
#
47+
# Compaction Resilience Report
48+
# ──────────────────────────────────────────────────
49+
# Total compactions tracked: 46
50+
# L1 Normal: 42 (91%)
51+
# L2 Aggressive: 3 (7%)
52+
# L3 Deterministic: 1 (2%)
53+
#
54+
# Recent failures: 2
55+
# s-d0-012: inflation (L2)
56+
# s-d1-005: repetition (L3)
57+
#
58+
# python3 guard.py --simulate "$(cat long-text.txt)"
59+
#
60+
# Fallback Chain Simulation
61+
# ──────────────────────────────────────────────────
62+
# Input: 2500 tokens (10000 chars)
63+
# Level used: L1 (l1_normal)
64+
# Output: 1000 tokens
65+
# Compression: 40%

0 commit comments

Comments
 (0)