Przejdź do treści
Biblioteka skilli
AI i agenci · Automatyzacja

ctx-loop

/ctx-loop

Generuje skrypt powłoki do uruchamiania narzędzi AI w autonomicznych pętlach iteracji: praca bez nadzoru, przebiegi headless i procesy AI sterowane z CI.

Repozytorium
ctx ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
18.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 18.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Generuje skrypt powłoki do uruchamiania narzędzi AI w autonomicznych pętlach iteracji: praca bez nadzoru, przebiegi headless i procesy AI sterowane z CI.

Oryginalny opis (EN)

Generate a shell script for running AI tools in autonomous iteration loops. Use when setting up unattended iteration, headless agent runs, or CI-driven AI workflows.

Jak działa

  1. Before Generating
  2. When to Use
  3. When NOT to Use
  4. Usage Examples
  5. Flags
  6. Supported Tools
  7. Completion Signals
  8. Execution
  9. Safety Notes
  10. Quality Checklist
Sekcje z nagłówków SKILL.md, w oryginale · 104 linii, 517 słów
Podgląd SKILL.md
---
name: ctx-loop
description: "Generate a shell script for running AI tools in autonomous iteration loops. Use when setting up unattended iteration, headless agent runs, or CI-driven AI workflows."
allowed-tools: Bash(ctx:*)
---

Generate a ready-to-use autonomous loop shell script.

## Before Generating

1. **Check for existing loop script**: look for `loop.sh` in the
   project root; confirm before overwriting
2. **Verify PROMPT.md exists**: the generated script defaults to
   reading `PROMPT.md`; if missing, ask the user what prompt file
   to use
3. **Verify the context directory exists**: the loop pattern depends
   on persistent context; run `ctx init` first if needed

## When to Use

- When setting up a project for autonomous iteration
- When the user wants to run unattended AI development
- When switching AI tools (e.g., Claude to Aider) and need a
  new loop script
- When customizing loop parameters (max iterations, completion
  signal, prompt file)

## When NOT to Use

- For interactive pair-programming sessions (just use the AI
  tool directly)
- When the user already has a working loop script and has not
  asked for changes
- When the project lacks a context directory and `PROMPT.md` (set
  those up first with `ctx init --ralph`)

## Usage Examples

```text
/ctx-loop
/ctx-loop --tool aider
/ctx-loop --prompt TASKS.md --max-iterations 10
/ctx-loop --completion SYSTEM_BLOCKED --output my-loop.sh
```

## Flags

| Flag               | Short | Default            | Purpose                         |
|--------------------|-------|--------------------|---------------------------------|
| `--prompt`         | `-p`  | `PROMPT.md`        | Prompt file the loop reads      |
| `--tool`           | `-t`  | `claude`           | AI tool: claude, aider, generic |
| `--max-iterations` | `-n`  | `0` (unlimited)    | Stop after N iterations         |
| `--completion`     | `-c`  | `SYSTEM_CONVERGED` | Signal that ends the loop       |
| `--output`         | `-o`  | `loop.sh`          | Output script filename          |

## Supported Tools

| Tool      | Command generated                    |
|-----------|--------------------------------------|
| `claude`  | `claude --print "$(cat <prompt>)"`   |
| `aider`   | `aider --message-file <prompt>`      |
| `generic` | Template stub for custom AI CLI      |

## Completion Signals

The loop watches AI output for these signals:

| Signal               | Meaning                              |
|----------------------|--------------------------------------|
| `SYSTEM_CONVERGED`   | All tasks complete; loop exits       |
| `SYSTEM_BLOCKED`     | Needs human input; loop exits        |
| `BOOTSTRAP_COMPLETE` | Initial scaffolding done; loop exits |

## Execution

```bash
ctx loop $ARGUMENTS
```

The command writes a shell script (default `loop.sh`) and makes
it executable. Report the generated path and how to run it:

```bash
chmod +x loop.sh   # already done by ctx loop
./loop.sh
```

## Safety Notes

- The generated script includes `set -e` and a 1-second sleep
  between iterations to prevent runaway loops
- `--max-iterations` is strongly recommended for first runs;
  suggest a reasonable default (e.g., 10) if the user omits it
- The script captures AI tool errors with `|| true` so one
  failed iteration does not kill the loop
- Autonomous agents benefit from explicit reasoning prompts in
  PROMPT.md: adding "think step-by-step before each change"
  to the iteration prompt significantly improves accuracy and
  reduces cascading mistakes in unattended runs

## Quality Checklist

Before reporting success, verify:
- [ ] Generated script exists at the output path
- [ ] Script is executable
- [ ] Prompt file referenced in the script actually exists
- [ ] If `--max-iterations 0`, user is aware it runs until
      a completion signal (warn them)

Wersje

W bazie nie ma innych skilli o nazwie ctx-loop.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 9c46f115d495 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100lean-ctx-review
    Ocenia działanie narzędzi MCP ctx_* z lean-ctx w bieżącej sesji i zgłasza upstream potwierdzone problemy, w tym awarie lub powroty do natywnych narzędzi.
  • 100super-ralph-wiggum
    Uruchamia Claude Code w autonomicznych pętlach iteracji aż do ukończenia zadania, na przykład rozwoju funkcji z PRD, poprawy pokrycia testami, lintingu czy migracji frameworków.
  • 100autonomous-loops
    Opisuje wzorce pętli autonomicznych: od sekwencyjnych potoków po systemy wieloagentowe z DAG, do ciągłego rozwoju.
  • 100loop-designer
    Kompiluje cel w trwałą, opartą na plikach pętlę agenta, czyli katalog .loop z LOOP.md, state.json i backlog.md, który dowolny agent kodujący wykona bez nadzoru.
  • 100deepseek-harness
    Obsługuje DeepSeek Harness (dsh) 0.2.1: uruchamianie przez npx i profile, przebiegi headless, klient Pythona DeepSeekHarness oraz wtyczki Cordis z apply(ctx) i defineTool, a także błędy ładowania profilu i brak narzędzi w sesji.
  • 100loop-readiness
    Ocenia, czy plan pętli agenta działającej bez nadzoru ma dość wskazówek z góry i weryfikacji zwrotnej, by bezpiecznie przejść wiele iteracji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.