Token导航 LogoToken导航

Agent Skill · 研究检索

learn(学习)

learn 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

learn 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 30,272。

总安装 2,910周安装 125GitHub Stars 321下载 1,020核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/boshu2/agentops --skill learn

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

learn 用于手动捕获知识点,加速知识飞轮积累过程。适合在 Codex、Claude、Cursor、Gemini CLI 中记录临时洞察或经验。支持 --global 参数写入全局知识库,--promote 标记已推广内容。输出文件带 promoted_to: 元数据,便于后续清理重复条目。

learn 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/learn

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

learn 怎么安装?

在终端执行 npx skills add https://github.com/boshu2/agentops --skill learn。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

learn 支持哪些 AI 工具?

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

learn 需要什么权限?

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

learn 是免费的吗?

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

learn 用的人多吗?

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

learn 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

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

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

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

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
learn

学习 · 本页

2,910321只读未明确通过

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

SKILL.md 原文

Learn Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Capture knowledge manually for future sessions. Fast path to feed the knowledge flywheel without running a full retrospective.

Flags

FlagDefaultDescription
--globaloffWrite to ~/.agents/learnings/ instead of .agents/knowledge/pending/. Use for knowledge that applies across all projects.
--promoteoffPromote a local learning to global. Reads local file, abstracts repo context, writes to ~/.agents/learnings/, marks local with promoted_to:.
When to use --global: Use for knowledge that applies across all your projects (e.g., language patterns, tooling preferences, debugging techniques). Use default (no flag) for repo-specific knowledge (e.g., architecture decisions, local conventions). When to use --promote: Use when an existing local learning turns out to be transferable. The skill reads the local file, rewrites it to remove repo-specific references, writes the abstracted version to ~/.agents/learnings/, and marks the local copy with promoted_to: frontmatter so ao inject skips it.

Execution Steps

Given /learn [content]:

Step 1: Get the Learning Content

If content provided as argument: Use it directly.

If no argument: Ask the user via AskUserQuestion: "What did you learn or want to remember?" Then collect the content in free text.

Step 2: Classify the Knowledge Type

Use AskUserQuestion to ask which type:

Tool: AskUserQuestion
Parameters:
  questions:
    - question: "What type of knowledge is this?"
      header: "Type"
      multiSelect: false
      options:
        - label: "decision"
          description: "A choice that was made and why"
        - label: "pattern"
          description: "A reusable approach or technique"
        - label: "learning"
          description: "Something new discovered (default)"
        - label: "constraint"
          description: "A rule or limitation to remember"
        - label: "gotcha"
          description: "A pitfall or trap to avoid"

Default to "learning" if user doesn't choose.

Step 3: Generate Slug

Create a slug from the content:

  • Take the first meaningful words (skip common words like "use", "the", "a")
  • Lowercase
  • Replace spaces with hyphens
  • Max 50 characters
  • Remove special characters except hyphens

Check for collisions:

# If file exists, append -2, -3, etc.
slug="<generated-slug>"
counter=2
if [[ "$GLOBAL" == "true" ]]; then
  base_dir="$HOME/.agents/learnings"
else
  base_dir=".agents/knowledge/pending"
fi
while [ -f "${base_dir}/$(date +%Y-%m-%d)-${slug}.md" ]; do
  slug="<generated-slug>-${counter}"
  ((counter++))
done

Step 4: Create Knowledge Directory

# If --global: write to global patterns (cross-repo)
# Otherwise: write to local knowledge (repo-specific)
if [[ "$GLOBAL" == "true" ]]; then
  mkdir -p ~/.agents/learnings
else
  mkdir -p .agents/knowledge/pending
fi

Step 5: Write Knowledge File

Path:

  • Default: .agents/knowledge/pending/YYYY-MM-DD-<slug>.md
  • With --global: ~/.agents/learnings/YYYY-MM-DD-<slug>.md

Format:

---
type: <classification>
source: manual
date: YYYY-MM-DD
---

# Learning: <short title>

**ID**: L1
**Category**: <classification>
**Confidence**: medium

## What We Learned

<content>

## Source

Manual capture via /learn

Example:

---
type: pattern
source: manual
date: 2026-02-16
---

# Learning: Token Bucket Rate Limiting
**ID**: L1
**Category**: pattern
**Confidence**: high

## What We Learned

Use token bucket pattern for rate limiting instead of fixed windows. Allows burst traffic while maintaining average rate limit. Implementation: bucket refills at constant rate, requests consume tokens, reject when empty.

Key advantage: smoother user experience during brief bursts.

## Source

Manual capture via /learn

Step 5.5: Abstraction Lint Check (global writes only)

If --global or --promote: After writing the file, grep for repo-specific indicators:

file="<path-to-written-file>"
leaks=""
leaks+=$(grep -iEn '(internal/|cmd/|\.go:|/pkg/|/src/|AGENTS\.md|CLAUDE\.md)' "$file" 2>/dev/null)
leaks+=$(grep -En '[A-Z][a-z]+[A-Z][a-z]+\.(go|py|ts|rs)' "$file" 2>/dev/null)
leaks+=$(grep -En '\./[a-z]+/' "$file" 2>/dev/null)

If any matches found: WARN the user by showing the matched lines and asking whether to proceed or revise. This does NOT block — it catches obvious repo-specific references like athena/internal/validate/audit.go:32.

If no matches: proceed silently.

Step 5.6: Promote Flow (--promote only)

Given /learn --promote <path-to-local-learning>:

  1. Read the local learning file
  2. Rewrite content to remove repo-specific references (file paths, function names, package names, internal architecture). Preserve the core insight.
  3. Generate slug from the abstracted content
  4. Write abstracted version to ~/.agents/learnings/YYYY-MM-DD-<slug>.md
  5. Run abstraction lint check (Step 5.5)
  6. Add promoted_to: frontmatter to the local file: --- promoted_to: ~/.agents/learnings/YYYY-MM-DD-<slug>.md --- ao inject skips learnings with promoted_to: set, preventing double-counting.
  7. Confirm: "Promoted to global: ~/.agents/learnings/YYYY-MM-DD-<slug>.md"

Step 6: Integrate with ao CLI (if available)

Check if ao is installed:

if command -v ao &>/dev/null; then
  echo "✓ Knowledge saved to <path>"
  echo ""
  echo "To move this into cached memory now:"
  echo "  ao pool ingest <path>"
  echo "  ao pool list --status pending"
  echo "  ao pool stage <candidate-id>"
  echo "  ao pool promote <candidate-id>"
  echo ""
  echo "Or let hooks run close-loop automation."
else
  echo "✓ Knowledge saved to <path>"
  echo ""
  echo "Note: Install ao CLI to enable automatic knowledge flywheel."
fi

Do NOT auto-run promotion commands. The user should decide when to stage/promote.

Note: If --global or --promote is set, skip ao CLI integration. Global learnings are discovered directly by ao inject from ~/.agents/learnings/.

Step 7: Confirm to User

Tell the user:

Learned: <one-line summary from content>

Saved to: .agents/knowledge/pending/YYYY-MM-DD-<slug>.md
Type: <classification>

This capture is queued for flywheel ingestion; once promoted it is available via /research and /inject.

Key Rules

  • Be concise - This is for quick captures, not full retrospectives
  • Preserve user's words - Don't rephrase unless they ask
  • Use simple slugs - Clear, descriptive, lowercase-hyphenated
  • Ingest-compatible format - Include # Learning: block with category/confidence
  • No auto-promotion - User controls quality pool workflow

Examples

Quick Pattern Capture

User says: /learn "use token bucket for rate limiting"

What happens:

  1. Agent has content from argument
  2. Agent asks for classification via AskUserQuestion
  3. User selects "pattern"
  4. Agent generates slug: token-bucket-rate-limiting
  5. Agent creates .agents/knowledge/pending/2026-02-16-token-bucket-rate-limiting.md
  6. Agent writes frontmatter + content
  7. Agent checks for ao CLI, informs user about ao pool ingest + stage/promote options
  8. Agent confirms: "Learned: Use token bucket for rate limiting. Saved to.agents/knowledge/pending/2026-02-16-token-bucket-rate-limiting.md"

Interactive Capture

User says: /learn

Agent asks for content and type, generates slug never-eval-hooks, creates .agents/knowledge/pending/2026-02-16-never-eval-hooks.md, confirms save.

Gotcha Capture

User says: /learn "bd dep add A B means A depends on B, not A blocks B"

Agent classifies as "gotcha", generates slug bd-dep-direction, creates file in pending, confirms save.

Troubleshooting

ProblemCauseSolution
Slug collisionSame topic on same dayAppend -2, -3 counter automatically
Content too longUser pasted large blockAccept it. /learn has no length limit. Suggest /retro for structured extraction if very large.
ao pool ingest/stage failsCandidate ID mismatch or ao not installedShow exact next commands (ingest, list, stage, promote) and confirm file was saved
Duplicate knowledgeSame insight already capturedCheck existing files with grep before writing. If duplicate, tell user and show existing path.

The Flywheel

Manual captures feed the same flywheel as automatic extraction:

/learn → .agents/knowledge/pending/ → ao pool ingest → .agents/learnings/ → /inject

This skill is for quick wins. For deeper reflection, use /retro.

平台分布

Codex

36.3%
按下载量换算370

Claude

33.33%
按下载量换算340

Cursor

17.38%
按下载量换算177

Gemini CLI

9.01%
按下载量换算92

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills