Software

Teach coding agents reusable skills from passing tests

A developer built MuscleMemory to save reusable skills from coding-agent sessions once tests pass; they report Codex used 30.4% fewer tool calls and 25.5% less input.

Done with OtherSonnet 5.5

What they did

The author built add-ons for Claude Code, Codex and Cursor that record what the agent does. When the automatic tests pass after the last change, it saves a skill. A skill lists the files to change, the test that proves it works, and pitfalls. Skills must pass two later checks and get a person's approval before reuse, and all three agents share them.

How it went

The author reports Codex used 25.5% less input text, 30.4% fewer tool calls and 28.2% less time, with all tasks passing. An early Claude Code run cut input by 43.5%. On a small set of real bug-fix tasks, Codex solved as many with about half the text.

Worth knowing

The tests covered repeated tasks on three controlled projects, and the Claude Code run was small. Reusing skills across different projects has not been tested.

Try it yourself

Set up MuscleMemory for this project following its install docs, connect it to [your agent], then work on [task] as usual. After the tests pass, show me the skill it proposes to learn and wait for my approval in the dashboard before keeping it.

Swap the highlighted [parts] for your own details.

Read the original

Source: Hacker News · TheWariend · Oct 16, 2026

Written with AI assistance from the original post and checked against our editorial guidelines. Results are as reported by the source, not independently verified.

Get 5 use cases every day

The best things people got an agent to do yesterday, each with the prompt. Free, one email a day.

See today's issue