Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计提醒

learning-loop学习循环

Agent Skill

learning-loop 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

606

周安装

25

GitHub Stars

2

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/richfrem/agent-plugins-skills --skill learning-loop

简介

用于实现 Agent 的自我修正与经验累积机制。

  • 适合在需要长期记忆与适应性行为的复杂任务中部署。
  • 通过 GitHub 仓库安装,兼容多种 AI 代理宿主。
  • 核心在于错误识别、反馈吸收与新策略生成。learning-loop 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 需设计合理的奖励函数或评估指标驱动优化。

SKILL.md

Dependencies

This skill requires Python 3.8+ and standard library only. No external packages needed.

To install this skill's dependencies:

pip-compile ./requirements.in
pip install -r ./requirements.txt

See ./requirements.txt for the dependency lockfile (currently empty — standard library only).


Learning Loop

The Learning Loop is a structured cognitive continuity protocol ensuring that knowledge survives across isolated agent sessions. It is designed to be universally applicable to any agent framework.

CRITICAL: Anti-Simulation Rules

YOU MUST ACTUALLY PERFORM THE STEPS LISTED BELOW. Describing what you "would do", summarizing expected output, or marking a step complete without actually doing the work is a PROTOCOL VIOLATION. Closure is NOT optional. If the user says "end session" or you are wrapping up, you MUST run the full closure sequence. Skipping any step means the next agent starts blind.

The Iron Chain

Prerequisite: You must establish a valid session context upon Wakeup before modifying any code.
Orientation → Synthesis → Strategic Gate → Red Team Audit → [Execution] → Loop Complete (Return to Orchestrator)

Phase I: Orientation (The Scout)

Goal: Establish Identity & Context. Trigger: First action upon environment initialization.
  1. Identity Check: Read any local orientation documents or primers provided by the user's environment.
  2. Context Loading: Retrieve the historical session state (the "Context Snapshot" or equivalent state file) to understand what the previous agent accomplished.
  3. Report Readiness: Output: "Orientation complete. Context loaded. Ready."

STOP: Do NOT proceed to work until you have completed Phase I.


Phase II: Intelligence Synthesis

  1. Mode Selection: Decide if you are doing standard documentation (recording ADRs) or exploratory research.
  2. Synthesis: Perform your research. Aggregate findings into clear, modular markdown files in the project's designated learning/ or memory/ directory.

Phase III: Strategic Gate (HITL)

Human-in-the-Loop Required
  1. Review: Present architectural findings or strategic shifts to the User.
  2. Gate: Wait for explicit "Approved" or "Proceed".

- *If FAIL*: Backtrack to Phase VIII (Self-Correction).

Phase IV: Red Team Audit

  1. Bundle Context: Compile your proposed plans into a single, cohesive research packet.
  2. Action: Submit the packet to the User (or a designated Red Team adversarial sub-agent) for rigorous critique.
  3. Gate: Do not proceed to execution until the Audit returns a "Ready" verdict.

Execution Branch (Post-Audit)

Choose your Execution Mode:

Option A: Standard Agent (Single Loop)

  • Action: You write the code, run tests, and verify yourself.

Option B: Dual Loop

  • Action: Delegate execution to a scoped, isolated Inner Loop agent.
  • Command: Open the triple-loop SKILL. Execute according to its instructions.
  • Return: Once Inner Loop finishes, resume here at Phase V (Synthesis).

Session Close (MANDATORY — DO NOT SKIP ANY STEP)

This loop is now complete. You must formally exit the loop and return control to the Orchestrator. Skipping any close step means the next agent starts blind and the flywheel stalls.

Phase V: Self-Assessment Survey (MANDATORY)

Before handoff, you MUST complete the Post-Run Self-Assessment Survey (references/memory/post_run_survey.md). Answer every question — do not summarize or skip sections.

Survey sections (all mandatory):

Run Metadata: date, task type, task complexity, skill/capability under test

Completion Outcome:

  • Did you complete the full intended workflow end to end? (Yes/No)
  • Did the run require major human rescue? (Yes/No)

Count-Based Signals (Karpathy Parity):

  • How many times did you not know what to do next?
  • How many times did you miss or skip a required step?
  • How many times did you use the wrong CLI syntax?
  • How many times were you redirected by a human?
  • Total Friction Events

Qualitative Friction:

  1. At what point were you most uncertain about what to do next?
  2. Which instruction, rule, or workflow step felt ambiguous or underspecified?
  3. Which command, tool, or template was most confusing in practice?
  4. What was the single biggest source of friction in this run?
  5. Which failure felt avoidable with a better prompt, skill, or rule?
  6. What is the smallest workflow change that would have improved this run the most?

Improvement Recommendation:

  • What one change should be tested before the next run?
  • What evidence from this run supports that change?
  • Target (Skill/Prompt/Script/Rule)?

Save completed survey to: ${CLAUDE_PROJECT_DIR}/context/memory/retrospectives/survey_[YYYYMMDD]_[HHMM]_[AGENT].md

Emit survey completion event:

python3 context/kernel.py emit_event --agent Triple-Loop Retrospective \
  --type learning --action survey_completed \
  --summary "retrospectives/survey_[DATE]_[TIME]_[AGENT].md"

Phase VI: Post-Run Metrics

Run the automated metric collector:

python3 "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/post_run_metrics.py"

This emits a type: metric event capturing: human_interventions, workflow_uncertainty, missed_steps, cli_errors, friction_events_total, hook_errors. These feed the Triple-Loop Retrospective auto-trigger: 3+ friction events of same type = Full Loop improvement before next cycle.

Phase VII: Memory Persistence

Run session-memory-manager to write the dated session log and promote key findings to L3:

  • Write context/memory/YYYY-MM-DD.md including survey outcomes and metric counts
  • Promote architectural decisions and new conventions to context/memory.md with dedup IDs
  • Reference the survey file in the session log for future cycles to read at orientation

Phase VIII: Handoff

  1. Verify Exit Condition: Confirm research/synthesis acceptance criteria met, survey saved, metrics emitted, memory written.
  2. Return Data: Pass synthesized documents and context back up to the Orchestrator.
  3. Terminate Loop: Explicitly state "Learning Loop Complete. Survey saved. Metrics emitted. Passing control to Orchestrator."

Phase Reference

PhaseNameAction Required
IOrientationLoad context, last survey, last session log
IISynthesisCreate/modify research artifacts
IIIStrategic GateObtain "Proceed" from User
IVRed Team AuditCompile packet for adversary review
VSelf-Assessment SurveyAnswer all sections, save to retrospectives/, emit event
VIPost-Run MetricsRun post_run_metrics.py, emit metric event
VIIMemory PersistenceSession log + L3 promotion via session-memory-manager
VIIIHandoffReturn control to Orchestrator

Task Tracking Rules

You are not "done" until the active task tracker says you're done.
  • Always use the user's preferred task tracking system (e.g., markdown kanbans, automated CLIs) to move tasks.
  • NEVER mark a task done without running its verification sequence first.
  • If using a markdown board, always display the updated board to the user to confirm the move registered.

Dual-Loop Integration

When a Learning Loop runs inside a Dual-Loop session:

PhaseDual-Loop RoleNotes
I (Orientation)Outer Loop boots, orientsReads boot files + spec context
II-III (Synthesis/Gate)Outer Loop plans, user approvesStrategy Packet generated
IV (Audit)Outer Loop snapshots before delegationPre-execution checkpoint
*(Execution)*Inner Loop performs tactical workCode-only, isolated
*Verification*Outer Loop inspects Inner Loop outputValidates against criteria
V (Handoff)Outer Loop receives resultsTriggers global retrospective

Key rule: The Inner Loop does NOT run Learning Loop phases. All cognitive continuity is the Outer Loop's responsibility.

Cross-reference: dual-loop SKILL

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude

32.29%
按下载量换算64

Codex

31.69%
按下载量换算63

Cursor

20.51%
按下载量换算41

Gemini CLI

9.23%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills