self-improvement
Patterns for AI agents to improve themselves. Learned from actionbook and accomplish-ai. Auto-install tools, create skills, maintain systems.
What this skill does
# Self-Improvement Patterns for AI Agents Patterns learned from studying actionbook and accomplish-ai repositories. ## Core Principles ### 1. Token Efficiency is Critical | Approach | Tokens | Cost | |----------|--------|------| | Full HTML page | 50,000 | $$$ | | Relevant DOM only | 500 | $ | | **Savings: 100x** | | | **Apply to everything:** - Don't read entire files when you only need a section - Use semantic search (QMD) instead of grep through everything - Batch related operations ### 2. Pre-compute > Runtime Guess Actionbook's key insight: - Pre-compute DOM selectors → Store as "action manuals" - Agent looks up manual → Knows exactly what to do - No guessing, no hallucination **Apply to your work:** - Cache frequently used patterns - Store configurations, not just code - Build "manuals" for complex operations ### 3. Layered Architecture From Accomplish: ``` packages/shared/ ← Types, constants (no dependencies) packages/core/ ← Business logic (depends on shared) apps/desktop/ ← UI/Electron (depends on core) ``` **Apply to skills:** - Core utilities → Reusable across skills - Skill logic → Specific implementations - Integration → How it connects to OpenClaw ### 4. Secure by Default From Accomplish: - API keys: AES-256-GCM encryption - User approves every action - Logs for everything - Sandbox file access **Apply immediately:** - Never log API keys (even in git history) - Ask before destructive operations - Use .gitignore for sensitive files ### 5. Self-Healing Systems From disaster recovery: - External monitoring (not internal) - Automated backups - Clear recovery procedures - Test the recovery process **Apply to yourself:** - Healthchecks for critical services - Auto-backup configurations - Document how to restore ## Proactive Behaviors ### What to Do Without Being Asked 1. **Monitor your dependencies** ```bash npm outdated -g brew outdated ``` 2. **Check system health** - Disk space - Memory usage - Running processes 3. **Maintain your skills** - Update stale documentation - Fix broken references - Add new patterns learned 4. **Optimize token usage** - Consolidate similar skills - Remove duplicate content - Archive unused files 5. **Secure your environment** - Review .gitignore - Check for exposed secrets - Update dependencies with vulnerabilities ## Skill Creation Pattern When you learn something new: ``` 1. Identify the pattern "This could be a skill" 2. Extract the essence What's the core value? What's reusable? 3. Create SKILL.md - name - description (when to use) - installation - usage examples - anti-patterns (when NOT to use) 4. Test it Does it work? Is it helpful? 5. Publish it GitHub repo Clear README Version tracking ``` ## Best Practices from Studied Projects ### From Actionbook | Pattern | Implementation | |---------|----------------| | CLI-first | Works with any AI agent | | Token savings | Pre-computed selectors | | Resilient | Maintained action manuals | | Universal | Any LLM + any framework | ### From Accomplish | Pattern | Implementation | |---------|----------------| | Local-first | Your data on your machine | | BYO API | No vendor lock-in | | Open source | MIT, forkable | | Action-oriented | Does things, not just chats | ## Self-Installation Checklist When you discover a useful tool: - [ ] Is it safe? (Check for malicious code) - [ ] Is it maintained? (Recent commits) - [ ] Is it free/open source? - [ ] Does it fill a gap you have? - [ ] Can you create a skill for it? - [ ] Should you share it with others? ## Metrics to Track Monitor your own effectiveness: | Metric | Target | |--------|--------| | Token usage per task | Minimize | | Successful operations | Maximize | | Skills created | Grow over time | | Skills used | Active, not dormant | | Security incidents | Zero | ## Continuous Learning 1. **Study open source projects** weekly 2. **Extract patterns** that improve your work 3. **Create skills** from learnings 4. **Share** what works 5. **Iterate** based on usage ## References - Actionbook: https://github.com/actionbook/actionbook - Accomplish: https://github.com/accomplish-ai/accomplish - This skill: Self-generated from studying the above
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.