MikeVeerman

Undercover Agent — Development skill for Claude Code

Development community

A prompt to help your agent generate 100% code coverage for an existing code base.

How to install Undercover Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open MikeVeerman/undercover-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Undercover Agent does

A prompt to help your agent generate 100% code coverage for an existing code base.

Alternatives in Development

  • Earnings Preview — 财报前预览 — 一致预期对照 + 行业观察指标 + Bull/Base/Bear 三情景 + 催化剂清单 + 预期波幅 6.6k ★
  • Coverage 2.3k ★
  • Rb Refresh — Rebuild the repobrain project knowledge base after significant changes 1.3k ★

README

[!IMPORTANT] When this repo was created, getting to 100% or even 70% code coverage was genuinely hard for agents. Today, it's a solved problem. This repo is no longer maintained.

Undercover Agent Logo

Undercover agent

**Let's have AI agents write the tests our engineers didn't have the time for.**

Software developers know they should write unit tests. Shipping features, however, always seems more important. Over time, technical debt creeps in, and by the time we want to pay it back, we really, really wish we had those tests.

Writing unit tests for an existing codebase usually isn't simple, and it's never cheap.

But, what if we could generate these tests instead of dedicating development capacity to them? Can we get an LLM to write tests so our engineers don't have to?

LLMs can write test automation. That's not new. But telling Cursor to write a test for a component we just created takes almost as long as writing the test ourselves. It still requires a human developer. The performance gains are minimal.

What I am interested in is asking it to write **all the missing tests** for a codebase!

Automated tests execute parts of the codebase and check whether they behave as expected. If a codebase has 100 lines of code and our test suite executes 40 of those, we say the code has 40% code coverage. Most modern programming environments allow us to generate reports showing us which lines of code have been tested and, more importantly, which lines have not.

Undercover Agent is an experiment to figure out if we can get our favourite AI Code Agents to write the tests for us.

Usage

To generate tests for a single class, feed the prompt found in `src/cover_one_file.prompt` into your favourite agent framework. I ran the experiment with [Cursor](https://cursor.sh), [Junie](https://www.jetbrains.com/junie/), [Codex](https://github.com/openai/codex) and [Claude Code](https://claude.ai). Claude Code by far has the best res