{"skill":{"slug":"autoresearch-pro","displayName":"Autoresearch","summary":"Automatically improve OpenClaw skills, prompts, or articles through iterative mutation-testing loops. Inspired by Karpathy's autoresearch. Use when user says...","description":"---\nname: autoresearch-pro\ndescription: \"Automatically improve OpenClaw skills, prompts, or articles through iterative mutation-testing loops. Inspired by Karpathy's autoresearch. Use when user says 'optimize [skill]', 'autoresearch [skill]', 'improve my skill', 'optimize this prompt', 'improve my prompt', 'polish this article', 'improve this article', or explicitly requests quality improvement for any text-based content. Supports three modes: skill (SKILL.md files), prompt (any prompt text), and article (any document).\"\n---\n\n# autoresearch-pro\n\n## Overview\n\nAutomatically improve any OpenClaw skill, prompt, or article through iterative mutation-testing: small edits → run test cases → score with checklist → keep improvements, discard regressions.\n\n**Inspired by [Karpathy/autoresearch](https://github.com/karpathy/autoresearch).**\n\nSupports three optimization modes:\n\n| Mode | Input | Output |\n|------|-------|--------|\n| **Skill** | Path to a skill directory | Improved SKILL.md |\n| **Prompt** | A prompt text string | Improved prompt |\n| **Article** | An article/document text | Improved article |\n\n---\n\n## Workflow\n\n### Step 1 — Identify Mode and Input\n\nAsk the user to confirm:\n\n- **Mode 1 — Skill**: User says \"optimize [skill-name]\" or provides a skill path\n- **Mode 2 — Prompt**: User says \"optimize this prompt\" or pastes a prompt\n- **Mode 3 — Article**: User says \"improve this article\" or pastes article text\n\nFor **Skill mode**, resolve the skill path to `~/.openclaw/skills/<skill-name>/SKILL.md`.\nFor **Prompt/Article mode**, keep the text in context (do not write to disk unless needed).\n\n### Step 2 — Generate Checklist (10 Questions)\n\nRead the target content first. Then generate 10 diverse, specific yes/no checklist questions relevant to the content type:\n\n**For Skill mode (same as before):**\n\n| # | Dimension | What to Check |\n|---|----------|---------------|\n| 1 | Description clarity | Is the frontmatter description precise and actionable? |\n| 2 | Trigger coverage | Does it cover the main real-world use cases? |\n| 3 | Workflow structure | Are steps clearly sequenced and unambiguous? |\n| 4 | Error guidance | Does it handle error states and edge cases? |\n| 5 | Tool usage accuracy | Are tool names and parameters correct for OpenClaw? |\n| 6 | Example quality | Do examples reflect real usage patterns? |\n| 7 | Conciseness | Is content free of redundant repetition? |\n| 8 | Freedom calibration | Is instruction specificity appropriate? |\n| 9 | Reference quality | Are references and links accurate? |\n| 10 | Completeness | Are all sections filled with real content? |\n\n**For Prompt mode (10 tailored questions):**\n\n| # | Dimension | What to Check |\n|---|----------|---------------|\n| 1 | Goal clarity | Does the prompt state a clear, specific goal? |\n| 2 | Role/tone | Is the desired role or tone specified? |\n| 3 | Input format | Is the input format clearly described? |\n| 4 | Output format | Is the expected output format specified? |\n| 5 | Constraints | Are key constraints and boundaries stated? |\n| 6 | Context sufficiency | Is enough context provided to avoid hallucination? |\n| 7 | Edge cases | Does it handle ambiguous or edge case inputs? |\n| 8 | Conciseness | Is it free of redundant or contradictory instructions? |\n| 9 | Actionability | Are instructions concrete and actionable vs. vague? |\n| 10 | Completeness | Are all necessary elements for the task present? |\n\n**For Article mode (10 tailored questions):**\n\n| # | Dimension | What to Check |\n|---|----------|---------------|\n| 1 | Title quality | Does the title clearly convey the main value? |\n| 2 | Opening hook | Does the opening grab attention and set expectations? |\n| 3 | Logical structure | Are ideas logically organized (not random)? |\n| 4 | Argument clarity | Are claims supported with evidence or reasoning? |\n| 5 | Conciseness | Is unnecessary padding or repetition removed? |\n| 6 | Transition flow | Do paragraphs/sections flow smoothly? |\n| 7 | Closing strength | Does the conclusion summarize and inspire action? |\n| 8 | Tone consistency | Is the tone consistent throughout? |\n| 9 | Readability | Is sentence/paragraph length varied appropriately? |\n| 10 | Audience match | Does language match the target audience level? |\n\n**Present the 10 questions**, numbered 1-10. Ask the user to select which ones to activate (e.g., \"use questions 1, 3, 5, 7\"). Default: use all 10 if user doesn't specify.\n\n### Step 3 — Prepare Test Cases\n\n- **Skill mode**: Generate 3-5 realistic prompts a user would send when using the skill\n- **Prompt mode**: Generate 3-5 test inputs that the prompt would process\n- **Article mode**: Generate 3-5 ways the article might be read or consumed\n\nStore test cases in context — do not write to disk.\n\n### Step 4 — Run Autoresearch Loop\n\n**Loop configuration:**\n- **Rounds per batch**: 30\n- **Max total rounds**: 100\n- **Pause**: After every 30 rounds, show summary and ask user to continue or stop\n- **Stop conditions**: User says stop, OR 100 rounds completed\n\n**Per-round procedure:**\n\n1. **Mutate**: Make ONE small edit to the target content:\n   - Skill mode: edit SKILL.md\n   - Prompt mode: edit the prompt string\n   - Article mode: edit the article text\n\n2. **Test**: For each test case, simulate what output the content would produce.\n\n3. **Score**: Apply each active checklist question (0 or 1 per question). Score = (passed / total) × 100.\n\n4. **Decide**: If new score ≥ best score → keep the mutation. If lower → revert.\n\n5. **Log**: Round number, mutation type, score, keep/revert decision.\n\n**Mutation types (pick one per round):**\n\n| Type | Description |\n|------|-------------|\n| A | Add a constraint rule |\n| B | Strengthen trigger/coverage |\n| C | Add a concrete example |\n| D | Tighten vague language |\n| E | Improve error/edge case handling |\n| F | Remove redundant content |\n| G | Improve transitions |\n| H | Expand a thin section |\n| I | Add cross-reference |\n| J | Adjust degree-of-freedom |\n\n### Step 5 — Report Results\n\n**After each batch (30 rounds):**\n```\nBatch N (rounds X-Y):\n  Best score: XX%\n  Mutations kept: N  |  Reverted: N\n  Most effective types: [list top 2-3]\nAccumulated improvements: [summary]\nContinue? (yes/stop)\n```\n\n**After full completion:**\n- Original score vs. final score\n- Top 3 most impactful mutations\n- Final improved content (inline or diff)\n- File path (skill mode only)\n\n---\n\n## Mutation Strategy Reference\n\n**High-impact, low-risk changes:**\n- Adding explicit constraints where the content is vague\n- Expanding coverage to cover edge cases\n- Adding concrete examples to abstract instructions\n- Tightening soft language (\"try to\" → \"must\")\n\n**Avoid in one round:**\n- Large rewrites of entire sections\n- Multiple unrelated changes at once\n- Changing fundamental scope or purpose\n\nSee `references/mutation_strategies.md` for the full strategy guide.\n\n---\n\n## Mode Selection Quick Reference\n\n| User says | Mode |\n|-----------|------|\n| \"optimize [skill]\" / \"autoresearch [skill]\" | Skill |\n| \"optimize this prompt\" / \"improve my prompt\" | Prompt |\n| \"polish this article\" / \"improve this article\" | Article |\n| \"optimize this document\" | Article |\n\nDefault to **Prompt mode** if the input is a text string without a skill path.\n","topics":["Document","Prompt"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":516,"installsAllTime":19,"installsCurrent":3,"stars":2,"versions":1},"createdAt":1774027796224,"updatedAt":1778492068588},"latestVersion":{"version":"1.0.0","createdAt":1774027796224,"changelog":"Initial release: skill/prompt/article optimization, inspired by Karpathy autoresearch","license":"MIT-0"},"metadata":null,"owner":{"handle":"0xcjl","userId":"s17c0swjv7p83sgyqfwvqqkbed83hk19","displayName":"Jialin","image":"https://avatars.githubusercontent.com/u/38884292?v=4"},"moderation":null}