prompt-to-loop-engineering

A planning tool that turns a natural-language request into a structured workflow for an AI coding agent. It checks that the workflow is valid before it can be run.

In plain words
What is it for?
Use it to design one-shot plans, repeatable workflows, or agent loops from plain-language requests.
Why use it?
It helps prevent vague instructions from becoming incomplete or unsafe agent workflows. It separates planning and validation from actually carrying out the task.

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/beichen-h/loopower/prompt-to-loop-engineering
Any agent
npx skills add Beichen-H/Loopower --skill prompt-to-loop-engineering
Clone the repo
git clone --depth 1 https://github.com/Beichen-H/Loopower

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,989 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.00040 $0.09989
Opus 5 $0.00020 $0.04994
Sonnet 5 $0.00008 $0.01998
Haiku 4.5 $0.00004 $0.00999

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

Security

Grade A, and why

prompt-to-loop-engineering 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 15 executable files (scripts/governance_contracts.py, scripts/normalize_design_request.py, scripts/test_dag_execution_evidence.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.

skills/prompt-to-loop-engineering/SKILL.md · 658 lines

How it starts

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

Prompt to Loop Engineering

Skill version: 3.1.0 Normative contract: Loop Engineering KB v4.0.2 Self-design graph: loop_spec.json

Mandatory execution protocol

For every invocation, the agent:

  1. MUST read loop_spec.json before designing the result.
  2. MUST preserve the raw request and run scripts/normalize_design_request.py to materialize a separate effective Loop_design_request. Missing capability booleans are false; missing tools are unavailable.
  3. MUST use the effective request—not the raw request—to generate exactly one loop_design_result and save it as JSON.
  4. MUST run scripts/validate_design_result.py with the result, raw request, effective request, and normalization report before returning the result.
  5. MUST NOT emit spec_ready when validation fails. Correct and revalidate the design, or return a non-executable disposition with the validation errors preserved.
  6. MUST NOT execute the user task, invoke a generated node or tool, advance a generated edge, or report runtime success during design validation.
  7. MUST NOT create or require an independent Runtime Engine. Codex is the host executor when the user explicitly asks to use or continue a generated scaffold.

Example validation command:

python scripts/validate_design_result.py path/to/loop_design_result.json \
  --request path/to/effective_request.json \
  --raw-request path/to/raw_request.json \
  --normalization-report path/to/request_normalization_report.json

Example normalization command:

python scripts/normalize_design_request.py path/to/raw_request.json \
  --output path/to/effective_request.json \
  --report path/to/request_normalization_report.json

This Skill contains no Runtime Engine and must never scaffold one. Runtime capabilities are constraints supplied by the caller so generated LoopSpec and Agent Config Scaffold files match the real Codex session and project permissions.

v2.0.0 — Release-Hardened Contract Alignment

Read the full file on GitHub · 658 lines

Files

What ships with it

60 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 · 658 lines · 40 tokens per session scan A 3bae212af418

Subscribe to this mod's changes

prompt-to-loop-engineering is a skill published in the GitHub repository Beichen-H/Loopower (2 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 9,989 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

html-report-stable-base

Use when supplied content or an existing HTML report needs a stable editable browser shell in either long-screen single-page mode or 16:9 PPT mode, including global and per-element styling, ECharts canvas support, standalone HTML delivery, or optional PPTX export in PPT mode.

Lucas-Fong/html-report-stable-base · 61 tokens

generate-word-clouds

Generate one or multiple weighted keyword word-cloud PNG images with confirmed brand colors, Top N selection, transparent or colored backgrounds, compact margins, horizontal text, and selectable shapes. Use when the user asks to create 词云、关键词云、品牌词云 or batch word clouds from Excel, CSV, JSON, tables, or pasted keyword…

Lucas-Fong/html-report-stable-base · 83 tokens

echarts-charts

Create interactive Apache ECharts charts and dashboard-ready HTML from Excel, CSV, JSON, tables, or pasted data. Use when Codex needs to make charts, visualizations, dashboards, ECharts options, interactive HTML charts, or convert analysis results into bar, line, pie, scatter, heatmap, radar, funnel, map, or…

Lucas-Fong/html-report-stable-base · 76 tokens

arkgum-research-to-page

Autonomously orchestrate a source-grounded topic-to-page workflow through Google NotebookLM: create or reuse a notebook, run Deep Research, import and verify sources, produce a cited research report, rank audience/content opportunities, create a page brief, and return a final prompt for Google AI Studio or another…

arkgum/arkgum-agent-skills · 139 tokens

mass

Multi-Agent Semantic Simulator. Use when the deliverable must run, not just describe: interactive simulations of complex systems (particle, ecological, economic, social, network propagation, cellular automata, game theory, orbital mechanics), dynamic visualizations, self-contained executable artifacts, and interactive…

Lexideck-Technologies/Lexideck2026 · 109 tokens

hypershot-protocol

Meta-prompting technique using zero-contamination structural examples. A hypershot is a frame with free variables; the variables range across a continuum from unbounded spread operators (...) to fully-loaded instruction-bearing variables ({ConciseActionOrientedReplyWithNoFluff}). Use this skill whenever you are about…

Lexideck-Technologies/Lexideck2026 · 152 tokens