Self-Improving Agent
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau... Skill: Self-Improving Agent Owner: pskoett Summary: Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau... Tags: latest:3.0.21 Version history: v3.0.21 | 2026-05-01T15:33:35.088Z | user re-upload v3.0.19 | 2026-05-01T06:00:13.738Z | user re-upload no changes v3.0.18 | 2026-04-25T13:59:22.039Z | user no changes ad
Rank
62
Safety
84
Downloads
454k
Updated
Jun 1, 2026
Version
3.0.21
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 453.9K downloads reported by the source. Last updated 6/1/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Adoption signal
- 453.9K downloadsadoption · observed Jun 1, 2026
- Vendor
- Clawhubvendor · observed May 30, 2026
- Protocol compatibility
- OpenClawcompatibility · observed May 30, 2026
- Adoption signal
- 452.3K downloadsadoption · observed May 30, 2026
- Latest release
- 3.0.21release · observed May 1, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s1794qsnpbjfkfnp0k226sefv583hfzt:self-improving-agent- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-pskoett-self-improving-agent/snapshot"
Documentation
CLAWHUB
157,032 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: self-improvement
description: "Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks."
metadata:
---
# Self-Improvement Skill
Log learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.
## First-Use Initialisation
Before logging anything, ensure the `.learnings/` directory and files exist in the project or workspace root. If any are missing, create them:
```bash
mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Learnings\n\nCorrections, insights, and knowledge gaps captured during development.\n\n**Categories**: correction | insight | knowledge_gap | best_practice\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/ERRORS.md ] || printf "# Errors\n\nCommand failures and integration errors.\n\n---\n" > .learnings/ERRORS.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nCapabilities requested by the user.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
```
Never overwrite existing files. This is a no-op if `.learnings/` is already initialised.
Do not log secrets, tokens, private keys, environment variables, or full source/config files unless the user explicitly asks for that level of detail. Prefer short summaries or redacted excerpts over raw command output or full transcripts.
If you want automatic reminders or setup assistance, use the opt-in hook workflow described in [Hook Integration](#hook-integration).
## Quick Reference
| Situation | Action |
|-----------|--------|
| Command/operation fails | Log to `.learnings/ERRORS.md` |
| User corrects you | Log to `.learnings/LEARNINGS.md` with category `correction` |
| User wants missing feature | Log to `.learnings/FEATURE_REQUESTS.md` |
| API/external tool fails | Log to `.learnings/ERRORS.md` with integration details |
| Knowledge was outdated | Log to `.learnings/LEARNINGS.md` with category `knowledge_gap` |
| Found better approach | Log to `.learnings/LEARNINGS.md` with category `best_practice` |
| Simplify/Harden recurring patterns | Log/update `.learnings/LEARNINGS.md` with `Source: simplify-and-harden` and a stable `Pattern-Key` |
| Similar to existing entry | Link with `**See Also**`, consider priority bump |
| Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and/or `.github/copilot-instructions.md` |
| Workflow improvements | Promote to `AGENTS.md` (OpenClaw workspace) |
| Tool gotchas | Promote to `TOOLS.md` (OpenClaw workspace) |
| Behavioral patterns | Promote to `SOUL.md` (OpenClaw workspace) |
## OpenClaw Setup (RecoREADME.md
# self-improvement Self-improvement skill for OpenClaw. It captures learnings, errors, and feature requests to support continuous improvement across sessions. ## Attribution Remade for OpenClaw from the original repo: - https://github.com/pskoett/pskoett-ai-skills - https://github.com/pskoett/pskoett-ai-skills/tree/main/skills/self-improvement ## Main File - `SKILL.md`
_meta.json
{
"ownerId": "kn70cjr952qdec1nx70zs6wefn7ynq2t",
"slug": "self-improving-agent",
"version": "3.0.21",
"publishedAt": 1777649615088
}references/examples.md
# Entry Examples Concrete examples of well-formatted entries with all fields. ## Learning: Correction ```markdown ## [LRN-20250115-001] correction **Logged**: 2025-01-15T10:30:00Z **Priority**: high **Status**: pending **Area**: tests ### Summary Incorrectly assumed pytest fixtures are scoped to function by default ### Details When writing test fixtures, I assumed all fixtures were function-scoped. User corrected that while function scope is the default, the codebase convention uses module-scoped fixtures for database connections to improve test performance. ### Suggested Action When creating fixtures that involve expensive setup (DB, network), check existing fixtures for scope patterns before defaulting to function scope. ### Metadata - Source: user_feedback - Related Files: tests/conftest.py - Tags: pytest, testing, fixtures --- ``` ## Learning: Knowledge Gap (Resolved) ```markdown ## [LRN-20250115-002] knowledge_gap **Logged**: 2025-01-15T14:22:00Z **Priority**: medium **Status**: resolved **Area**: config ### Summary Project uses pnpm not npm for package management ### Details Attempted to run `npm install` but project uses pnpm workspaces. Lock file is `pnpm-lock.yaml`, not `package-lock.json`. ### Suggested Action Check for `pnpm-lock.yaml` or `pnpm-workspace.yaml` before assuming npm. Use `pnpm install` for this project. ### Metadata - Source: error - Related Files: pnpm-lock.yaml, pnpm-workspace.yaml - Tags: package-manager, pnpm, setup ### Resolution - **Resolved**: 2025-01-15T14:30:00Z - **Commit/PR**: N/A - knowledge update - **Notes**: Added to CLAUDE.md for future reference --- ``` ## Learning: Promoted to CLAUDE.md ```markdown ## [LRN-20250115-003] best_practice **Logged**: 2025-01-15T16:00:00Z **Priority**: high **Status**: promoted **Promoted**: CLAUDE.md **Area**: backend ### Summary API responses must include correlation ID from request headers ### Details All API responses should echo back the X-Correlation-ID header from the request. This is required for distributed tracing. Responses without this header break the observability pipeline. ### Suggested Action Always include correlation ID passthrough in API handlers. ### Metadata - Source: user_feedback - Related Files: src/middleware/correlation.ts - Tags: api, observability, tracing --- ``` ## Learning: Promoted to AGENTS.md ```markdown ## [LRN-20250116-001] best_practice **Logged**: 2025-01-16T09:00:00Z **Priority**: high **Status**: promoted **Promoted**: AGENTS.md **Area**: backend ### Summary Must regenerate API client after OpenAPI spec changes ### Details When modifying API endpoints, the TypeScript client must be regenerated. Forgetting this causes type mismatches that only appear at runtime. The generate script also runs validation. ### Suggested Action Add to agent workflow: after any API changes, run `pnpm run generate:api`. ### Metadata - Source: error - Related Files: openapi.yaml, src/client/api.ts - Tags: api, codegen, type
references/hooks-setup.md
# Hook Setup Guide
Configure automatic self-improvement triggers for AI coding agents.
## Overview
Hooks enable proactive learning capture by injecting reminders at key moments:
- **UserPromptSubmit**: Reminder after each prompt to evaluate learnings
- **PostToolUse (Bash)**: Error detection when commands fail
## Claude Code Setup
### Option 1: Project-Level Configuration
Create `.claude/settings.json` in your project root:
```json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "./skills/self-improvement/scripts/activator.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./skills/self-improvement/scripts/error-detector.sh"
}
]
}
]
}
}
```
### Option 2: User-Level Configuration
Add to `~/.claude/settings.json` for global activation:
```json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/skills/self-improvement/scripts/activator.sh"
}
]
}
]
}
}
```
### Minimal Setup (Activator Only)
For lower overhead, use only the UserPromptSubmit hook:
```json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "./skills/self-improvement/scripts/activator.sh"
}
]
}
]
}
}
```
## Codex CLI Setup
Codex uses the same hook system as Claude Code. Create `.codex/settings.json`:
```json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "./skills/self-improvement/scripts/activator.sh"
}
]
}
]
}
}
```
## GitHub Copilot Setup
Copilot doesn't support hooks directly. Instead, add guidance to `.github/copilot-instructions.md`:
```markdown
## Self-Improvement
After completing tasks that involved:
- Debugging non-obvious issues
- Discovering workarounds
- Learning project-specific patterns
- Resolving unexpected errors
Consider logging the learning to `.learnings/` using the format from the self-improvement skill.
For high-value learnings that would benefit other sessions, consider skill extraction.
```
## Verification
### Test Activator Hook
1. Enable the hook configuration
2. Start a new Claude Code session
3. Send any prompt
4. Verify you see `<self-improvement-reminder>` in the context
### Test Error Detector Hook
1. Enable PostToolUse hook for Bash
2. Run a command that fails: `ls /nonexistent/path`
3. Verify you see `<error-detected>` reminder
### Dry Run Extract Script
```bash
./skills/self-improvement/scripts/extract-skill.sh test-skill --dry-run
```
Expected@x1pay/langchain
LangChain/LangGraph tools for AI agent x402 payments on X1
@langchain/langgraph-swarm
An implementation of a multi-agent swarm using LangGraph
@langchain/langgraph-supervisor
LangGraph Multi-Agent Supervisor
oceanbus-langchain
LangChain tools for OceanBus — give your LangChain and CrewAI agents a global identity, encrypted messaging, and Yellow Pages service discovery with a single import.
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "453.9K downloads",
"href": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceUrl": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-06-01T00:29:20.305Z",
"isPublic": true
},
{
"factKey": "vendor",
"label": "Vendor",
"value": "Clawhub",
"category": "vendor",
"href": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceUrl": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-30T06:44:12.876Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "protocols",
"label": "Protocol compatibility",
"value": "OpenClaw",
"category": "compatibility",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-pskoett-self-improving-agent/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-pskoett-self-improving-agent/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-05-30T06:44:12.876Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "traction",
"label": "Adoption signal",
"value": "452.3K downloads",
"category": "adoption",
"href": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceUrl": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-30T06:44:12.876Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "latest_release",
"label": "Latest release",
"value": "3.0.21",
"category": "release",
"href": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceUrl": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-01T15:33:35.088Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "handshake_status",
"label": "Handshake status",
"value": "UNKNOWN",
"category": "security",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-pskoett-self-improving-agent/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-pskoett-self-improving-agent/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true,
"metadata": {}
}
],
"events": [
{
"eventType": "release",
"title": "Release 3.0.21",
"description": "re-upload",
"href": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceUrl": "https://clawhub.ai/pskoett/self-improving-agent",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-01T15:33:35.088Z",
"isPublic": true,
"metadata": {}
}
]
}Record generated Oct 9, 2026.
