swe-loop

A software-development workflow that turns a coding request into planned tasks, implementation, testing, and review.

In plain words
What is it for?
Use it to build features, fix bugs, or refactor a real codebase task by task, with an engineer making changes and a separate check of the results.
Why use it?
It prevents a large change from being handled in one unchecked pass and requires both automated tests and quality review before completion.

Skill for Claude CodeCodex

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 skills/gaasher/agent-loop-skills/swe-loop
Any agent
npx skills add gaasher/Agent-Loop-Skills --skill swe-loop
Clone the repo
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills

Made for: Claude Code, Codex.

Per session 252 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,459 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.00252 $0.03459
Opus 5 $0.00126 $0.01729
Sonnet 5 $0.00050 $0.00692
Haiku 4.5 $0.00025 $0.00346

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

Security

Grade A, and why

swe-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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (tools/quality_check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

loops/swe-loop/SKILL.md · 184 lines

How it starts

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

SWE Loop

The execute stage of the prompt → plan → execute → debug pipeline: it turns a coding prompt into working, tested, well-organised code. It runs the plan-loop to get an executable tasks.json, then walks the tasks in dependency order. Each task is driven by two isolated subagents — an Engineer that writes the code and a QA that owns the tests and the quality bar — looping until the gate holds. The feedback signal is two-part, like the repo's other evaluator loops: an objective gate (the task's tests pass, the full regression suite stays green, and tools/quality_check.py reports no threshold violation) and a qualitative gate (QA's score against rubrics/quality-rubric.md — simplicity, readability, comment hygiene, organisation, style-match). One task is kept per outer step; one change is proposed per inner round, so every delta is attributable.

When to use

Use to implement a prompt in a real repository when you want the work decomposed, built, and tested rather than written in one shot — and when "done" means a downstream engineer would accept it: tests green and the code clean. Default to executing the plan-loop's tasks.json task by task; the escape hatch is a genuine plan defect, which becomes an open_question for the human rather than an improvised detour. Simpler is better — a change that adds complexity to pass a test will be sent back by QA. Not for planning alone (plan-loop) or for minimising a metric on a finished artifact (optimize-loop).

Setup

Resolve bindings interactively. If loop.run.yaml exists, load it, confirm the values in one line, and skip to the loop. Otherwise: on Claude Code (the AskUserQuestion tool is available) infer a likely value per binding and recommend it; on other hosts ask each as a quoted prompt. Then write loop.run.yaml (format: examples/run.example.yaml) and confirm before building anything.

binding meaning default how to infer
<prompt> the coding task to build — a file path or inline text the user's request
<repo> the project to build in; the Engineer edits it . the repo being worked on
<tasks_file> the plan-loop output the loop executes (validated by plan-loop's validate_plan.py) <sandbox_root>/tasks.json produced by plan-loop in Phase 0
<test_command> how the project's tests run tasks.json.environment.test_command; else infer from the repo (pytest, npm test, …)
<sandbox_root> where the plan, iteration artifacts, and ledger live ./sandbox
<iter_strategy> branches (a git commit per kept task) or snapshots (folder copies) branches branches needs a clean repo
<pr_mode> how kept tasks become PRs (see Pull requests): stacked (one PR per task, each stacked on the prior — default), single (one PR for the whole run), or none (local commits, no PR) stacked single for a small change or no stacked-PR tooling; none when offline / no remote
<base_branch> the branch PRs ultimately target main the repo's default branch (git symbolic-ref refs/remotes/origin/HEAD)
<task_budget> max Engineer⇄QA rounds per task 6
<patience> stop a task after N rounds with no improvement 2
<quality_thresholds> hard limits for quality_check.py: max_comment_block, max_comment_line_len, max_func_loc, max_nesting, max_file_loc 8 / 100 / 60 / 4 / 400 tighten/loosen to the repo's norms

Read the full file on GitHub · 184 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 184 lines · 252 tokens per session scan A 3d18b6a5900a

Subscribe to this mod's changes

swe-loop is a skill published in the GitHub repository gaasher/Agent-Loop-Skills (161 stars, last pushed 2mo ago), licensed MIT. It adds 252 tokens to every session and 3,459 once invoked, about $0.0013 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.

Related

Other skills, from other repositories

improving-frontend-coverage

Runs frontend unit tests with coverage, analyzes coverage reports, and implements meaningful tests to increase coverage by 0.2%. Use when you want to systematically improve frontend test coverage with high-value test cases.

streamlit/streamlit · 48 tokens

developing-with-streamlit

Use for ALL Streamlit tasks: creating, editing, debugging, beautifying, styling, theming, optimizing, or deploying Streamlit apps. Also custom components, st.components.v2, HTML/JS/CSS work. Discovers and loads version-matched reference docs from the user's installed Streamlit (>=1.57). Triggers: streamlit, st.…

streamlit/streamlit · 128 tokens

sn-da-excel-workflow

Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 / 数据清洗 / 数据统计 / 数据筛选 / 数据可视化 / 数据导出 / 汇总统计 /…

OpenSenseNova/SenseNova-Skills · 348 tokens

sn-da-large-file-analysis

万行以上 Excel 数据集的高性能分析引擎。提供 openpyxl readonly 流式读取(iterrows 支持 10 万行以上)、Parquet 转换加速、内存优化、分块处理和大文件写入模式。遇到以下任一情况就主动使用本 skill:①数据行数 ≥ 10k(由 sn-da-excel-workflow 的行数评估步骤触发);②用户出现触发词:大文件 / 大数据量 / 性能优化 / 内存不足 / OOM / 百万行 / 十万行 / 流式读取 / Parquet / 分块处理 / large file / big data / streaming read / chunked processing;③直接使用…

OpenSenseNova/SenseNova-Skills · 218 tokens

ppt-analysis

PPT (.pptx/.ppt) 全量解析。覆盖:所有 slide 文本/表格/图表提取、嵌入图片 caption、纯图片 slide 渲染识别、数据标签提取。.

OpenSenseNova/SenseNova-Skills · 51 tokens

category-filtering-and-difficulty-analysis

对Excel数据进行自定义分类统计、交叉分析与可视化,并基于多维度指标(如文本长度、术语密度、正则匹配等)进行综合评分与分级,适用于多类别数据分布统计及文本内容难度/质量评估场景。.

OpenSenseNova/SenseNova-Skills · 74 tokens