integration-test-cycle

A repeatable process for exploring a part of the codebase, creating integration tests, running them, and adjusting the tests based on what the results reveal. Integration tests check how multiple parts of a system work together.

In plain words
What is it for?
Use it to create and run integration or end-to-end tests for areas such as an authentication module, payment flow, or API gateway, with optional repeated iterations.
Why use it?
It combines test design, execution, fixing, and review in one cycle instead of requiring separate manual steps and prewritten tasks.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/catlog22/claude-code-workflow/integration-test-cycle
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.09043
Opus 5 $0.00015 $0.04522
Sonnet 5 $0.00006 $0.01809
Haiku 4.5 $0.00003 $0.00904

Measured 2d ago against content hash 59abd6defa9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

integration-test-cycle scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/workflow/integration-test-cycle.md · 1,077 lines

How it starts

The opening of the file, as written. The whole thing — 1,077 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto Mode

When --yes or -y: Auto-confirm exploration decisions, use recommended test strategies, skip interactive checkpoints.

Workflow Integration-Test-Cycle Command

Quick Start

# Basic - explore and test a module
/workflow:integration-test-cycle "用户认证模块的集成测试"

# Auto mode - fully autonomous
/workflow:integration-test-cycle -y "支付流程端到端集成测试"

# Continue interrupted session
/workflow:integration-test-cycle --continue "认证模块"

# Custom iteration limit
/workflow:integration-test-cycle --max-iterations=15 "API网关集成测试"

Context Source: cli-explore-agent + Gemini/Claude analysis Output Directory: .workflow/.integration-test/{session-id}/ Core Innovation: Reflection-driven self-iterating test cycle with documented learning evolution

What & Why

Core Concept

Unified integration test workflow: Explore → Design → Develop → Test → Reflect → Adjust → Re-test — a closed-loop that autonomously improves test quality through text-based reflection.

vs Existing Commands:

  • test-fix-gen: Only generates test tasks, requires manual workflow-test-fix skill
  • test-cycle-execute: Only executes pre-existing tasks, no exploration or test design
  • This command: Full lifecycle — from zero knowledge to passing integration tests, with self-reflection

Value Proposition

  1. Zero-to-Tests: No prior session needed — starts from exploration
  2. Self-Improving: Reflection log drives strategy adjustment between iterations
  3. Integration Focus: Specifically targets cross-module boundaries and API contracts
  4. Documented Learning: Every decision, failure, and adjustment recorded in reflection-log.md

Output Artifacts

2 核心文件 + 1 追踪目录,全流程产物最小化:

Artifact Type Description
reflection-log.md 人类可读 ⭐ 唯一文本文档:探索发现、设计决策、迭代反思、累积认知、最终结论
state.json 机器可读 唯一状态文件:探索上下文、测试设计、测试清单、迭代状态、测试结果、修复历史、最终摘要
.trace/ 原始日志 CLI 输出和测试日志,仅调试用:cli-{N}.txttest-output.log

Read the full file on GitHub · 1,077 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 1,077 lines · 30 tokens per session scan A 59abd6defa9b

Subscribe to this mod's changes

integration-test-cycle is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,134 stars, last pushed 2mo ago), licensed MIT. It adds 30 tokens to every session and 9,043 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.