ck:loop

Run autonomous modify-commit-verify loops to optimize code metrics in git repositories.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/quanganh208/cookmate --skill ck-loop-quanganh208
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:loop
Source: https://github.com/quanganh208/cookmate/tree/main/.opencode/skills/ck-loop
Command: npx skills add https://github.com/quanganh208/cookmate --skill ck-loop-quanganh208

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates repeated, measurable improvements to code and build metrics (for example test coverage, bundle size, lint error counts, and build time) by running an iterative modify-commit-verify loop that learns from git history and safely reverts regressions.

Core Features & Use Cases

  • Autonomous iterative experiments: Proposes one atomic change per iteration, commits before verification, and keeps or reverts based on numeric verification results.
  • Guarded safety and recovery: Supports optional guard commands, revert-first discard strategy, crash/timeout handling, and consecutive-discard detection to avoid wasted cycles.
  • Rich logging and protocol: Appends structured iteration rows to loop-results.tsv, records baseline, and follows an 8-phase protocol for reproducible optimization across a git repository.
  • Use Cases: Increase test coverage in a focused directory, reduce main bundle bytes, or drive ESLint error counts to zero in a scoped part of the codebase.

Quick Start

Start an autonomous loop to increase test coverage in src/utils by specifying a Goal, a Scope glob (for example src/utils/**/*.ts), and a Verify command that prints a single numeric coverage percentage to stdout.

Frequently Asked Questions about ck:loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate test coverage or bundle size optimization in a git repository?

Automate metric-driven optimization by running an autonomous modify-commit-verify loop that proposes atomic changes, checks a numeric metric, and reverts regressions in git-tracked repositories.

What is an autonomous iterative loop for code metrics and how does it work?

An autonomous iterative loop proposes one atomic code change per cycle, commits it, verifies a numeric metric, and keeps or reverts the change based on whether the metric improves or regresses.

Can I use a guard command to prevent regressions while reducing lint errors?

Yes, you can specify an optional guard command to run regression checks alongside the verify command, ensuring the autonomous loop safely discards changes that fail guards.

Do I need a clean git working tree to run autonomous code optimization loops?

Yes, a clean git working tree is required before starting the loop, because the tool commits proposed changes before verification and reverts failures directly within the repository.

What are the limitations of using an autonomous loop for build time optimization?

The loop requires a verify command that prints a single numeric value within a short timeout, relies on git history for reverts, and may waste cycles if consecutive discards occur.

How do I log iteration results when driving ESLint error counts to zero?

The loop automatically appends structured iteration rows, including baseline metrics and outcomes, to a loop-results.tsv file for reproducible optimization tracking across the repository.