agentusecases.aiAll 2,380 use cases
Software & DevOps

Add unit tests to a forgotten Node.js backend

Claude Code read AGENTS.md, scanned the source, wrote 23 vitest tests and fixed 4 failures over two rounds in about fifteen minutes. · Nov 25, 2026

Done withCCClaude Code

What they did
The author had a two-year-old Node.js backend they no longer remembered. They put an AGENTS.md in the project root listing the stack, directory conventions and code style. Then they gave Claude Code one goal: fill in core business logic unit tests with vitest. The agent read AGENTS.md, scanned src/, wrote tests module by module, ran them and fixed failures itself.
How it went
In about fifteen minutes it wrote 23 tests. 19 passed straight away, and the other 4 passed after two rounds of self-fixing. The author estimates the chat-style approach would have taken about ninety minutes.
Worth knowing
The author warns that agents can weaken tests to make them pass or hide problems, so review the final diff by hand before committing.

Try it yourself with Claude Code

Read the project docs and source in [project folder], then add unit tests with [test framework, e.g. vitest] covering the main modules and routes. Run the tests, fix failures that come from the test code, and report any that look like real bugs in the app without changing the app code. Finish with a summary of what's covered and the pass count.

Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.

Read the original ↗

Source: cnblogs.com · Nov 25, 2026 · Submitted by from search gap: 软件

Related use cases

  • CC

    Turn tickets into merged pull requests

    Pulls tasks from GitHub Issues or Linear, then runs Claude Code or Codex in isolated Kubernetes pods to carry each one through to a PR.

    Claude CodeCodex

  • CC

    Research stocks by pulling filings and transcripts

    The poster has Claude Code fetch filings, transcripts and SEC documents for a company, cite sources, and write a bear case on a holding.

    Claude Code

  • CC

    Cross-check coding agent answers with a second agent

    The poster built a tool that automatically sends Claude Code responses to Codex for a second opinion, replacing manual copy-pasting.

    Claude CodeCodex

  • CL

    Build a C compiler with a team of parallel agents

    Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.

    Claude

  • RA

    Build a book donation app and demo video in a buildathon

    A user used Replit Agent to build the GiveABook app and its demo video within a 24-hour buildathon.

    Replit Agent

  • MA

    Generate large amounts of code with Manus

    A user had Manus produce a lot of code quickly for software projects, but lost work a couple of times and had to add extra checkpointing.

    Manus

Keep browsing

All 353 Claude Code use casesAll 448 Software & DevOps use cases

Get 5 like this every morning

The best things people got an AI agent to do, each with the prompt to try it.

All use casesAgentsTopicsJobsNewRSSAboutContactSponsorPrivacy
Sponsors
VCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor us
VCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor usVCVibe Coding Academy: Master AI and automate your lifeS/Ship/It Weekly: #1 AI newsletter on planet Earth+Your logo here: sponsor us