Learn and Capture Knowledge

VerifiedSafe

Analyzes session history to identify strategic, reusable project knowledge and updates the local CLAUDE.md file. Used after significant work or when the user requests knowledge capture, it helps retain architectural patterns, conventions, and operational insights to speed up future development.

Sby Skills Guide Bot
ProductivityBeginner
3/2/2026
Claude Code
#claude-md#knowledge-capture#context-management#session-memory#project-conventions

Recommended for

Automated summary

This skill reviews the current session history and extracts durable, reusable project knowledge to record in the local CLAUDE.md file.

Strengths

  • Explicitly separates lasting strategic knowledge from tactical session work (fixed bugs, TODOs, one-off patches)
  • Reads the existing CLAUDE.md first to avoid duplicating what is already documented
  • Exits cleanly without prompting when no new strategic knowledge was found
  • Asks for granular confirmation through AskUserQuestion, offering All / individual items / None

Limitations

  • Restricted to Read, Edit, and AskUserQuestion, so it reasons over the conversation rather than exploring the repository itself
  • Only covers the local CLAUDE.md; there is no syncing or versioning of the captured knowledge
  • Extraction quality depends entirely on what was actually explored during the session
When to use it

Use it at the end of a substantial work session, or when the user explicitly asks to capture learnings into CLAUDE.md.

When not to use it

Avoid it for logging one-off actions or temporary workarounds, which are not reusable project knowledge.

Security analysis

Safe
Quality score84/100

The skill only uses Read, Edit, and AskUserQuestion to review the session and update local CLAUDE.md after explicit user confirmation. It does not execute shell commands, access the network, exfiltrate data, or disable safety mechanisms. The only notable concern is the potential to persist sensitive operational details, but this is limited, local, and user-approved.

Findings
  • •Encourages capturing environment-specific operational details (database locations, connection details, log endpoints) in CLAUDE.md; while user-confirmed, this can risk storing sensitive infrastructure information in a repo-visible file.
How this analysis is made

Examples

End of session capture
learn
Explicit save request
Save what we figured out about the service integration patterns to CLAUDE.md
Operational details
Capture learnings from this session — especially the environment config and debugging steps we used

name: learn description: Update local CLAUDE.md with strategic knowledge discovered during this session. Use when user says "learn", "save knowledge", "update claude.md", "capture learnings", or at end of significant work sessions. Also used by commit skill for pre-commit knowledge capture. allowed-tools: Read, Edit, AskUserQuestion

Learn

Review the current conversation history and identify strategic, reusable project knowledge that should be captured in the local CLAUDE.md file.

Analysis Process

  1. Review Session History

    • Examine all files read and modified during this session
    • Identify patterns discovered while working on tasks
    • Note architectural insights gained from exploring the codebase
  2. Extract Strategic Knowledge

    • Filter out tactical details (bug fixes, specific implementations)
    • Focus on reusable patterns and project structure
    • Identify conventions and architectural decisions
  3. Categorize Findings

    • Project architecture and structure
    • Data flow patterns
    • External service integrations
    • Project-specific conventions
    • Key dependencies and their purposes
    • Configuration patterns
    • Testing strategies
    • Build and deployment processes
    • Operational knowledge (debugging, DevOps)

What Qualifies for Local CLAUDE.md

INCLUDE - Strategic discoveries from this session:

  • Architectural patterns uncovered while working
  • Project structure insights gained from navigation
  • Conventions noticed across multiple files
  • Integration patterns discovered
  • Configuration approaches identified
  • Testing strategies observed
  • Build/deployment processes encountered
  • Performance optimizations found
  • Security implementations discovered
  • Operational knowledge:
    • Database locations and connection details per environment
    • Useful queries discovered during debugging
    • Testing procedures and verification steps
    • Deployment workflows and commands
    • Log locations and monitoring endpoints
    • Environment-specific quirks and gotchas

EXCLUDE - Session-specific tactical work:

  • The specific bug we fixed
  • The particular feature we implemented
  • Temporary workarounds we used
  • One-off code changes
  • TODO items we encountered
  • Historical context about changes

Decision Criteria

Ask yourself for each discovery:

  • "Will this help understand the project in 6 months?"
  • "Is this a pattern that appears multiple times?"
  • "Does this represent a project-wide convention?"
  • "Would knowing this speed up future development?"
  • "Would this save debugging time in the future?" (for operational knowledge)

Workflow

1. Check Existing Local CLAUDE.md

First, check if local CLAUDE.md exists and read its current content to avoid duplication.

2. Early Exit if Nothing Found

If no new strategic knowledge was discovered during this session:

  • Report "no new strategic knowledge to capture"
  • Do NOT use AskUserQuestion tool
  • End the skill execution

3. New Knowledge to Add

Present discovered knowledge formatted for local CLAUDE.md:

## [Section Name]
- Discovery 1
- Discovery 2

4. User Confirmation with AskUserQuestion Tool

CRITICAL: Use AskUserQuestion tool for granular selection of what to save.

Build options dynamically based on discoveries:

  • First option: "All knowledge" - save everything discovered
  • Last option before custom: "None" - skip saving entirely
  • Middle options: Individual knowledge items (up to 2-3 most significant)
  • User can always type custom selection via "Other"

Example with 3 discoveries:

question: "Which knowledge should I save to local CLAUDE.md?"
options:
  - label: "All (3 items)"
    description: "Save all discovered patterns"
  - label: "Testing pattern"
    description: "Table-driven tests with shared fixtures"
  - label: "Config approach"
    description: "Environment-based configuration loading"
  - label: "None"
    description: "Skip saving, nothing worth keeping"

Example with 1 discovery:

question: "Save this knowledge to local CLAUDE.md?"
options:
  - label: "Yes"
    description: "Save: [brief description of the discovery]"
  - label: "No"
    description: "Skip saving"

After user selection:

  • "All" -> save everything
  • "None" -> end without saving
  • Specific item -> save only that item
  • "Other" -> user types custom selection (comma-separated items or partial list)

Important Guidelines

  • Only capture genuinely new discoveries from this session
  • Don't duplicate existing local or global CLAUDE.md content
  • Focus on patterns observed, not specific code written
  • Keep descriptions concise and actionable
  • MUST use AskUserQuestion tool for confirmation (not plain text questions)
  • If no knowledge found, exit early without asking

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/learn-and-capture-knowledge-mm8o524u' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/learn-and-capture-knowledge-mm8o524u/download' --output '.skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md.part' && mv '.skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md.part' '.skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Edit, AskUserQuestion

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md' && test -s '.skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/learn' && cp -R '.skill-downloads/learn-and-capture-knowledge-mm8o524u' '.claude/skills/learn'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/learn-and-capture-knowledge-mm8o524u'

openskills read 'learn-and-capture-knowledge-mm8o524u'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/learn-and-capture-knowledge-mm8o524u/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills