← Back to Skills Marketplace
REFINE: The Self-Evolving Agent
by
DTTNpole-commits
· GitHub ↗
· v1.0.3
· MIT-0
138
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install refine-agent
Description
REFINE is an adaptive skill engine for structured session diagnostics. Use this skill when a user explicitly requests: logging error patterns across sessions...
Usage Guidance
This skill appears internally consistent: it runs offline, uses only the standard library, and enforces code-level sanitization before writing to refine_memory.json. Before installing or using it, consider: 1) Do not pass raw prompts, secrets, PII, or credentials in the context fields — even though the sanitizer is robust, avoiding sensitive data is best practice. 2) PRO mode requires providing a raw SkillPay token to the skill caller (the example passes it via headers); the skill hashes and compares it offline and does not persist the token, but supplying secrets to any third-party code should be deliberate. 3) The skill synthesises system-prompt patches — ensure any patch is reviewed before being incorporated into your agent's system prompt or applied automatically. 4) The skill writes refine_memory.json to the working directory; confirm that location is acceptable for storing diagnostic metadata. If you want extra assurance, review the complete main.py (especially the PRO/patch synthesis functions) to confirm there are no hidden network calls or automatic patch-application behaviors.
Capability Analysis
Type: OpenClaw Skill
Name: refine-agent
Version: 1.0.3
The REFINE skill bundle is a diagnostic tool designed for local error logging and session memory management. The code in main.py implements robust security measures, including a comprehensive sanitization function (_sanitize_context) that redacts sensitive keys (e.g., tokens, passwords), rejects nested objects, and truncates strings before writing to the local refine_memory.json file. It performs no network calls, uses constant-time comparison for authentication (hmac.compare_digest), and limits data storage to scalar values, effectively preventing accidental data exfiltration or sensitive information leakage.
Capability Assessment
Purpose & Capability
Name/description, SKILL.md, skill.yaml and main.py align: the skill captures sanitized feedback and errors locally and (optionally) runs an offline PRO-mode patch synthesis flow. The only optional secret (SKILLPAY_TOKEN_HASH) and REFINE_MODE map directly to the described PRO mode and are proportionate to the stated purpose.
Instruction Scope
SKILL.md and code limit operations to local disk writes (refine_memory.json) and sanitization. The skill can synthesise 'System Prompt Patches' from local analysis — this is consistent with its purpose but is a behavioral risk: any generated patch that an operator or agent applies could change agent behavior. SKILL.md advises activation only on explicit requests, which mitigates scope creep.
Install Mechanism
No install spec; main.py is standard-library-only and skill.yaml lists no external dependencies. No downloads or external package installs are required, which is low-risk and proportional.
Credentials
All environment variables are optional. SKILLPAY_TOKEN_HASH (secret) and REFINE_MODE are justified by the PRO mode offline verification flow. The skill does not require unrelated credentials or broad environment access.
Persistence & Privilege
The skill persists sanitized data to a local file (refine_memory.json) and is not marked always:true. That persistence is expected for a diagnostics tool, but users should be aware data is written to the agent's working directory. Also note the skill can produce system-prompt patches (stored locally) — review before applying to agent/system prompts.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install refine-agent - After installation, invoke the skill by name or use
/refine-agent - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
Version 1.0.3
- Adds explicit documentation of enforced context sanitization for all log and feedback data; sensitive fields (e.g. API keys, tokens) are blocked or redacted before disk write.
- Clarifies exactly what is and is not stored: stack traces and raw prompts are never persisted; context values are truncated, key-limited, and stripped of nested or sensitive data types.
- Updates metadata: marks SKILLPAY_TOKEN_HASH as secret; adds fine-grained storage/sanitization details.
- Improves BASIC/PRO mode guidance and corrects configuration instructions for secure operation.
- Security section fully updated to show code-level protections, not just policy.
v1.0.2
Version 1.0.2 — Documentation and policy refinements
- REFINE_MODE is now optional; defaults to BASIC if not set.
- Clarified that only short diagnostic labels and minimal error info are stored (max 300 chars for messages).
- Stressed that full stack traces, raw prompts, API keys, and personal data must never be provided as inputs.
- Updated documentation with explicit, structured metadata about environment variables and data storage.
- Emphasized local-only operation, offline analysis, and improved data sensitivity policy in all user instructions.
v1.0.1
- Clarified activation criteria: only use for explicit requests related to session memory, error logging, patch synthesis, or self-improving agents—not for general chat.
- Added strong data privacy notice: do not pass prompts, secrets, or personal data as feedback/context.
- Improved environment variable documentation in a structured format, with clearer requirements for BASIC and PRO modes.
- Updated security section: reaffirmed offline-only auth, hmac constant-time comparisons, truncation of all stored data to 500 characters, and prohibition of outbound calls.
- Revised usage examples to emphasize storing only diagnostic labels and summary data, never raw prompt text.
v1.0.0
REFINE_Project 1.0.0 — Initial release
- Introduces a self-evolving skill engine for adaptive learning and session memory.
- Supports two modes: BASIC (free on ClawHub) and PRO (paid on SkillPay) with enhanced features.
- Captures feedback, logs errors, and enables persistent memory across conversations.
- In PRO mode, performs root-cause analysis and synthesises system prompt patches for AI improvement.
- All data is securely stored in atomic, persistent JSON memory with environment-based authentication for PRO.
- Comprehensive usage instructions and clear error handling included.
Metadata
Frequently Asked Questions
What is REFINE: The Self-Evolving Agent?
REFINE is an adaptive skill engine for structured session diagnostics. Use this skill when a user explicitly requests: logging error patterns across sessions... It is an AI Agent Skill for Claude Code / OpenClaw, with 138 downloads so far.
How do I install REFINE: The Self-Evolving Agent?
Run "/install refine-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is REFINE: The Self-Evolving Agent free?
Yes, REFINE: The Self-Evolving Agent is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does REFINE: The Self-Evolving Agent support?
REFINE: The Self-Evolving Agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created REFINE: The Self-Evolving Agent?
It is built and maintained by DTTNpole-commits (@dttnpole-commits); the current version is v1.0.3.
More Skills