Session Skill Extraction Workflow

VerifiedCaution

Extract non-obvious discoveries from sessions into persistent reusable skills. Used to document debugging solutions, workarounds, and multi-step workflows for future sessions.

Sby Skills Guide Bot
ProductivityBeginner
3/1/2026
Claude Code
#skill-authoring#knowledge-capture#workflow#claude-code#session-learning

Recommended for

Automated summary

This skill turns a non-obvious discovery from the current session (a fix, a workaround, a multi-step procedure) into a persistent SKILL.md file, after a self-assessment and a duplication check.

Strengths

  • A four-question self-assessment phase that filters out what isn't worth documenting
  • A search of existing skills (ls + grep in .claude/skills/) so you update instead of duplicating
  • An enforced SKILL.md template with specific triggers, solution, verification and references
  • A final quality checklist: specific triggers, tested solution, no secrets, kebab-case name

Limitations

  • Quality rests on the agent's judgement: nothing prevents creating a skill for a trivial problem
  • The 'verified solution' gate is self-reported; the skill does not test the fix itself
  • Assumes the .claude/skills/ layout specific to Claude Code, not directly portable elsewhere
When to use it

Invoke it right after cracking a confusing bug or nailing down a sequence of steps you would happily repeat.

When not to use it

Skip it for a one-off obvious fix, or for knowledge already covered by official docs or an existing skill.

Security analysis

Caution
Quality score90/100

The skill is not malicious and contains no destructive commands, credential exfiltration, or obfuscated payloads. However, it intentionally creates or modifies persistent agent instruction files and grants Bash/Write access, so it carries moderate risk from self-modifying behavior and possible persistence of untrusted session content.

Findings
  • •Allows the agent to write persistent SKILL.md files under .claude/skills, which can influence future sessions; extracted content is not strongly sanitized against prompt injection or erroneous persistence.
  • •Bash is declared and used for filesystem discovery (ls/grep), though no destructive or exfiltrating commands are present.
How this analysis is made

Examples

Capture a debugging workaround
/learn fixest-missing-covariate-handling
Turn a procedure into a skill
We just figured out the multi-step deploy-and-verify process for the staging environment — capture it as a reusable skill with /learn staging-deploy-verify.
Document an undocumented API setup
/learn internal-api-token-refresh — document how we got the undocumented token refresh working so future sessions don't rediscover it.

name: learn description: | Extract reusable knowledge from the current session into a persistent skill. Use when you discover something non-obvious, create a workaround, or develop a multi-step workflow that future sessions would benefit from. author: Claude Code Academic Workflow version: 1.0.0 argument-hint: "[skill-name (kebab-case)]" allowed-tools: ["Read", "Write", "Bash", "Glob", "Grep"]

/learn — Skill Extraction Workflow

Extract non-obvious discoveries into reusable skills that persist across sessions.

When to Use This Skill

Invoke /learn when you encounter:

  • Non-obvious debugging — Investigation that took significant effort, not in docs
  • Misleading errors — Error message was wrong, found the real cause
  • Workarounds — Found a limitation with a creative solution
  • Tool integration — Undocumented API usage or configuration
  • Trial-and-error — Multiple attempts before success
  • Repeatable workflows — Multi-step task you'd do again
  • User-facing automation — Reports, checks, or processes users will request

Workflow Phases

PHASE 1: Evaluate (Self-Assessment)

Before creating a skill, answer these questions:

  1. "What did I just learn that wasn't obvious before starting?"
  2. "Would future-me benefit from this being documented?"
  3. "Was the solution non-obvious from documentation alone?"
  4. "Is this a multi-step workflow I'd repeat?"

Continue only if YES to at least one question.

PHASE 2: Check Existing Skills

Search for related skills to avoid duplication:

# Check project skills
ls .claude/skills/ 2>/dev/null

# Search for keywords
grep -r -i "KEYWORD" .claude/skills/ 2>/dev/null

Outcomes:

  • Nothing related → Create new skill (continue to Phase 3)
  • Same trigger & fix → Update existing skill (bump version)
  • Partial overlap → Update with new variant

PHASE 3: Create Skill

Create the skill file at .claude/skills/[skill-name]/SKILL.md:

---
name: descriptive-kebab-case-name
description: |
  [CRITICAL: Include specific triggers in the description]
  - What the skill does
  - Specific trigger conditions (exact error messages, symptoms)
  - When to use it (contexts, scenarios)
author: Claude Code Academic Workflow
version: 1.0.0
argument-hint: "[expected arguments]"  # Optional
---

# Skill Name

## Problem
[Clear problem description — what situation triggers this skill]

## Context / Trigger Conditions
[When to use — exact error messages, symptoms, scenarios]
[Be specific enough that you'd recognize it again]

## Solution
[Step-by-step solution]
[Include commands, code snippets, or workflows]

## Verification
[How to verify it worked]
[Expected output or state]

## Example
[Concrete example of the skill in action]

## References
[Documentation links, related files, or prior discussions]

PHASE 4: Quality Gates

Before finalizing, verify:

  • [ ] Description has specific trigger conditions (not vague)
  • [ ] Solution was verified to work (tested)
  • [ ] Content is specific enough to be actionable
  • [ ] Content is general enough to be reusable
  • [ ] No sensitive information (credentials, personal data)
  • [ ] Skill name is descriptive and uses kebab-case

Output

After creating the skill, report:

✓ Skill created: .claude/skills/[name]/SKILL.md
  Trigger: [when to use]
  Problem: [what it solves]

Example: Creating a Skill

User discovers that a specific R package silently drops observations:

---
name: fixest-missing-covariate-handling
description: |
  Handle silent observation dropping in fixest when covariates have missing values.
  Use when: estimates seem wrong, sample size unexpectedly small, or comparing
  results between packages.
author: Claude Code Academic Workflow
version: 1.0.0
---

# fixest Missing Covariate Handling

## Problem
The fixest package silently drops observations when covariates have NA values,
which can produce unexpected results when comparing to other packages.

## Context / Trigger Conditions
- Sample size in fixest is smaller than expected
- Results differ from Stata or other R packages
- Model has covariates with potential missing values

## Solution
1. Check for NA patterns before regression:
   ```r
   summary(complete.cases(data[, covariates]))
  1. Explicitly handle NA values or use na.action parameter
  2. Document the expected sample size in comments

Verification

Compare nobs(model) with nrow(data) — difference indicates dropped obs.

References

  • fixest documentation on missing values
  • [LEARN:r-code] entry in MEMORY.md

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/session-skill-extraction-workflow-mm78nml0/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/session-skill-extraction-workflow-mm78nml0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/session-skill-extraction-workflow-mm78nml0/download' --output '.skill-downloads/session-skill-extraction-workflow-mm78nml0/SKILL.md.part' && mv '.skill-downloads/session-skill-extraction-workflow-mm78nml0/SKILL.md.part' '.skill-downloads/session-skill-extraction-workflow-mm78nml0/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.

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/session-skill-extraction-workflow-mm78nml0/SKILL.md' && test -s '.skill-downloads/session-skill-extraction-workflow-mm78nml0/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/learn' && cp -R '.skill-downloads/session-skill-extraction-workflow-mm78nml0' '.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/session-skill-extraction-workflow-mm78nml0'

openskills read 'session-skill-extraction-workflow-mm78nml0'

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/session-skill-extraction-workflow-mm78nml0/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