Coco Loop logo

Coco Loop

Community
coco-research
coco-loop

Start a safe, governed autonomous loop from a plain-language goal. Use when the user says /coco-loop, "run an autonomous loop", "keep my build green for N hours", "work on X autonomously for a while", or wants a bounded self-improving loop that proposes fixes and never commits on its own. Turns a vague goal into a readable charter the user confirms, then arms and runs the loop propose-only under the coco-loops governance framework.

Overview

Publishercoco-research
Repositorycoco
Skill namecoco-loop
Stars
550
Forks
12
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by coco-research on GitHub. Read the source before you install it.

Installation

Install the Coco Loop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/coco-research/coco/tree/main/skills/coco-loop
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/coco-research/coco.git /tmp/coco
mkdir -p .claude/skills
cp -r /tmp/coco/skills/coco-loop .claude/skills/coco-loop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Coco Loop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Coco Loop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Coco Loop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

coco-loop

Turn a plain-language goal into a governed, propose-only loop. You compile the goal into a charter, the person confirms it, and the loop runs under the coco-loops framework: it proposes changes, a separate verifier judges them, and nothing is committed. The loop stops itself when its lifetime cap of active work is spent.

The framework enforces an immutable constitution underneath every charter. You cannot write a charter that disables the verifier, commits without approval, edits the constitution, sends content to raw public-cloud endpoints, or runs unattended destructive operations. The coco-loops charter command rejects any charter that tries. Do not attempt to work around it. Present the floor to the person as a feature.

Prerequisites

coco-loops must be on the PATH. Install it from coco-research/coco-loops:

bash
git clone https://github.com/coco-research/coco-loops
pip install -e coco-loops

Check with coco-loops --help. If it is missing, tell the person how to install it and stop.

Flow

1. Understand the goal

Read the person's goal. Ask at most one or two clarifying questions, and only when the answer genuinely changes the charter:

  • Which repository or worktree should the loop work in? A loop needs a clean git tree, so a dedicated worktree is strongly recommended (the loop reverts its own changes each cycle and refuses to run on a dirty tree, to avoid clobbering uncommitted work).
  • How long should it run? This becomes the lifetime cap of active work, for example 4h. The clock only advances while the loop is actually working, so a closed laptop or an idle wait does not burn it.

Do not over-question. If the goal is clear, proceed.

2. Compile the charter

Get the exact field list with coco-loops charter --schema, then produce a charter as JSON. Derive the principles from the goal, and add sensible safe defaults. Keep principles readable: they are what the person confirms and what we audit the loop against.

Example, for "keep my frontend build green for the next 4 hours":

json
{
  "loop_id": "keep-build-green",
  "objective": "Make failing frontend tests pass and keep the build green.",
  "principles": [
    "Only touch code covered by a failing test; keep the diff as small as possible.",
    "If a test is genuinely stale, propose updating it rather than weakening it silently.",
    "Prefer fixing the code over changing the test when a real regression is likely."
  ],
  "guardrails": [
    "No dependency or lockfile changes.",
    "No CI or build-config edits."
  ],
  "context": ["the frontend test suite"],
  "inputs": ["failing tests detected each cycle"],
  "lifetime": "4h",
  "level": "L1"
}

Rules for the charter you produce:

  • level is always L1. New loops are propose-only. Higher maturity is earned through the promotion gate, never declared here.
  • loop_id is a slug: lowercase letters, digits, and hyphens.
  • Give at least one principle. Three to five is usually right.
  • Set lifetime from what the person asked, defaulting to 4h.

3. Show the charter and confirm

Write the charter JSON to a temporary file, then run:

coco-loops charter --from-json <file>

This validates the charter against the constitution floor and prints a readable version. If validation fails, it prints why (with the invariant it violated); fix the charter and try again. Show the rendered charter to the person and ask them to confirm before anything is armed.

4. Install and arm

On confirmation:

coco-loops charter --from-json <file> --install

This writes <loop_id>.contract.md into the loops directory, arms the lifetime cap, and clears the kill-switch. The loop is now defined and armed, propose-only.

5. Give it work and run it

The loop reads tasks from a JSON queue (a list of {"id", "name", "instruction"} objects). Seed the queue with concrete, grounded tasks, for example one task per failing test with the file and the assertion. A loop is only as good as its task list; vague tasks produce no-ops.

Run it in the chosen worktree:

coco-loops run <loop_id> --repo <worktree> --tasks <queue.json>

Each cycle it pops a task, asks the maker (cursor-agent by default) to propose a change, has the verifier judge it, logs the proposal, and reverts the tree. Use --once to run a single cycle first and watch what it does. Recommend a dedicated worktree so the loop's revert can never touch the person's uncommitted work.

6. Monitor and hand back

coco-loops status <loop_id>

shows the recent proposals, the verifier verdicts, and how much of the lifetime is spent. Everything is propose-only: the person reviews the batch of proposals and applies what they want. When the lifetime is spent the loop stops itself. To run another session, re-arm with coco-loops start <loop_id> --for <duration> (or run charter --install again).

What to tell the person

  • The loop proposes, it does not commit. They stay in control of what lands.
  • It stops itself after its lifetime of active work. It will not run forever.
  • The constitution floor is always on and cannot be overridden by a charter.
  • A dedicated worktree keeps their main checkout safe.

Frequently asked questions

What does the Coco Loop AI skill do?

Start a safe, governed autonomous loop from a plain-language goal. Use when the user says /coco-loop, "run an autonomous loop", "keep my build green for N hours", "work on X autonomously for a while", or wants a bounded self-improving loop that proposes fixes and never commits on its own. Turns a vague goal into a readable charter the user confirms, then arms and runs the loop propose-only under the coco-loops governance framework.

Why use Coco Loop on TypingMind?

Because you install it once and use it with any model. Coco Loop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Coco Loop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/coco-research/coco/tree/main/skills/coco-loop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Coco Loop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Coco Loop?

As many as you like. As long as a model supports skills, you can use Coco Loop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Coco Loop AI skill free?

It is published on GitHub by coco-research. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇