metacognitive-self-mod
Analyze and improve the improvement process. Use for detecting quality regressions and refining meta-optimization
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/athola/nm-abstract-metacognitive-self-modNight Market Skill — ported from claude-night-market/abstract. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Metacognitive Self-Modification
Analyze the effectiveness of past skill improvements and refine the improvement process itself. This is the core innovation from the Hyperagents paper: not just improving skills, but improving HOW skills are improved.
Context Triggers (auto-invocation)
This skill should be invoked automatically when:
-
Regression detected: The homeostatic monitor finds a skill's evaluation window ended in
pending_rollback_reviewstatus. The improvement made things worse -- we need to understand why. -
Low effectiveness rate: When
ImprovementMemory.get_effective_strategies()vsget_failed_strategies()shows effectiveness below 50%, the improvement process itself needs refinement. -
Degradation despite improvements: When
PerformanceTracker.get_improvement_trend()returns negative for a skill that was recently improved. -
Periodic check: After every 10 improvement cycles (tracked via outcome count in ImprovementMemory).
Hook integration
The homeostatic monitor emits
"improvement_triggered": true when a skill crosses the
flag threshold. At that point, before dispatching the
skill-improver, check if metacognitive analysis is
warranted:
from abstract.improvement_memory import ImprovementMemory
from pathlib import Path
memory = ImprovementMemory(
Path.home() / ".claude/skills/improvement_memory.json"
)
# Check if metacognitive analysis is warranted
effective = memory.get_effective_strategies()
failed = memory.get_failed_strategies()
total = len(effective) + len(failed)
needs_metacognition = False
# Trigger 1: Low effectiveness rate
if total >= 5 and len(effective) / total < 0.5:
needs_metacognition = True
# Trigger 2: Periodic check (every 10 outcomes)
if total > 0 and total % 10 == 0:
needs_metacognition = True
# Trigger 3: Recent regression
if failed and failed[-1].get("outcome_type") == "failure":
needs_metacognition = True
if needs_metacognition:
# Run metacognitive analysis before next improvement
pass # Skill(abstract:metacognitive-self-mod)
When To Use (Manual)
- After a batch of skill improvements to assess what worked
- When improvement outcomes show regressions
- Periodically (monthly) to refine improvement strategy
- When the skill-improver agent seems ineffective
When NOT To Use
- Routine skill improvements (use skill-improver directly)
- First-time skill creation (use skill-authoring)
Workflow
Step 1: Load improvement data
Read improvement memory and performance tracker data:
# Check for improvement memory
MEMORY_FILE=~/.claude/skills/improvement_memory.json
TRACKER_FILE=~/.claude/skills/performance_history.json
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-athola-nm-abstract-metacognitive-self-mod": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
extract
Analyze a codebase and build a knowledge base of business logic, architecture, data flow, and engineering patterns. The foundation for gauntlet challenges and agent integration
discourse
>- Scan community discussion channels (HN, Lobsters, Reddit, tech blogs) for experience reports and opinions on a topic
synthesize
>- Merge, deduplicate, rank, and format research findings from multiple channels into a coherent report. Use after research agents return their results
workflow-monitor
Detect workflow failures and inefficient patterns, then create GitHub issues for improvement via /fix-workflow
architecture-paradigm-hexagonal
Hexagonal (Ports and Adapters) architecture isolating domain logic from infrastructure