Logo Loop Forge

Loop Forge

Cộng đồng
sangrokjung
loop-forge

Biến mô tả một dòng về công việc lặp lại thành slash command có thể tái sử dụng và tự bảo vệ. loop-forge phân loại công việc thành 1 trong 5 dạng vòng lặp (Batch / Pipeline / Refine / Watch / Explore), hỏi thêm thông tin còn thiếu và tự động thêm hai cơ chế an toàn mà người dùng chưa biết mình cần — trình xác minh độc lập (người tạo ≠ người kiểm tra) và hardstop (giới hạn ngân sách/số lượng/thời gian chờ) — sau đó xem trước kết quả và đóng dấu thành một `/command` để chạy mãi mãi. Dùng khi người dùng nói "/loop", "/loop-forge", "/make-it-loop", "automate this", "make this repeatable", "turn this into a command", "do this for all 100 items", "do X every time Y happens", "generate several and pick the best", hoặc muốn biến một công việc định kỳ thành slash command có thể tái sử dụng thay vì phải nhập lại prompt. Hoạt động với mọi ngôn ngữ: kỹ năng này sẽ hỏi người dùng và viết lệnh đã đóng dấu bằng ngôn ngữ của họ. Không nhằm mục đích lên lịch chạy tự động khi không có người giám sát (launchd/cron) hoặc tự xuất bản ra bên ngoài; kỹ năng chỉ tạo lệnh có thể tái sử dụng rồi dừng lại.

Add to TypingMind

Tổng quan

Nhà phát hànhsangrokjung
Kho mãclaude-forge
Tên kỹ năngloop-forge
Sao
853
Bản fork
183
Tệp đi kèm
26
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 26 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được sangrokjung công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Loop Forge trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/sangrokjung/claude-forge/tree/main/skills/loop-forge
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sangrokjung/claude-forge.git /tmp/claude-forge
mkdir -p .claude/skills
cp -r /tmp/claude-forge/skills/loop-forge .claude/skills/loop-forge
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Loop Forge trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Loop Forge ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Loop Forge với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

loop-forge — stamp a guarded, reusable loop (/loop-forge)

Picture an engraving shop. A customer who can't engrave walks in and just describes the seal they keep needing — "I want to do this over and over." The artisan ① recognizes which of 5 standard molds (loop shapes) it is, ② asks what letters to cut (the blanks), ③ cuts them into a proven mold, ④ automatically fits a "misprint detector" (the verifier) and an "out-of-ink stop" (the hardstop), ⑤ pulls one test impression to show the customer, and ⑥ once they approve, hands back a reusable /command they can stamp again any time — the same in Claude Code and in any other agent via a paste-able prompt.

What this tool actually does

Someone who doesn't code can't author a reusable /command that makes an AI repeat a task reliably. loop-forge closes that gap. It takes a vague one-liner and stamps it into a reusable slash command, while automatically attaching the two safety devices a non-developer doesn't even know to ask for:

  • Verifier (maker ≠ checker) — the loop's output is re-checked in a pass that is separate from the pass that produced it, so the loop can't grade its own homework.
  • Hardstop — a budget/count/cooldown ceiling, so a loop can't quietly break while burning tokens.

That auto-injection is the decisive difference from a plain prompt generator or a developer-facing skill builder.

Before → after (the elevator demo):

User: "I want to summarize 100 shop reviews into 3 lines each"
        │
loop-forge:
  1. Diagnoses → Batch loop
  2. Interviews → where are the items? per-item task? where does output land? a cap?
  3. Auto-injects → verifier (count in == count out + independent spot re-check)
                  + hardstop (max_items budget + per-item fail cap + abort at 20% failure)
  4. Previews → "here's how it will run" (+ optional 1-item sample)
  5. Stamps → /review-summary  (reusable forever; safety baked in)

When it triggers

  • /loop or /loop "<one-line situation>" (full command /loop-forge; alias /make-it-loop)
  • "automate this" / "make this repeatable" / "turn this into a command"
  • "summarize all 100 reviews" / "do this for every item"
  • "do X every time an email arrives" / "alert me when a condition is met"
  • "generate a few options and pick the best one"
  • any time you'd rather capture a recurring task as a reusable /command than re-type the prompt by hand

Triggers are matched on intent, in any language — the same phrasing in Korean, Spanish, Japanese, etc. activates the skill, and the whole interaction then runs in that language (see "Runs in your language" below).

Runs in your language (English asset, multilingual behavior)

Every file in this skill is English — there is no per-language copy. At runtime the orchestrator detects the user's language from their one-liner and conducts the entire interaction in it: the analogy, every interview question, the missing-slot re-asks, the default-value confirmations, and the dry-run preview. The stamped /command's human-readable prose (description, procedure, verifier/hardstop explanations) is written in the user's language, while the structural tokens (frontmatter keys, the archetype id, registry field names, and the ASCII slug name) stay canonical so any teammate's harness can still parse it. This is LLM-driven — there is no translation table.

The 5 loop shapes (everything this tool stamps)

Non-developer work reduces to five shapes. There is no sixth — never invent one (YAGNI). If a request doesn't fit, diagnose the nearest shape or ask one branch question.

ShapeOne lineCatalog
BatchSame task across N items, none skippedreferences/archetypes/batch.md
PipelinePass through ordered stages A→B→Creferences/archetypes/pipeline.md
RefineMake → evaluate → fix, repeatedreferences/archetypes/refine.md
Watch ⚠ most dangerousWatch a target, act when a condition firesreferences/archetypes/watch.md
ExploreDiverge into N candidates → converge to best Kreferences/archetypes/explore.md

6-stage orchestration (the main flow)

Follow the flow exactly; each stage calls a specific asset (lazy-loaded).

Helper-script paths (install-portable): the tools/ and references/ paths below are relative to this skill's own directory. If a relative call can't find a file, resolve it under the skill root — $HOME/.claude/skills/loop-forge/… for install.sh installs, or ${CLAUDE_PLUGIN_ROOT}/skills/loop-forge/… for marketplace (/plugin install) installs. Every helper is optional: if it's still unavailable (or python3 is missing), perform the step yourself from the referenced doc — classify_signals.py is only a hint and check_safety.py only re-checks what Stage 4 already injected, so the flow degrades gracefully without them.

Stage 1 — Entry

  • Receive the one-line situation via $ARGUMENTS.
  • If it's empty, ask first (in the user's language): "What task do you keep doing by hand? Describe it in one line." (e.g. "I want to summarize 100 shop reviews into 3 lines each.")

Stage 2 — Diagnose the shape

  • First-pass hint: run tools/classify_signals.py "<situation>" to get ranked (per-shape signal scores) and ambiguous (a tie flag). This is only a hint — the LLM makes the final call using the semantic signal table in references/classifier.md. The scorer ships an English keyword set; for non-English input it returns no signal, and the LLM classifies from meaning (language-agnostic), so classification never depends on surface keywords.
  • If one candidate is clear, name it in plain language ("This is a Batch loop").
  • If ambiguous (a top-2 tie) or a known conflict pair, fire the branch question from classifier.md — e.g. "All 100 at once? → Batch. Or each time a new one arrives? → Watch."

Stage 3 — Interview for the blanks

  • Pull the confirmed shape's slot questions from references/interviewer.md (each shape has its own set) and ask them with AskUserQuestion, in plain language.
  • Apply the missing-slot re-ask rule: if the output location (output_format/final_artifact), the hardstop inputs (max_items/max_iterations/period_limit), or the eval criteria are left as "you decide," re-ask; if still blank, offer conservative defaults explicitly (Batch max 50 · Refine 4 iterations · Watch 20 actions/day, 5-min cooldown).
  • For a Watch loop whose triggered action is external (sending/posting), ask "Preview before sending, or approve each one yourself?" to set external_action=true and the gate.
  • Two common questions: scope ("Just this project, or usable anywhere?" → project|global) and name (propose a slug, then confirm; a non-Latin answer is transliterated to an ASCII slug and confirmed).

Stage 4 — Assemble (+ auto-inject safety + static check)

  • Use references/assembler.md to substitute the slot values into the shape's skeleton (the {slot} placeholders), producing a neutral loop spec JSON (references/loop-spec-schema.md, 9 fields: name / archetype / label / situation / scope / slots / skeleton / external_action / registry).
  • Auto-inject safety: copy the "default verifier" and "default hardstop" text from the chosen archetypes/<shape>.md into registry.verifier / registry.hardstop, and fill registry.trigger / gate / accepted_signal from the shape's mapping. For Watch (or any external_action == true), set the language-independent registry.external_gate to dry_run or human_approval (never none), matching the Stage-3 answer.
  • Static gate: run tools/check_safety.py <spec.json>. Exit 2 (missing verifier or hardstop, or a Watch/external loop without an external_gate) → bounce back to Stage 3 to fill the gap. Only exit 0 proceeds. This gate is non-bypassable.

The loop-registry's 5 cells — trigger / gate / verifier / hardstop / accepted_signal — are first-class under registry, so every stamped loop is born registry-shaped. The added external_gate enum is what makes the Watch safety check pass in any language (it gates on the enum, not on prose markers).

Stage 5 — Dry-run preview (the approval gate)

  • Follow assembler.md's per-shape dry-run depth: default = a text description ("here's how it will run": skeleton + slots + a summary of the injected safety); Batch/Explore may optionally run a 1-item sample (state the cost); Watch = description only — running a real poll could fire a real send, so never sample it; Pipeline/Refine = description plus, optionally, the first stage or one iteration.
  • Show the preview and get explicit approval. No approval, no stamping.

Stage 6 — Stamp (equivalent outputs)

  • Primary — Claude Code: render with references/renderers/claude-code.md, then save by scope to <cwd>/.claude/commands/<name>.md (project) or ~/.claude/commands/<name>.md (global). Invoke with /<name> + $ARGUMENTS.
  • Optional — Portable Prompt: render with references/renderers/portable-prompt.md into a harness-agnostic, paste-able prompt block (works in any agent — paste the body into the session). This is an opt-in bonus, not required.
  • Equivalence contract: the skeleton, verifier, hardstop, and accepted-signal text are byte-identical across both outputs; the only allowed difference is the invocation/variable syntax.
  • Finish by telling the user how to run it (Claude Code: /<name> <input>; Portable Prompt: paste the block into your agent).

Never do this (CRITICAL)

  • ❌ Never stamp without the Stage-5 approval. Creating the command file is an irreversible artifact — a person sees the preview and says yes first.
  • ❌ Never stamp a spec missing a verifier or hardstop. If check_safety.py exits 2, bounce to the interview; never bypass it. Auto-injecting the two safety devices a non-developer doesn't know to ask for is this tool's whole reason to exist.
  • ❌ Never stamp a Watch/external action without a dry-run or human-approval gate. A monitor whose action is outbound (sending, posting, hitting a webhook) must carry "preview or human-approve first" — registry.external_gate ∈ {dry_run, human_approval}. It's the most dangerous shape, and the principle is "outbound action = independent gate" (the way email is drafted, then a human sends).
  • ❌ Never invent a sixth shape. Reduce everything to Batch / Pipeline / Refine / Watch / Explore (YAGNI). If it doesn't fit, diagnose the nearest shape or ask one branch question.
  • ❌ Don't reimplement skill-creator / writing-skills. Those are developer-facing authoring engines. loop-forge is the non-developer layer on top: a plain-language interview + shape diagnosis + safety injection.

Dependent references (lazy load — call per stage)

AssetPurposeStage
references/loop-spec-schema.mdThe 9-field loop spec + the 5 registry cells (+ external_gate)4
tools/loop_spec.schema.jsonMachine-validation schema (jsonschema) for the spec4
references/classifier.mdSemantic signal table + branch-question rules2
tools/classify_signals.pyLightweight first-pass signal scorer (CLI hint)2
tools/corpus.jsonlClassifier regression corpus (50+ cases)(tests)
references/interviewer.mdPer-shape slot questions + missing-slot re-asks + defaults3
references/archetypes/batch.mdBatch shape (the 6-section structure template)2·3·4
references/archetypes/pipeline.mdPipeline shape2·3·4
references/archetypes/refine.mdRefine shape2·3·4
references/archetypes/watch.mdWatch shape (external-action gate)2·3·4
references/archetypes/explore.mdExplore shape2·3·4
references/assembler.mdAssembly, safety auto-injection, dry-run depth4·5
tools/check_safety.pyStatic safety check (exit 2 on a missing guard)4
references/renderers/claude-code.mdClaude Code slash-command render rules6
references/renderers/portable-prompt.mdPortable paste-able prompt render rules6
tools/examples/batch/{spec.json, claude-command.md, portable-prompt.md}Golden outputs (render ground truth)6

Disabling

Uninstall or disable the plugin through Claude Code's plugin manager (/plugin), or remove skills/loop-forge from ~/.claude/skills/ and commands/loop-forge.md from ~/.claude/commands/ for a manual install.

Related

  • docs/DESIGN.md — the architecture and decision record for this plugin.
  • The loop-registry frame (trigger / gate / verifier / hardstop / accepted) — every stamped loop is born matching it, so it's diagnosable at a glance.
  • skill-creator / writing-skills — developer-facing authoring engines that loop-forge layers on top of (it is the non-developer layer, not a reinvention).

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Loop Forge làm được gì?

Biến mô tả một dòng về công việc lặp lại thành slash command có thể tái sử dụng và tự bảo vệ. loop-forge phân loại công việc thành 1 trong 5 dạng vòng lặp (Batch / Pipeline / Refine / Watch / Explore), hỏi thêm thông tin còn thiếu và tự động thêm hai cơ chế an toàn mà người dùng chưa biết mình cần — trình xác minh độc lập (người tạo ≠ người kiểm tra) và hardstop (giới hạn ngân sách/số lượng/thời gian chờ) — sau đó xem trước kết quả và đóng dấu thành một `/command` để chạy mãi mãi. Dùng khi người dùng nói "/loop", "/loop-forge", "/make-it-loop", "automate this", "make this repeatable", "turn...

Vì sao nên dùng Loop Forge trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Loop Forge là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Loop Forge trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/sangrokjung/claude-forge/tree/main/skills/loop-forge. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Loop Forge?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Loop Forge với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Loop Forge với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Loop Forge có miễn phí không?

Có. Kỹ năng này được sangrokjung phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇