Blog radlak.com

…what’s there in the world

Building Autonomous Self-Improving AI Skills with Claude Code

The central theme of this video explores how to automate the optimization of custom Claude Code skills so they improve themselves overnight without human intervention. Inspired by Andrej Karpathy’s “auto-research” concept, the creator demonstrates how to build a continuous feedback loop that tests, refines, and updates AI instructions autonomously, saving weeks of manual tweaking.

Key Concepts and Methodology

  • The Karpathy Loop: Give an AI an objective and a measurable metric. The AI makes a code change, runs a test, and checks the score. If the output improves, it keeps the change; if not, it reverts. It repeats this process indefinitely until manually stopped.
  • Binary Assertions are Crucial: To automate testing, subjective metrics (like “make it compelling”) must be replaced with strict true/false binary assertions. Examples include “under 300 words,” “contains no m-dashes,” or “ends with a declarative statement.”
  • The Setup: You need an eval folder containing an eval.json file with up to 25 binary assertions based on your skill.md file. Claude Code runs prompts, checks the pass rate, and tweaks the skill.md file to fix any failing assertions.

Two Layers of Skill Improvement

The video highlights that an effective self-improving AI skill requires two distinct optimization layers:

  • Layer 1: Skill Activation. This is handled by Anthropic’s built-in tool, which improves YAML descriptions to ensure the AI triggers the correct skill at the right time.
  • Layer 2: Output Quality. This uses the custom autonomous loop. It tests the actual output of the skill against the binary assertions, continuously refining the core instruction file (skill.md) until a perfect formatting score is reached.

Conclusions and Limitations

The primary takeaway is that autonomous loops can drastically reduce the time it takes to build reliable AI agents by forcing them to learn from their own formatting mistakes. However, there are limitations. While this binary loop perfectly handles structure, word counts, and forbidden patterns, it cannot assess subjective qualities like tone of voice or creative brilliance. Those elements still require human review or qualitative side-by-side dashboard testing.

Mentoring question

How could you translate your subjective standards for a current project or workflow into strict ‘binary assertions’ so an AI could reliably test its own work?

Source: https://youtube.com/watch?v=wQ0duoTeAAU&is=CjfDKz1Nt7uYHMLm


Posted

in

by

Tags: