Learn Agent

REVIEW · 66
Community indexed

学习Agent开发的笔记

Downloads0
Stars84
Version1.0.0
Quality76/100 · Strong
Trust66/100 · Sandbox only
Audit81/100 · Needs review

Supply asset profile

Coding and developer agents

Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.

Browse track

Scenario

Coding agents

I need a coding agent that can understand a repository, edit code, and review pull requests.

Agent fit

Claude Code + OpenAI Agents + CLI

Codex, Claude Code, Cursor, CLI, or custom agents.

Install

Ready

npx skills add 7-e1even/learn-agent

Maintenance

fresh

1d since push

Risk

Needs review

Permission surface may require sandboxing

GitHub quality

84

76/100 quality · 74/100 trust

Coverage tags

CodingCoding agentsdevelopmentagentagent-loop

Review notes

Permission surface may require sandboxing · Quality score needs review

Agent adoption scorecard

Trust, audit, and install readiness at a glance

These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.

Quality

Strong
76

Solid option that is likely worth shortlisting for production workflows.

Trust

Sandbox only
66

Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.

Audit

Needs review
81

Install readiness, security metadata, maintenance, and adoption risk.

Trust Score v5

Human review before install

Run only in a sandbox and compare close alternatives before using it for real work.

JavaScriptCodexClaude CodeCursorOpenAgentSkill CLI

Stars

84 GitHub stars

Repo activity

84 stars, 7 forks

Maintenance

1d since push

License

MIT

Install

npx skills add 7-e1even/learn-agent

Install safety

standard package or runtime install path

Permission surface

secrets or environment access, network or browser access

Agent outcomes

No agent outcome data yet

Docs

Strong README/SKILL.md context

Risk summary

Review before production

  • Quality score needs review
  • Permission surface needs review: secrets or environment access, network or browser access
  • GitHub adoption: 84 GitHub stars
  • Stars/forks activity: 84 stars, 7 forks; issue activity unavailable in current metadata

Install readiness

Install path available

  • Install path is available
  • Repository evidence is available
  • License is declared
  • No Agent Proven outcome evidence yet

Agent-readable metadata

Machine-readable decision data for this skill.

Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.

Open JSON

Suited tasks

  • Coding agents workflows
  • Claude Code teams
  • builders willing to evaluate younger projects
  • Inspect source files

Suited agents

JavaScriptCodexClaude CodeCursorOpenAgentSkill CLIOpenAI AgentsCLI

Install decision

Command
npx skills add 7-e1even/learn-agent
Policy
review
Human review
yes

Trust and risk

Trust
66/100
Audit
81/100
Risk level
Needs review

Outcome loop

Endpoint
/api/agent/outcome
Event ID
resolve
Outcomes
5

Install command

npx skills add 7-e1even/learn-agent

Do not use when

  • teams that need a vendor-supported SLA
  • high-compliance environments without internal security review
  • No major risk signals from current metadata
  • High-risk permission hints: Secrets or environment access
  • Permission surface may require sandboxing

Agent safety v2

53/100 · Avoid automatic install

Experimentalreview

Sparse or mixed signals. Useful for discovery, but not for autonomous installation.

Test manually in an isolated workspace and compare against safer alternatives.

Resolve via API

medium

Network access

Skill likely fetches remote pages, APIs, repositories, or external services.

medium

Filesystem access

Skill may read or write project files, documents, generated artifacts, or local workspace state.

high

Secrets or environment access

Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.

  • High-risk permission hints: Secrets or environment access
  • Permission surface may require sandboxing

Install targets

Install this skill in your agent workflow

Copy the registry command or an agent-specific install prompt for Codex, Claude Code, and Cursor.

skill install

OpenAgentSkill CLI

Use the registry command when your workflow supports the OpenAgentSkill installer.

$ npx skills add 7-e1even/learn-agent

Agent resolve plan

Let an agent verify fit before installing.

The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.

Open text plan

Agent should check

  • Task fit and alternatives from Resolve API.
  • Audit score, trust score, and safety policy warnings.
  • Install target compatibility for Codex, Claude Code, Cursor, or CLI.

Copy prompt

Task: Use Learn Agent in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20Learn%20Agent%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/7-e1even-learn-agent/install
Install command: npx skills add 7-e1even/learn-agent
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.

Agent handoff

Give an agent the install path, not another directory page.

Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.

Open install API

Agent prompt

Use Learn Agent for this task. Review https://www.openagentskill.com/api/skills/7-e1even-learn-agent/install, then install with: npx skills add 7-e1even/learn-agent

Registry metadata

Agent-readable profile for automatic skill selection.

This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.

Open manifest

Agent fit

75/100

Coding agents

Platforms

JavaScript, Claude Code, OpenAI Agents

Audit report

Needs review · 81/100

Review install readiness, maintenance, trust, quality, and metadata warnings before adding this skill to an agent workflow.

View audit reportView eval report

Agent decision cockpit

Companion skill for Coding agents

Shortlist this skill and compare it with close alternatives before production adoption.

75
Readiness
Shortlist
Stage

Role in stack

Companion skill

Primary fit

Coding agents

Trust label

Strong shortlist

Install path

Command ready

Use when

  • Coding agents workflows
  • Claude Code teams
  • builders willing to evaluate younger projects

Evidence

  • recent repository activity
  • install command or GitHub repo available
  • 76/100 quality profile
  • 1 OpenAgentSkill engagement events

Review first

  • No major risk signals from current metadata

Implementation path

  1. 1Install it in a sandbox agent and run one Coding agents task end to end.
  2. 2Compare output quality, latency, and failure behavior against at least one alternative.
  3. 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.

Trust profile

Sandbox only

Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.

66
Trust score

GitHub adoption

CHECK

84 GitHub stars

Stars/forks activity

CHECK

84 stars, 7 forks; issue activity unavailable in current metadata

Recent maintenance

PASS

1d since push

License clarity

PASS

MIT

Good signals

  • AI review approved
  • Install path is available
  • Repository evidence is available
  • Recently maintained repository
  • Install command has no obvious high-risk pattern
  • Outcome loop is ready but needs first real agent run

Review before install

  • Quality score needs review
  • Permission surface needs review: secrets or environment access, network or browser access
  • GitHub adoption: 84 GitHub stars
  • Stars/forks activity: 84 stars, 7 forks; issue activity unavailable in current metadata
  • Permission surface: secrets or environment access, network or browser access
  • No real agent outcome reports yet
  • Human review required before unattended installation

Recommended action

Run only in a sandbox and compare close alternatives before using it for real work.

Quality profile

Strong candidate for agent workflows

Solid option that is likely worth shortlisting for production workflows.

76
GitHub stars
84
Freshness
1d ago
Install ready
Yes
License
MIT

Workflow fit

Use this skill in these scenarios

Stack fit

Add it to a complete workflow

Alternative shortlist

Compare before you install

Similar skills in this category, ranked with the same readiness and quality signals.

Compare all

Overview

# learn-agent · AI Agent 开发进阶笔记

**简体中文** · [English](./README_EN.md)

这是我开发桌面 agent [Reina](https://github.com/Reina-Agent/Reina) 过程中整理的一系列进阶笔记,讲解 coding agent(Claude Code、Codex、opencode 这类工具)的内部实现机制。每篇笔记讲一个机制,配一份零依赖、单文件、可以直接运行的 Node 程序。

笔记把 Reina 的核心机制抽出来,简化成单文件代码,按由浅入深的顺序整理成文。因此这里的机制不是照 API 文档推想的,而是实际产品中验证过的做法。

Agent 的核心只有一个循环:模型说要用什么工具,代码执行并把结果喂回去,直到模型不再要工具:

```js while (true) { const msg = await chat(messages); // 调一次模型 messages.push(msg); if (!msg.tool_calls?.length) break; // 模型不再要工具,这一轮结束

for (const call of msg.tool_calls) { // 模型要用工具:执行,把结果喂回去 messages.push({ role: "tool", tool_call_id: call.id, content: runTool(call) }); } } ```

这十几行就是 s01 的全部核心(完整可运行版约 120 行)。笔记的其余部分讲的是:这个循环放进真实任务后会出什么问题,以及每个问题怎么解决。

![所有机制最终都建立在同一个循环上](./assets/s12-mechanism-map.svg)

## 适合

- 写过 agent demo,但在真实任务上遇到问题:循环空转、上下文超限、任务跑偏; - 日常使用 Claude Code,想知道压缩、缓存、子代理、权限审批这些机制内部怎么实现; - 需要在工作中落地 agent,想要一份经过实际验证的机制清单。

Agent 的基本循环很简单,但从"能跑"到"能用"之间有一整层工程问题:成本控制、上下文管理、缓存、持久化、并发、权限。这套笔记每篇解决其中一个。

## 运行方式

代码零依赖,Node 18 以上直接运行,支持任何 OpenAI 兼容的 API key(DeepSeek / Kimi / GLM / OpenRouter / 本地 Ollama):

```sh git clone https://github.com/7-e1even/learn-agent && cd learn-agent AGENT_API_KEY=sk-xxx node s01_agent_loop/agent.mjs ```

没有 key 的话,[s12](./s12_full_agent/) 提供不需要 key 的自测模式,可以端到端跑通核心机制。

建议从 s01 开始按顺序阅读,边读 README 边运行对应代码。

## 目录

主循环在第 1 篇写完,之后基本不再改动,所有机制都围绕它扩展。s01–s12 逐步搭出一个完整可用的 agent;s13 之后补充真实 coding agent 需要处理的边界问题:权限、Provider 兼容、工具披露、多模型协作、自我复盘。每篇结构一致:问题 → 解决方案 → 运行 → 实现 → 练习 → 真实产品对照。

| # | 主题 | 要解决的问题 | |---|---|---| | [s01](./s01_agent_loop/) | Agent 主循环 | 最小可用的 agent 长什么样 | | [s02](./s02_tool_system/) | 工具系统 | 工具越加越多,怎么不用每次都改循环 | | [s03](./s03_loop_budget/) | 循环预算与纠偏 | 模型原地打转、反复报错,怎么发现并拉回来 | | [s04](./s04_output_budget/) | 工具输出预算与溢出 | 一条 `cat` 的输出就能撑爆上下文,怎么办 | | [s05](./s05_streaming_interrupt/) | 流式输出与中断 | 用户按下 Ctrl+C,断在一半的消息记录怎么修 | | [s06](./s06_compaction/) | 上下文压缩 | 上下文满了要压缩,怎么不忘掉最初的任务 | | [s07](./s07_prompt_cache/) | Prompt 缓存 | 同样的对话,为什么有人的账单

Platform Compatibility

javascriptFULL

Technical Details

Version
1.0.0
License
MIT
Last Updated
7/7/2026
Published
7/6/2026

Frameworks & Tools

JavaScript

Decision snapshot

Companion skill

75
Ready
Shortlist
Stage

recent repository activity

Audit snapshot

Install review

Install and adoption review

81
Needs review
Security
81/100
Maintenance
100/100
Install
92/100
Open full auditOpen eval report

Agent-proven evidence

Agent Proven evidence

Outcome reports after resolve, review, install, and one narrow run.

0
Proven
Needs first agent runAuto-install: review firstLast: Unknown
Success rate
Recent failure
Outcomes
0
Output quality
Failed
0
Not relevant
0
Installs
0
Risk blocked
0
Setup needed
0
Production
0

No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.

Install

Add to agent workflow

Free and open source. Review the audit before production use.

Growth loop

Share kit

X

Scenario-led draft for Learn Agent, ready for a manual X post.

Curator note
Most coding agents don't fail from lack of model power. They fail when repo context disappears.

Learn Agent gives coding agents a repeatable way to plan, patch, review, or ship.

84 stars

https://www.openagentskill.com/skills/7-e1even-learn-agent?ref=x
#AIAgents
Open X draft
Optional reply with install command
Listing + install path for Learn Agent:
https://www.openagentskill.com/skills/7-e1even-learn-agent?ref=x

Install: npx skills add 7-e1even/learn-agent

Listing source

Community indexed

Claimable

This listing was indexed from public sources and is not marked official until a maintainer claim is approved.

Creator
7-e1even
Indexed by
OpenAgentSkill community index

Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.

Claim this skill

Owner claim

Claim this skill listing

This community indexed listing is attributed to 7-e1even but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.

README badge

Add this badge to your GitHub README to show the listing, trust score, and install handoff.

[![OpenAgentSkill](https://www.openagentskill.com/api/badge/7-e1even-learn-agent)](https://www.openagentskill.com/skills/7-e1even-learn-agent)

Author

7

7-e1even

@7-e1even

Health Signals

GitHub stars
84
Quality score
47/100
Last GitHub push
Jul 6, 2026
Framework hints
1
OpenAgentSkill views
1
Install copies
0
Outbound clicks
0

Community Signal

Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.

Trust & Safety

Sandbox only

66
  • GitHub adoption84 GitHub starsCHECK
  • Stars/forks activity84 stars, 7 forks; issue activity unavailable in current metadataCHECK
  • Recent maintenance1d since pushPASS
  • License clarityMITPASS
  • README/SKILL.md completenessMetadata includes enough usage and workflow contextPASS
  • Dependency/runtime riskcredential or environment access, network or browser surfaceINFO