Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计提醒

apply-learnings学以致用

Agent Skill

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

总安装

3,550

周安装

145

GitHub Stars

公开资料未说明

下载量

1,148
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install apply-learnings

简介

从历史会话中提取有用知识并保留至未来对话中复用。

  • 适用于希望 Agent 持续积累经验与修正错误的学习型任务。
  • 自动分析过往失败案例与用户反馈以优化后续行为逻辑。
  • 学习内容需经用户批准方可生效,保障可控性。apply-learnings 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 建议在关键决策点主动请求确认以避免误学偏差。

SKILL.md

name
apply-learnings
description
Analyze Claude Code session history to extract learnings that would have been helpful if provided earlier, then persist them for future sessions. Use when the user asks to "apply learnings", "extract learnings", "what did we learn", "save session learnings", or "analyze session".

Apply Learnings Skill

Analyze Claude Code session history to extract learnings that would have been helpful if provided earlier, then persist them for future sessions.

Overview

This skill performs comprehensive analysis of session transcripts to identify:

  1. Code Pattern Learnings - Framework conventions, idioms, and best practices discovered during the session
  2. Architectural Preferences - Where validation/logic should live, layer responsibilities
  3. Tool Usage Patterns - Failed tool calls, user corrections, successful retries
  4. Missing Context - Information the user had to provide that could be documented upfront

Usage

Analyze Current Session

python3 ~/.claude/skills/apply-learnings/scripts/analyze_session.py --scope current

Analyze All Historical Sessions

python3 ~/.claude/skills/apply-learnings/scripts/analyze_session.py --scope all

Analyze Specific Project

python3 ~/.claude/skills/apply-learnings/scripts/analyze_session.py --project /path/to/project

Workflow

When the user invokes this skill:

Step 1: Ask User for Scope

Ask which scope to analyze:

  • Current session - Only the current conversation
  • Current project - All sessions for the current working directory
  • All sessions - Complete history across all projects

Step 2: Run Analysis

Execute the analysis script:

python3 ~/.claude/skills/apply-learnings/scripts/analyze_session.py --scope <scope>

Step 3: Present Findings

Present findings organized by category:

Code Pattern Learnings

Conventions and idioms specific to the codebase/framework:

  • Dependency injection patterns (e.g., "use glue logger from context, not DI")
  • Error handling conventions
  • Naming patterns
  • Testing patterns

Architectural Preferences

Where different concerns should be handled:

  • Validation location (e.g., "validate at handler/mapper, not in controllers")
  • Error transformation boundaries
  • Layer responsibilities

Tool Usage Improvements

From the original tool-self-improver:

  • Failed tool calls and corrections
  • Common error patterns
  • Successful retry patterns

Missing Context

Information that would have helped earlier:

  • Project-specific conventions not in CLAUDE.md
  • Framework quirks
  • Team preferences

Step 4: Classify Destination for Each Learning

For each learning, determine the best destination. Do NOT put everything in CLAUDE.md — route to the most specific location:

DestinationWhen to UseExample
~/.claude/MEMORY.mdCross-machine context: SRE tools, key people, tool conventions — anything useful on both Mac AND devpodsSRE MCP session protocol, .env default paths, key people/Slack IDs
~/.claude/CLAUDE.mdCross-project behavioral rules, hard constraints, coding preferences"Always use double quotes for SSH commands"
Existing skill referenceLearning directly relates to a specific skill's domainGlue logger pattern → /verification references; rebase tips → /arh-pr-workflow
Project CLAUDE.mdLearning is specific to one project/repo"This repo uses custom test helpers in pkg/testutil"
New skillLearning represents a reusable workflow or substantial domain knowledge not covered by existing skillsA complete debugging workflow for a specific system

Classification rules:

  1. Cross-machine tool/people context~/.claude/MEMORY.md (synced via TerraBlob to all machines)
  2. Check ~/.claude/skills/ — if a learning fits an existing skill, add it as a reference file or append to existing references
  3. If it's project-specific, target the project's CLAUDE.md (at repo root or ~/.claude/projects/)
  4. If it's a substantial, reusable workflow (3+ related learnings on one topic), propose a new skill
  5. Only put truly global behavioral rules in ~/.claude/CLAUDE.md
  6. When in doubt, prefer the more specific destination

Step 5: Present Routed Proposals

Present findings grouped by destination using AskUserQuestion:

I've identified the following learnings and where they should go:

**→ ~/.claude/CLAUDE.md** (global)
- [learning 1]
- [learning 2]

**→ ~/.claude/skills/verification/references/** (existing skill)
- [learning 3: web-code specific lint pattern]

**→ ~/.claude/skills/arh-pr-workflow/references/** (existing skill)
- [learning 4: rebase conflict resolution tip]

**→ ./CLAUDE.md** (this project only)
- [learning 5: project-specific convention]

**→ New skill: `debug-m3`** (proposed)
- [learning 6, 7, 8: related M3 debugging workflow]

Then ask user per destination group:

  • Apply as proposed — write to the suggested destination
  • Redirect — user specifies a different destination
  • Edit first — user wants to modify the content before applying
  • Skip — don't apply this group

Step 6: Apply Approved Changes

For each approved group:

  • CLAUDE.md additions: Append under appropriate existing section, or create new section if none fits. Deduplicate against existing content.
  • Existing skill references: Create or append to a references/learnings.md file in that skill's directory. Use ## Auto-learned (YYYY-MM-DD) header.
  • Project CLAUDE.md: Append under appropriate section in the project's CLAUDE.md.
  • New skill: Create ~/.claude/skills/<name>/SKILL.md with proper structure (description, when to use, the learned workflow/knowledge).

What Gets Detected

Code Pattern Signals

  • User corrections mentioning "use X instead of Y"
  • Explanations of framework conventions
  • References to existing patterns in codebase
  • "We prefer..." or "The convention is..." statements

Architectural Signals

  • Discussion of layer responsibilities
  • "This should be in X, not Y" corrections
  • Validation/error handling location guidance
  • Separation of concerns discussions

Tool Failure Signals

  • Tool calls with is_error: true
  • User rejections of tool calls
  • Interrupted requests
  • Successful retries after user guidance

Missing Context Signals

  • User providing information that wasn't asked for
  • Corrections about project-specific conventions
  • "Actually, in this codebase we..." statements
  • References to undocumented team practices

Example Learnings

Glue Framework Patterns

**Logger usage:**

- Use `ctx.Logger()` from the glue context instead of injecting logger via DI
- The context logger automatically includes request tracing

**Mapper conventions:**

- Mappers should only do type conversion, no business logic
- Return errors for invalid conversions, not validation errors

Validation Architecture

**Validation at edges:**

- Validate request payloads in handler layer (mapper or validation package)
- Controllers receive pre-validated entities
- Gateway responses should be validated/transformed at gateway layer

Go Monorepo Patterns

**BUILD.bazel:**

- Run `gazelle <directory>` after adding new imports
- Never run `bazel build //...` from root

**Testing:**

- Use table-driven tests
- Mocks generated with `mockgen` or `bin/glue mock`

Notes

  • Analysis is read-only; no sessions are modified
  • All changes require explicit user approval per destination group
  • Learnings are routed to the most specific destination, NOT all dumped into CLAUDE.md
  • Destinations: global CLAUDE.md, existing skill references, project CLAUDE.md, or new skills
  • Focus on actionable, specific guidance — avoid overly generic advice
  • Deduplicate against existing content before writing

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

93.38%
按下载量换算1,072

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

external-service

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

安装前确认

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

来源信息

继续浏览同类 Skills