# Utg

> Generates unit tests for code changed in the current branch by comparing against origin/main and following existing test conventions.

- Skill: `comeonoliver/utg` (Agent Skill)
- Install (CLI): `npx skillmds@latest add comeonoliver/utg`
- Raw SKILL.md: https://api.skillmd.com/api/skills/comeonoliver/utg/raw
- Safety review: CAUTION (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools, AI & ML, Testing & QA
- Tags: Code Review, Git Diff, Test Coverage, Unit Testing
- Author: ComeOnOliver (https://skillmd.com/u/comeonoliver)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/comeonoliver/utg

---

Check the diff against origin/main, and generate unit tests for the changed code
in this branch. Run `git fetch origin` to make sure git context is up-to-date.

Here is the list of files changed in this branch:
!`git diff --stat origin/main`

- Check existing test coverage for changed code; skip areas already well-covered
- Only generate tests for logic changes, not data structure or formatting changes
- Use the project's existing test framework and conventions
- Run the test suite with coverage after generating tests, and add more tests if coverage for changed code is low

**Testing guidelines:**

- Tests should be isolated — use mocks/stubs for external dependencies, but do not mock logging or telemetry
- Only test public API of modules/classes, not private/internal methods
- Follow existing test style and conventions in the codebase

