Token导航 LogoToken导航

Agent Skill · 前端设计

autonomous-loops(自主循环)

autonomous-loops 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

autonomous-loops 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 6,126。

总安装 549周安装 22GitHub Stars 315下载 178核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:autonomous-loops(自主循环)
来源仓库:https://github.com/codewithmukesh/dotnet-claude-kit
仓库路径:skills/autonomous-loops
安装命令:
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill autonomous-loops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill autonomous-loops

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于 GitHub 仓库状态与协作事项管理,支持 Issue 和 PR 信息整理。适用于跟踪代码变更、维护任务或团队协作流程优化。可结合最大迭代次数限制确保问题解决效率。autonomous-loops 属于前端设计类 Skill,可作为该场景下的辅助能力补充。每次循环需体现进展,否则自动退出避免资源浪费。

使用前请确认仓库访问权限及是否触发文件读写操作。

来源仓库内路径:skills/autonomous-loops

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill auton…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

autonomous-loops 怎么安装?

在终端执行 npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill autonomous-loop…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

autonomous-loops 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

autonomous-loops 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

autonomous-loops 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

autonomous-loops 用的人多吗?

公开数据是累计安装 549 次,近一周安装 22 次,下载 178 次,GitHub 315 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

autonomous-loops 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
autonomous-loops

自主循环 · 本页

549315调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Autonomous Loops

Core Principles

  1. Bounded iteration, always — Every loop has a maximum iteration count. Default is 5, hard cap is 10. No loop runs forever. If 5 iterations cannot solve a build error, the problem needs human judgment, not a 6th attempt at the same approach.
  2. Progress tracking or exit — Each iteration must make measurable progress: fewer errors, fewer failing tests, fewer warnings. If an iteration produces the same error count as the previous one, the loop exits with a STUCK status. Retrying without progress is token waste.
  3. Fail-safe guards are non-negotiable — Loops exit on: max iterations reached, no progress detected, critical error encountered, more errors introduced than fixed, or user interruption. These guards exist to prevent the most common failure mode: Claude stubbornly retrying the same broken approach 20 times.
  4. Transparency at every iteration — Report what changed and why after each iteration. The user should be able to follow the loop's reasoning without reading every file. "Iteration 3: fixed CS0246 by adding using System.Text.Json, 2 errors remain" is transparent. Silently modifying files is not.
  5. Atomicity per iteration — Each iteration's changes should leave the codebase in a valid state (or at least no worse than before). Never make partial changes that depend on a future iteration succeeding. If iteration 3 fails, the code should still be in the state that iteration 2 left it in.

Patterns

Build-Fix Loop

The most common loop. Fix compilation errors iteratively until dotnet build succeeds.

BUILD-FIX LOOP:
  max_iterations = 5
  previous_errors = []

  for iteration in 1..max_iterations:
    result = dotnet build [project/solution]

    if result.exit_code == 0:
      report "BUILD PASS after {iteration} iteration(s)"
      return PASS

    errors = parse_errors(result.output)

    if errors == previous_errors:
      report "STUCK — same {len(errors)} error(s) after fix attempt"
      report "Errors: {errors}"
      return STUCK

    if len(errors) > len(previous_errors) and iteration > 1:
      report "REGRESSING — {len(errors)} errors, up from {len(previous_errors)}"
      report "Last fix introduced new errors. Reverting iteration {iteration}."
      revert_last_changes()
      return REGRESSION

    report "Iteration {iteration}: {len(errors)} error(s) found"
    for error in errors:
      category = categorize(error)
      fix = determine_fix(error, category)
      apply(fix)
      report "  Fixed {error.code}: {error.message} → {fix.description}"

    previous_errors = errors

  report "MAX ITERATIONS reached with {len(errors)} error(s) remaining"
  return FAIL

Error Categories and Fix Strategies:

CATEGORY               EXAMPLE CODE    FIX STRATEGY
Missing using          CS0246          Add the correct using directive
Missing reference      CS0246          Add NuGet package or project reference
Type mismatch          CS0029          Check expected type, cast or convert
API change             CS0117          Check new API signature, update call
Nullable warning       CS8600-CS8604   Add null check, use ?. or ?? operator
Ambiguous reference    CS0104          Add full namespace qualifier
Missing member         CS1061          Check spelling, verify type has the member
Obsolete API           CS0618          Replace with recommended alternative
Missing implementation CS0535          Implement missing interface members
Syntax error           CS1002-CS1003   Fix syntax based on error context

Test-Fix Loop

Fix failing tests iteratively. Critically, this loop must determine whether the bug is in the test or in the production code.

TEST-FIX LOOP:
  max_iterations = 5
  previous_failures = []

  for iteration in 1..max_iterations:
    result = dotnet test [project/solution] --no-build

    if result.all_passed:
      report "TESTS PASS after {iteration} iteration(s)"
      return PASS

    failures = parse_failures(result.output)

    if failures == previous_failures:
      report "STUCK — same {len(failures)} failure(s) after fix attempt"
      return STUCK

    report "Iteration {iteration}: {len(failures)} failure(s)"
    for failure in failures:
      # CRITICAL: diagnose before fixing
      diagnosis = diagnose(failure)
      report "  {failure.test_name}: {failure.message}"
      report "  Diagnosis: {diagnosis.root_cause}"
      report "  Fix target: {diagnosis.fix_in}"  # "test" or "production"

      if diagnosis.fix_in == "test":
        fix = fix_test(failure, diagnosis)
      else:
        fix = fix_production_code(failure, diagnosis)

      apply(fix)
      report "  Applied: {fix.description}"

    previous_failures = failures

  report "MAX ITERATIONS with {len(failures)} failure(s) remaining"
  return FAIL

Diagnosis Protocol:

DIAGNOSING A TEST FAILURE:
1. Read the test code — understand the assertion and setup
2. Read the production code — understand the actual behavior
3. Determine root cause:
   a. Test expects wrong value → fix the test
   b. Production code has a bug → fix the production code
   c. Test setup is incomplete → fix the test setup
   d. API contract changed → update test to match new contract
4. NEVER fix a test by weakening the assertion without understanding why
   BAD:  Assert.Equal(expected, actual) → Assert.NotNull(actual)
   GOOD: Assert.Equal(expected, actual) → fix production code to return expected

Refactor Loop

Multi-step refactoring with verification at each step.

REFACTOR LOOP:
  targets = identify_refactoring_targets()  # via MCP tools
  max_iterations = min(len(targets), 10)

  for iteration, target in enumerate(targets, 1):
    if iteration > max_iterations:
      report "MAX TARGETS reached, {len(targets) - iteration} remaining"
      return PARTIAL

    report "Refactoring {iteration}/{len(targets)}: {target.description}"

    # 1. Apply the refactoring
    apply_refactoring(target)

    # 2. Verify it builds
    build_result = build_fix_loop(max_iterations=3)  # nested, smaller budget
    if build_result != PASS:
      report "Build failed after refactoring {target}. Reverting."
      revert_changes()
      return FAIL

    # 3. Verify tests pass
    test_result = test_fix_loop(max_iterations=3)  # nested, smaller budget
    if test_result != PASS:
      report "Tests failed after refactoring {target}. Reverting."
      revert_changes()
      return FAIL

    # 4. Check diagnostics for new warnings
    diagnostics = get_diagnostics()
    if diagnostics.new_warnings > 0:
      report "New warnings introduced. Fixing..."
      fix_warnings(diagnostics.new_warnings)

    report "Refactoring {iteration} complete. Build: PASS, Tests: PASS"

  return PASS

Scaffold Loop

Generate a new feature end-to-end and verify everything compiles and tests pass.

SCAFFOLD LOOP:
  1. GENERATE source files
     → Create feature file (endpoint + handler + validator)
     → Create EF configuration if needed
     → Create DTOs/contracts

  2. BUILD VERIFICATION
     → Run build-fix loop (max 5 iterations)
     → If FAIL: report and stop — generated code has fundamental issues

  3. GENERATE test files
     → Create unit tests for handler logic
     → Create integration tests for endpoint
     → Match project's test conventions (via instinct-system)

  4. TEST VERIFICATION
     → Run test-fix loop (max 5 iterations)
     → If FAIL: report which tests fail and why

  5. QUALITY CHECK
     → Run get_diagnostics — zero new warnings
     → Run detect_antipatterns — zero new anti-patterns
     → Verify naming matches project conventions

  FINAL REPORT:
  "Scaffold complete:
   - Source files: [list with paths]
   - Test files: [list with paths]
   - Build: PASS
   - Tests: [N/N] passing
   - Warnings: 0 new
   - Anti-patterns: 0 new"

Progress Detection

How to measure whether a loop iteration made progress:

PROGRESS METRICS:
  Build-Fix:    error_count[N] < error_count[N-1]
  Test-Fix:     failure_count[N] < failure_count[N-1]
  Refactor:     target_count[N] < target_count[N-1]
  Scaffold:     phase advances (generate → build → test → verify)

STUCK DETECTION:
  Same errors/failures after a fix attempt → STUCK
  Error count oscillates (3 → 2 → 3 → 2) → STUCK (after 2 oscillations)
  Fix introduces errors in previously passing code → REGRESSION

NO-PROGRESS RESPONSE:
  1. Report the stuck state clearly
  2. List the errors/failures that could not be fixed
  3. Suggest what a human should investigate
  4. Do NOT retry the same approach

Emergency Exit Conditions

Conditions that cause immediate loop termination:

EMERGENCY EXITS:
  1. MORE ERRORS THAN BEFORE — an iteration introduced more errors than it fixed
     → Revert the iteration's changes
     → Report: "Fix attempt introduced {N} new errors. Reverted."

  2. CRITICAL ERROR — error indicates a fundamental problem (wrong SDK, missing
     project file, corrupted solution)
     → Stop immediately
     → Report: "Critical error detected: {description}. Human intervention needed."

  3. CASCADING FAILURES — fixing one error causes 3+ new errors repeatedly
     → Stop after 2 cascades
     → Report: "Cascading failure pattern detected. The fix approach is wrong."

  4. TEST INFRASTRUCTURE FAILURE — test runner itself fails (not test assertions)
     → Stop immediately
     → Report: "Test infrastructure error: {description}. Check test setup."

  5. USER INTERRUPTION — user sends any message during the loop
     → Complete current iteration
     → Report progress so far
     → Ask how to proceed

Loop Nesting and Reporting

When loops call other loops (e.g., refactor loop calls build-fix loop):

NESTING RULES:
  - Nested loops get a SMALLER budget (parent max 5 → nested max 3)
  - Maximum nesting depth: 2 (Refactor → Build-Fix → no further)
  - Nested loop failure = parent loop iteration failure (revert the target)
  - Total iteration budget across all nesting: 15

ITERATION REPORT FORMAT:
  [Loop Type] Iteration {N}/{MAX}: {error/failure count}
  → {file}: {what changed and why}
  → Result: {new count} | Status: {CONTINUE/PASS/STUCK/FAIL}

Anti-patterns

Unbounded Loops

# BAD — no iteration limit
"Keep fixing build errors until it compiles"
*Claude tries 47 iterations, burns through context window,
 keeps retrying the same broken approach*

# GOOD — explicit bounds with progress checks
build_fix_loop(max_iterations=5)
*After 5 iterations or zero progress, stops and reports*

Retrying the Same Fix

# BAD — applying the same fix that failed
Iteration 1: Add `using System.Linq;` → CS0246 persists
Iteration 2: Add `using System.Linq;` → CS0246 persists
Iteration 3: Add `using System.Linq;` → CS0246 persists

# GOOD — detect no progress, try a different approach or exit
Iteration 1: Add `using System.Linq;` → CS0246 persists
Iteration 2: STUCK — same error after fix.
  "CS0246 persists after adding System.Linq. The type may be in a
   different namespace or require a NuGet package. Checking..."
  → Search for the type using find_symbol

Fixing by Deletion

# BAD — making code compile by removing functionality
Error: CS0246 'OrderValidator' not found
Fix: Delete all validation code
*Builds successfully! ...but the feature is broken*

# GOOD — fix the root cause
Error: CS0246 'OrderValidator' not found
Fix: Add missing reference to Validation project, or create the missing class
*Builds successfully with all functionality intact*

Silent Loops

# BAD — loop runs silently, user sees nothing for 2 minutes
*...silence...*
"Done! Fixed 7 build errors."
*User has no idea what changed or why*

# GOOD — transparent reporting per iteration
"Iteration 1/5: 4 errors found
  Fixed CS0246 in OrderHandler.cs → added using FluentValidation
  Fixed CS0029 in OrderResponse.cs → changed return type to match
  2 errors remain.
 Iteration 2/5: 2 errors found
  Fixed CS1061 in OrderEndpoint.cs → updated method name to CreateAsync
  Fixed CS8600 in OrderHandler.cs → added null check
  0 errors remain.
 BUILD PASS after 2 iterations."

Over-Aggressive Test Fixing

# BAD — weakening assertions to make tests pass
Assert.Equal(200, response.StatusCode)  // fails with 404
→ Changed to: Assert.NotNull(response)  // passes but hides the bug

# GOOD — diagnose the failure, fix the right code
Assert.Equal(200, response.StatusCode)  // fails with 404
→ Diagnosis: endpoint routing is wrong, missing MapGet registration
→ Fix: add endpoint registration in OrderModule.cs
→ Test passes with correct 200 status

Decision Guide

ScenarioLoop TypeMax IterationsNotes
Build fails after code changesBuild-Fix5Categorize errors, fix systematically
Tests fail after code changesTest-Fix5Diagnose test vs production bug first
Tests fail after build-fix loopTest-Fix3Smaller budget — build-fix may have introduced issues
Multi-file refactoringRefactor10 (or target count)Verify build+tests after each target
Generating a new featureScaffold1 (phases, not iterations)Build-fix and test-fix nested inside
Same error persists after fixExit with STUCKN/AReport error, suggest human investigation
Fix introduces more errorsEmergency exitN/ARevert changes, report regression
Nested loop neededUse smaller budgetParent - 2Max nesting depth: 2
User says "keep going"Extend by 3 iterationsCurrent + 3Never exceed hard cap of 10
User says "stop"Exit immediatelyN/AReport progress, preserve current state
Error is in test infrastructureExit immediatelyN/ATest runner issues need human attention
3+ cascading failuresExit immediatelyN/AThe approach is fundamentally wrong

平台分布

Codex

35.58%
按下载量换算63

Claude

28.82%
按下载量换算51

Cursor

18.88%
按下载量换算34

Gemini CLI

8.63%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills