knitbrain: Command for Gemini CLI

.gemini/commands/loop.toml

loop is a command for Gemini CLI from PDgit12/knitbrain. It costs 0 tokens per session (285 once invoked), scanned A, original, MIT.

A command that starts knitbrain's external runner in the background using a Markdown goal file with unchecked tasks. The runner starts an agent for each task and marks tasks complete only after verification passes.

In plain words
What is it for?
It is for running checked goal lists, watching the runner's log, reviewing its dashboard, and stopping the background process when needed.
Why use it?
It lets long-running work continue without blocking the current coding session and avoids treating an unverified task as finished.

Command for Gemini CLI

Written for Gemini CLI: installed under .gemini/.

This is PDgit12/knitbrain's own configuration. It tells Gemini CLI how to work on knitbrain itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything knitbrain configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PDgit12/knitbrain. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PDgit12/knitbrain/main/.gemini/commands/loop.toml
Clone the repo
git clone --depth 1 https://github.com/PDgit12/knitbrain

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/pdgit12/knitbrain/loop/github.svg)](https://agentmods.dev/commands/pdgit12/knitbrain/loop)
Your own site
<a href="https://agentmods.dev/commands/pdgit12/knitbrain/loop"><img src="https://agentmods.dev/badge/commands/pdgit12/knitbrain/loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for loop

Your own site · 80×15
<a href="https://agentmods.dev/commands/pdgit12/knitbrain/loop"><img src="https://agentmods.dev/badge/commands/pdgit12/knitbrain/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00285
Opus 5.5 $0.00000 $0.00114
Sonnet 5.5 $0.00000 $0.00057
Haiku 4.5 $0.00000 $0.00028

Measured 14d ago against content hash 32c7e9e20214, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loop 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 14d 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.

.gemini/commands/loop.toml · 10 lines

What it actually says

description = "Launch the autonomous external runner (knitbrain loop) in the background" prompt = """ Launch knitbrain's EXTERNAL runner in the BACKGROUND, then report the handle. Do NOT run the loop inline — it would block this session.

  1. Resolve a goal file from the arguments: a markdown file with - [ ] task checkboxes (default goal.md). If it is missing, tell the user to run knitbrain onboard first and stop — do NOT invent tasks.
  2. Using your terminal tool, run DETACHED (pass through any --for/--max/--verify/--reviewer the user gave): nohup knitbrain loop --for 1h --agent "gemini -p" > .loop.log 2>&1 & echo "loop PID $!"
  3. Report the PID + log path (<goalfile>.loop.log). The runner spawns a FRESH "gemini -p" per - [ ] task, runs the verify gate, and ticks - [x] only on green. Watch the boxes tick, tail the log, or run knitbrain dashboard. Stop early with kill <PID>.
  4. Do NOT tick any box yourself — only the runner's verify (and optional reviewer) gate marks a task done. No false green. """
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. 14d ago First seen · 10 lines · 0 tokens per session scan A 32c7e9e20214

Subscribe to this mod's changes

loop is a command published in the GitHub repository PDgit12/knitbrain (6 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 285 tokens. 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-10-23.

Related

loop compared with commands from other repositories

loop next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loopPDgit12/knitbrainCommand66d agoMITA0Gemini CLI
lians-integrateLians-ai/LiansCommand174d agoApache-2.0A17Claude Code
ijfw-auditFerroxLabs/ijfwCommand2144d agoMITA28Claude Code
ui-aqa-flow-test-report-analysisgriddynamics/rosettaCommand370todayApache-2.0A19Claude Code
api-aqa-flow-execution-and-report-analysisgriddynamics/rosettaCommand370todayApache-2.0A28Claude Code
constraintsvinvcn/addyosmani-agent-skills-zhCommand4617d agoMITA20Claude Code
playwright-executekatalon-labs/true-skillsCommand1017d agoMITA117GitHub Copilot