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

learn学习

Agent Skill

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

总安装

1,173

周安装

47

GitHub Stars

1

下载量

380
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/whatifwedigdeeper/agent-skills --skill learn

简介

learn 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据来源线索快速定位结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前需确认权限范围、维护状态,避免触发联网或命令执行。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Learn from Conversation

Analyze the conversation to extract lessons learned, then persist them to AI assistant configuration files or new skills.

Arguments

Optional text to narrow what to learn (e.g. sandbox workaround, that build fix).

If $ARGUMENTS is help, --help, -h, or ?, skip the workflow and read references/options.md.

If $ARGUMENTS is a non-empty, non-help string, use it as a focus filter in Step 2: only surface learnings related to the specified topic, skip unrelated findings.

Process

1. Detect Configurations and Existing Skills

for f in CLAUDE.md GEMINI.md AGENTS.md .cursorrules .github/copilot-instructions.md \
  .windsurf/rules/rules.md .continuerc.json; do
  [ -f "$f" ] && wc -l "$f"
done
find .cursor/rules -name "*.mdc" -exec wc -l {} \; 2>/dev/null
find . -name "SKILL.md" -type f 2>/dev/null | grep -v node_modules | \
  xargs grep -l "^name:" | while read -r f; do grep -m1 "^name:" "$f" | sed 's/name: //'; done

Config detection:

  • Single config found → use it
  • Multiple configs found → stop and ask before proceeding: Found multiple config files: 1. CLAUDE.md (142 lines) 2..github/copilot-instructions.md (38 lines) Which should I update? (enter number, or "all") Before showing the prompt, rg each detected config for the Step 4 mirror-rule patterns (keep.* in sync, mirror.* to, apply the equivalent change). If one config contains a mirror-rule naming another, surface that in the prompt as informational context — but the user's choice still binds.
  • No configs found → MANDATORY: read references/assistant-configs.md in full to show init commands, then exit. Do NOT load refactoring.md or options.md at this step.

Size thresholds for any config file:

  • < 400 lines: healthy, add directly
  • 400–500 lines: add carefully, note the file is getting large
  • 500 lines: MANDATORY: read references/refactoring.md in full before proceeding, then offer to refactor. Do NOT load assistant-configs.md for this path unless also applying Route A changes.

2. Analyze Conversation

Default is reject. Each candidate learning must earn inclusion by passing three filters in order:

  1. Would I forget this? If any developer already knows it (npm install before npm start, commit before switching branches, read errors carefully), skip it. Baseline knowledge dilutes the config and trains agents to skim.
  2. Is this already covered? Search existing config entries for the topic — if found, tightening the wording beats adding a second rule.
  3. Is this universal or local? Environment-specific workarounds (broken keyring, one repo's tooling quirk) must carry a scope qualifier, not be globalized.

Only candidates that survive all three get scanned for shape:

  • Corrections: commands retried with a flag or env change, wrong assumptions corrected
  • Discoveries: undocumented behavior, integration quirks, environment requirements
  • Workflows: multi-step patterns invented during the session that should be repeatable
  • Instruction violations: if the user had to remind you of something already in the config, the wording may need strengthening, not a new rule
  • Contradictions: does this learning conflict with or supersede existing content? Flag for replacement, not addition — even if the user didn't call out the conflict

If nothing passes the filters, tell the user nothing non-obvious was found and exit — do not fabricate learnings to justify the invocation.

3. Route Each Learning

For each learning, ask: would someone invoke this by name? If you can imagine a user saying "run the [X] workflow," it's a skill. If not, it's a config entry.

  1. Is this a multi-step procedure someone would run as a workflow? If the learning has 3+ numbered steps that execute in sequence — even if project-specific — it belongs in a new skill. Deploy checklists, release runbooks, "add an X" workflows are all skills. Single facts and gotchas are config. If yes → Route C (new skill).
  2. Does an existing skill cover this topic? → Route B (update that skill)
  3. Is the config file oversized (>500 lines)? → Route C or offer refactoring
  4. Otherwise → Route A (config file)

The cleanest signal: if it takes more than one command to execute, it probably belongs in a skill; if it's a single fact to remember, it belongs in the config.

4. Preserve Cross-Config Sync Rules

Scope: Markdown-based configs onlyCLAUDE.md, GEMINI.md, AGENTS.md, .github/copilot-instructions.md, .cursorrules, .windsurf/rules/rules.md. Out of scope: .cursor/rules/*.mdc and .continuerc.json (non-Markdown formats; mirror-rule detection there is a follow-up).

Within the Markdown scope, when multiple configs are present:

  1. Detect mirror-rule text in each detected config — patterns like keep... in sync, mirror... to, apply the equivalent change to, near another config's filename.
  2. Respect the Step 1 choice. Operate only on the configs the user chose. A mirror-rule in an *unchosen* config does not trigger fan-out — the user may have deliberately scoped this learning narrowly (e.g., the Copilot file is style-scoped).
  3. Preserve mirror-rule text during every edit. Do not clobber it with a section rewrite.
  4. Reciprocate. For any chosen config that lacks a mirror-rule referencing the other chosen configs, add one (e.g., add Keep CLAUDE.md in sync: mirror rule changes back to CLAUDE.md to the top of .github/copilot-instructions.md if it had no reciprocal rule).

Why: The mirror-rule is load-bearing — it is how future sessions know to keep configs in sync. Silently updating one config without the other, or deleting the mirror-rule during a rewrite, lets the configs drift and the rule die. User choice still binds because narrower scoping is often legitimate.

5. Present Plan and Wait for Confirmation

Before showing the plan, audit each drafted rule body against the Principles' "Minimum viable rule text" check — apply "is this the min chars necessary?" to every clause and cut any clause you can't defend (incident narratives, multi-clause rationales, explanatory prose beyond a concrete example). First-draft text routinely needs trimming; the audit is not optional.

Then show everything you plan to do:

**[Category]**: [Brief description]
- Source: [what triggered this learning]
- Proposed change: [exact text to add, post-audit]
- Destination: [file] ([current lines] → [projected lines])

If multiple learnings, list them all, then ask:

Ready to apply. Approve all, or review each one?

Do not modify any files until the user responds to this step.

6. Apply Changes

Route A — Config file (CLAUDE.md, GEMINI.md, etc.): MANDATORY: read references/assistant-configs.md in full for format and section conventions before writing. Do NOT load refactoring.md for this route unless the file is also over 500 lines. Before appending, search the existing config for related content — if found, propose an update-in-place rather than a duplicate entry, and if the new rule contradicts an existing one, name the conflict explicitly in the summary (Principle 4). Then find the appropriate section, preserve existing structure, append or create a section. Apply Step 4's sync-rule preservation during every write.

Route B — Existing skill: read skills/[name]/SKILL.md, append to the relevant section, maintain existing structure.

Route C — New skill: create skills/[name]/SKILL.md. The description field determines whether the skill will ever be activated — it must state WHAT the skill does, WHEN to use it, and include trigger KEYWORDS (action verbs, file types, domain terms). A vague description like "helps with deployment" means the skill will never fire.

---
name: [topic]
description: [WHAT it does + WHEN to use it + trigger keywords]
---

# [Topic]

## Process

### 1. [First Step]
[Details]

7. Summarize

List files modified with before/after line counts, sections updated or created, and any skills created with their names. If a contradiction was resolved, name it explicitly — which rule conflicted with which, and which version was kept. If cross-config sync rules were honored (preserved or reciprocated), mention that too.

Principles

  1. Reject noise; include only non-obvious lessons. A bloated config trains agents to skim. If any developer already knows it ("npm install before npm start", "commit before switching branches"), skip it — and say which items you rejected so the user can override.
  2. Annotate scope; never globalize a one-off fix. A workaround that worked today may harm tomorrow's session if the environment differs. Label the condition that triggered the fix (broken keyring, specific macOS version, this repo's build quirk) so future agents can decide whether it applies. Use qualifiers like "when X fails" or "as a fallback after Y", not unconditional "always use Z" phrasing.
  3. One topic, one location. If a rule already exists anywhere in the config or a skill, update that entry. Two entries on the same topic create ambiguity — the agent follows whichever it reads first, which may be the weaker version. Tightening the existing wording beats appending a parallel bullet.
  4. Surface contradictions; never silently duplicate or replace. If a learning conflicts with existing content, propose replacement with the conflict named explicitly in the plan and summary ("this supersedes the existing X rule because Y"). A silent replace leaves the user unaware the rule changed; silent duplicates cause inconsistent agent behavior depending on which one is read first.
  5. Minimum viable rule text. Every clause must be load-bearing — the rule, the fix, a non-obvious "why", or a concrete example. Draft, then audit with "is this the min chars necessary?" Cut any clause you can't defend. ` cd dir && cmd (skips cmd if cd fails) ` beats a paragraph on shell exit semantics; incident narratives and multi-clause consequences belong in commit messages, not the rule body.

NEVER write vague learnings — "be careful with deployments" teaches nothing; "run smoke tests against staging before promoting to prod because the CDN cache masks broken assets" is actionable and explains why. This one hard prohibition remains NEVER because specificity is the single non-negotiable input to every other principle.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.62%
按下载量换算132

Claude

28.29%
按下载量换算108

Cursor

17.98%
按下载量换算68

Gemini CLI

10.95%
按下载量换算42

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills