Back to skill

Security audit

Skill Self Improving Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is a self-improvement logger, but it can persist conversation-derived content into future agent instructions and supports broad cross-session learning flows without strong review or redaction controls.

Install only if you want durable self-improvement memory. Before enabling hooks or promoting entries, review diffs manually, avoid logging secrets or raw error output, keep .learnings project-local or ignored when sensitive, and treat AGENTS.md, SOUL.md, TOOLS.md, CLAUDE.md, and Copilot instruction changes as security-sensitive.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:262
Finding

Untrusted Learnings Can Be Promoted into Persistent Agent Instructions

Content
View full analysis
= 3` - Seen across at least 2 distinct tasks - Occurred within a 30-day window Promotion targets: - `CLAUDE.md` - `AGENTS.md` - `.github/copilot-instructions.md` - `SOUL.md` / `TOOLS.md` for OpenClaw workspace-level guidance when applicable ``` ### Technical Analysis The skill captures information originating from conversations, user correcti ...[truncated 2506 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:33
Finding

Installation Instructions Retrieve Unpinned Executable Skill Content

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill’s stated purpose is logging learnings, but the content also expands into hook installation, workspace mutation, cross-session sharing, and skill extraction. This mismatch is dangerous because users may authorize a seemingly low-risk note-taking skill while it performs broader persistent changes and enables additional automation beyond the declared scope.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cross-session features encourage reading transcripts from other sessions and sending learnings between them. This is dangerous because it enables propagation of sensitive conversation data across boundaries that may have different users, tasks, trust levels, or least-privilege assumptions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error template explicitly asks for full context, parameters, inputs, and actual error output in persistent logs. Error output and command context frequently contain credentials, tokens, file paths, URLs, stack traces, customer data, or internal system details, making this a direct sensitive-data exposure vector.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/hooks-setup.md (reported line 48)May include surrounding context.

Option 2: User-Level Configuration

Add to ~/.claude/settings.json for global activation:

json
{

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 177)May include surrounding context.

sessions_send

Send message to another session:

text
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation guidance is very broad and covers many normal interactions such as errors, corrections, outdated knowledge, and better approaches. Overbroad triggering is risky because it can cause the skill to run frequently, leading to unnecessary persistence of user data and unplanned workspace modifications.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to persist user corrections, requests, and related inputs into local markdown logs. Even if intended for productivity, this creates a data retention risk because natural-language interactions may contain secrets, personal data, proprietary context, or security-sensitive details that are stored beyond the original session.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
76% confidence
Finding

The skill establishes persistent storage under the user workspace for future sessions. Persistence itself is not always unsafe, but in this context it increases risk because the stored content is explicitly meant to accumulate user interactions, errors, and cross-session learnings over time.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

└── FEATURE_REQUESTS.md

text

### Create Learning Files

```bash
mkdir -p ~/.openclaw/workspace/.learnings

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The automatic logging triggers rely on common conversational phrases like corrections or feature wishes, without requiring context validation or consent. This can cause accidental retention of sensitive user input or overcollection from ordinary dialogue that was never intended to become durable memory.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes logic and workflows for generating entirely new skills, which materially extends its capabilities beyond self-improvement logging. This increases the attack surface because logged content or inferred patterns could be transformed into reusable instructions/prompts that persist and influence future agent behavior.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/examples.md (reported line 301)May include surrounding context.

When the above learning is extracted as a skill, it becomes:

File: skills/docker-m1-fixes/SKILL.md

markdown
---

Session Persistence

Medium
Category
Rogue Agent
Confidence
72% confidence
Finding

The guide instructs users to install persistent automatic hooks in project or user settings, causing scripts to run on every prompt or tool event across future sessions. Even though the documented scripts are described as lightweight, this creates durable execution and context-injection behavior that can be abused if the scripts or skill directory are later modified, especially in a self-improvement skill that is designed to influence future agent behavior.

Content

Scanner excerpt · references/hooks-setup.md (reported line 15)May include surrounding context.

Option 1: Project-Level Configuration

Create .claude/settings.json in your project root:

json
{

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The guidance establishes session-persistent learning storage in locations tied to the workspace or installed skill, which increases the chance that data and behavior modifications survive resets and influence later runs. In the OpenClaw context, persistence is especially sensitive because workspace files are part of the prompt-injection model and may be reloaded automatically.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 57)May include surrounding context.

openclaw hooks enable self-improvement

text

### 3. Create Learning Files

Create the `.learnings/` directory in your workspace:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The promotion workflow advises moving learnings into SOUL.md, TOOLS.md, and AGENTS.md, which are explicitly injected into future sessions as prompt context. That creates a durable integrity risk: erroneous, sensitive, or adversarially influenced content can become trusted behavioral instructions and persistently steer future agent actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill focused on recording learnings, corrections, failures, and reviewing them before tasks. This script instead creates new skill directories and writes a reusable SKILL.md scaffold, which is a skill-generation capability rather than merely capturing or reviewing learnings.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Creating directories and authoring a new SKILL.md template gives the skill the ability to generate additional skills on disk. That goes beyond the manifest's stated remit of capturing learnings, errors, and corrections unless the manifest explicitly says it can convert learnings into new skills.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation instructs users to create persistent .learnings/ storage in the workspace or skill directory without clearly warning that future agent behavior may be influenced by those retained files. In a prompt-injected workspace system, persistent memory files can silently accumulate sensitive data or become a durable prompt-injection surface across sessions.

Content

No source excerpt is available for this finding.