Skip to content
Development
Command

/add-tests

Add tests for recently changed files or specified code

From plugin
project-starter
1.4k26 skills7 agents26 commands6 hooks
> /plugin marketplace add CloudAI-X/claude-workflow-v2
> /plugin install project-starter@claude-workflow

Command definition

add-tests.md
allowed-tools: Bash(git:*), Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(bun:*), Bash(pytest:*), Bash(go:*), Read, Write
description: Add tests for recently changed files or specified code
argument-hint: "[file path or function name]"

Context

  • Recently modified files: !`git diff --name-only HEAD~3 2>/dev/null | head -10`
  • Project root files (infer the test framework from these): !`ls -a`
  • Existing test files: !`git ls-files 2>/dev/null | grep -i -e test -e spec | head -10`
  • Test directory structure: !`ls -la tests/ test/ __tests__/ spec/ 2>/dev/null | head -20`

Task

Add tests for the specified target:

1. Identify the file/function to test 2. Find the corresponding test file (or create one following project conventions) 3. Analyze the code to understand:

  • Input/output behavior
  • Edge cases
  • Error conditions

4. Write comprehensive tests covering:

  • Happy path
  • Edge cases
  • Error handling

5. Run the tests to verify they pass

Target: $ARGUMENTS

If no target specified, focus on recently modified files that lack test coverage.

@cloudai-x
Ships withproject-starter

A universal Claude Code workflow plugin with specialized agents, skills, hooks, and mode commands for any software project. Compatible with skills.sh — works with Claude Code, Cursor, Codex, and 35+ AI agents.

1.4k14 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.4k
Star history of CloudAI-X/claude-workflow-v2 on GitHub, a chart by star-history.com

Other commands on project-starter.

architect

architect

Command

System design and architecture planning mode. Focuses on high-level design, trade-offs, and technical decisions before…

bootstrap-repo

bootstrap-repo

Command

Explore the repository with 10 parallel subagents to create comprehensive documentation. Creates CODEBASE.md with full…

code-simplifier

code-simplifier

Command

Simplifies code after implementation. Reviews recent changes and suggests/applies simplifications while preserving behavior.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command