Agent skill

Learn

by TyrealQ in TyrealQ/q-skills

Persist user preferences and styles across sessions. An agent skill from TyrealQ/q-skills.

MITAuto-check passedAgent Workflows

Install Learn

skills CLI
$ npx skills add TyrealQ/q-skills --skill learn -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TyrealQ/q-skills learn --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TyrealQ/q-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/learn .claude/skills/learn && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
learn
GitHub stars
108
Token cost
~2.7k tokens
SKILL.md length
1,280 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

Persist user preferences and styles across sessions. An agent skill from TyrealQ/q-skills.

  • Works in 7 steps: Scan conversation → Apply the repetition threshold → Read current state → …
  • Save preference
  • SKILL.md covers Three-Tier Target Architecture, Workflow, Query Mode and Anti-Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Learn is an agent skill from TyrealQ/q-skills. Persist user preferences and styles across sessions. Use for remember this, save preference, learn this, always do X, never do Y, from now on, update CLAUDE.md, update CM, forget X, what do you remember, or after repeated corrections in a session.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: End-to-end skills for academic writing, data analysis, teaching, and research communication. The licence is MIT.

When your agent uses it

  • Save preference
  • Update CLAUDE.md
  • What do you remember
  • After repeated corrections in a session

Example prompts

  • “/learn”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Scan conversation
  2. Apply the repetition threshold
  3. Read current state
  4. Detect conflicts with existing preferences
  5. Classify each extraction
  6. Present proposed changes
  7. Apply approved changes

What it can do on your machine

Read from SKILL.md and the folder at commit d8aaee7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Learn loads about 2.7k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 1,280 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TyrealQ/q-skills at commit d8aaee7, republished under its MIT licence (© TyrealQ). 1,280 words, ~2,703 tokens.

Download SKILL.mdSave it as .claude/skills/learn/SKILL.md (or your agent's skills folder).
name
learn
description
Persist user preferences and styles across sessions. Use for remember this, save preference, learn this, always do X, never do Y, from now on, update CLAUDE.md, update CM, forget X, what do you remember, or after repeated corrections in a session.

Personal Preference Learning

Extract preferences, styles, and behavioral patterns from the current conversation and persist them for all future sessions.

Scope: This skill captures how the user works, writes, and wants agents to behave. It does NOT capture code patterns, error fixes, or debugging techniques.

Three-Tier Target Architecture

TierLocationLoadedUse for
User instructions~/CLAUDE.mdEvery session, in fullConcise behavioral rules that apply to all projects
User rules~/.claude/rules/*.mdEvery session (or on file match)Structured rule sets on a single topic; optionally path-scoped
Project memory~/.claude/projects/<project>/memory/First 200 lines of MEMORY.md; topic files on demandProject-specific conventions, domain context

~/CLAUDE.md should stay under 200 lines. When it grows, move coherent rule groups to ~/.claude/rules/.

Workflow

Step 1: Scan conversation

Review all user messages for extractable patterns. Use the phrase families below as signals — do not infer preferences from silence or context alone.

Explicit rules (highest priority, save immediately):

  • "always…", "never…", "from now on…", "I prefer…"
  • "remember that I…", "make sure you…"

Corrections (save if repeated, see Step 2):

  • "don't do X", "stop doing Y", "that's not right"
  • "actually, it should be…", "I told you before…"
  • User rewording or editing Claude's output in place

Positive reinforcement (save when the approach was non-obvious):

  • User thanking Claude for a specific behavior
  • Accepting an unusual choice without pushback (quieter signal — note why it was non-obvious)

Domain context (save as user-tier facts):

  • Role, expertise, institutional affiliation, teaching approach
  • Tools, frameworks, or workflows the user commits to long-term

Style edits (save as style rules):

  • User modifying prose, formatting, or structure Claude produced
  • Terminology corrections ("use X not Y")

Non-signals — skip these:

  • One-time instructions ("do X now", "for this file only")
  • Hypotheticals ("what if I wanted…", "could you also…")
  • Third-party preferences ("my coauthor likes…", "reviewers want…")
  • Silence (user didn't push back ≠ user approved)
  • Code error resolutions and library workarounds (covered by continuous-learning)
  • Patterns Claude's auto memory already captured this session
Step 2: Apply the repetition threshold

A single off-hand correction is not a durable preference. Before promoting any pattern to later steps:

  • Explicit rule ("always…", "never…", "from now on…") → save immediately
  • Repeated correction (same pattern corrected 2+ times this session or referenced as "I told you before") → save as tentative, note the repetition
  • One-time correction with no repetition and no explicit framing → skip, do not fabricate a rule
  • Inferred from silence or hypothetical → skip unconditionally (see ## Anti-Patterns below)

If a tentative pattern has been corrected 3+ times across sessions (check existing ~/CLAUDE.md for near-duplicates), surface it in Step 6 with a "Confirm as permanent rule?" flag so the user decides explicitly.

Step 3: Read current state
  1. Read ~/CLAUDE.md in full. Parse the section hierarchy (it evolves — always re-read).
  2. List files in ~/.claude/rules/ to check existing rule files.
  3. Read the current project's ~/.claude/projects/<project>/memory/MEMORY.md if it exists.
  4. Identify what is already captured across all three tiers to avoid duplication.
Step 4: Detect conflicts with existing preferences

For each extraction, search the already-loaded ~/CLAUDE.md and rule files for contradicting text. If a conflict is found:

  1. Do NOT silently overwrite the existing rule.
  2. In Step 6's preview, show both entries side-by-side under a ## Conflicts heading and ask which supersedes which.
  3. Resolution defaults: more specific scope wins (project > user rule > ~/CLAUDE.md); within the same tier, the newer instruction wins only after explicit approval.
Step 5: Classify each extraction

For each pattern that survived Steps 1–4, decide its tier:

If the pattern...Route toExample
Is a concise rule for all projects~/CLAUDE.md — match to existing section or propose new ## section"Never use em-dashes in emails"
Is part of 5+ rules on one topic~/.claude/rules/new-topic.mdA full set of workflow preferences
Is specific to the current projectProject memory"TGL uses SDT framework with 1-7 scales"
Is already covered by an existing ruleSkip — note the existing rule
Is a one-time correctionSkip

Categories and typical tiers:

CategoryTypical TierTypical Location
Writing styleUser instructions~/CLAUDE.md under ## Academic Writing subsections
Email conventionsUser instructions~/CLAUDE.md under ## Email Drafting
Communication preferencesUser instructions~/CLAUDE.md under ## Communication (create if needed)
Workflow preferencesUser instructions or rules~/CLAUDE.md or ~/.claude/rules/workflow.md
Agent behaviorUser instructions or rules~/CLAUDE.md or ~/.claude/rules/agent-behavior.md
Project domain contextProject memory~/.claude/projects/<project>/memory/
Step 6: Present proposed changes

Show a numbered preview grouped by tier:

## Tier 1: User Instructions (~/CLAUDE.md)

### [1] Add to "## Academic Writing > ### Style" (existing section)
+ - Do not use semicolons to join independent clauses in academic prose

### [2] New section: "## Workflow" (after last existing ## section)
+ - When re-running a pipeline, first check what outputs already exist in cache
+ - Prefer flat directory structures keyed by ID over nested semantic hierarchies

## Tier 2: User Rules (~/.claude/rules/)

### [3] New file: ~/.claude/rules/communication.md
+ # Communication Preferences
+ - Lead with the answer, not the reasoning

## Tier 3: Project Memory

### [4] Add to project memory MEMORY.md
+ - TGL project uses SDT framework (autonomy, competence, relatedness) scored 1-7

## Skipped

- "Use precise terminology" → already in ~/CLAUDE.md ### Word Choice

Approve all? Or specify numbers to modify/reject.
Show full SKILL.md (568 more words)Show less
Step 7: Apply approved changes

Tier 1 — ~/CLAUDE.md:

  • Use the Edit tool for surgical insertions
  • Insert new bullets at the end of the target section, before the next heading
  • For new sections, use ## heading level (same as ## Email Drafting)
  • Report the final line count

Tier 2 — ~/.claude/rules/:

  • Create new rule files as plain markdown with a descriptive # Heading
  • Use paths frontmatter only if the rules apply to specific file types
  • One topic per file; use descriptive filenames (e.g., workflow.md, communication.md)

Tier 3 — Project memory:

  • Write to ~/.claude/projects/<project>/memory/
  • Follow the auto memory format: MEMORY.md as index, topic files for details
  • Use the same frontmatter format as existing memory files (name, description, type)

Confirm all changes applied.

Query Mode

The skill can also answer questions about what has already been remembered, without writing anything. Trigger phrases:

User saysAction
"What do you remember about me?" / "Show preferences"Summarize ## sections in ~/CLAUDE.md + list ~/.claude/rules/*.md files with one-line descriptions
"What's in [topic]?"Quote the matching section verbatim with its file path and line range
"Forget X"Locate X across all three tiers, show the exact lines, and ask for confirmation before deletion
"What did you learn this session?"List entries added in the current session only

Query mode is read-only — only "Forget X" writes, and only after explicit confirmation. Never infer intent: if the request is ambiguous, ask before reading.

Anti-Patterns

Common failure modes this skill must avoid. When any of these fire, skip the extraction and do not save anything.

TrapWhy it failsCorrect move
Inferring from silenceUser didn't object ≠ user approvedWait for explicit correction or repeated evidence
Promoting after one mentionFabricated rules pollute ~/CLAUDE.mdRequire explicit framing ("always…", "never…") or 2+ repetitions (see Step 2)
Learning from hypotheticals"What if I wanted X?" is a question, not a preferenceSkip unless the user commits to the framing
Learning third-party preferencesBelongs to someone else, may be wrong for current userOnly capture first-person statements
Over-generalizing from narrow context"For this one file" becomes a global rulePreserve the scope in the saved entry, or route to project memory
Learning style over substanceEchoing Claude's own phrasing back as rulesSave the behavior the user demanded, not metacommentary about it
Silently rewriting an existing ruleUser loses the audit trailSurface as a conflict in Step 4; get explicit approval

Safety Rules

  • ALWAYS show proposed changes and get explicit approval before writing any file
  • NEVER delete or modify existing preferences — only add or refine
  • NEVER rewrite entire sections
  • NEVER log preferences inferred from silence, context, or a single off-hand remark (see ## Anti-Patterns above)
  • NEVER save third-party preferences (e.g., "my coauthor likes…") — only the current user's own preferences
  • NEVER store credentials, API keys, health information, or PII, even if the user explicitly asks
  • If unsure which tier a preference belongs to, ask the user
  • If zero preferences are extracted, say so honestly — do not fabricate rules
  • If ~/CLAUDE.md would exceed 200 lines after changes, warn and suggest moving content to ~/.claude/rules/
  • New sections in ~/CLAUDE.md must use ## level to maintain flat hierarchy
  • For project memory, respect the existing MEMORY.md structure and index pattern

Out of Scope

This skill does NOT:

  • Track numeric confidence scores or usage-decay timers
  • Auto-sync to any external agent product config (Cursor, Gemini, OpenClaw, …)
  • Modify its own SKILL.md
  • Edit CHANGELOG.md, README.md, or git history
  • Capture code error resolutions or library workarounds (that is continuous-learning's job)

© TyrealQ, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/learn of TyrealQ/q-skills.

Open the folder on GitHubat commit d8aaee7

Compare with similar skills

Learn next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Learn compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Learn this skillTyrealQ/q-skills108—~2.7kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills102k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0
Writing For Agentsbestofjs/bestofjs3.1k17 repos~2.7kAutomated safety check: PassMIT

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    102k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 17 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from TyrealQ/q-skills

All 16 skills in this repo
  • Q-Infographics

    TyrealQ/q-skills

    Converts a report or other document into a business story and then an infographic image, pausing for your review after each step.

    108 GitHub stars~814 tokensUpdated 13 days ago
    Auto-check: notes
  • Runs exploratory data analysis on tabular data after you confirm each column's measurement level, then writes CSV tables and a narrative summary.

    108 GitHub stars~1.1k tokensUpdated 13 days ago
    Auto-check passed
  • Extracts pixel, video-frame, speech, music and visual-semantic features from image, video and audio files for research datasets, using local tools or the Gemini API.

    108 GitHub stars~2k tokensUpdated 13 days ago
    Auto-check: notes
  • Consolidates BERTopic, LDA or NMF topic output into a theory-driven classification framework and writes the final labels back to an Excel file.

    108 GitHub stars~1k tokensUpdated 13 days ago
    Auto-check passed
  • Generates branded slide deck images from written content, with a content analysis step, a layout catalog and scripts that merge the slides into PowerPoint or PDF.

    108 GitHub stars~1.1k tokensUpdated 13 days ago
    Auto-check passed
  • Audits a repository's file layout and project documentation against a written convention file, then proposes moves, deletions and doc fixes as an approved plan before touching anything.

    108 GitHub stars~4.4k tokensUpdated 13 days ago
    Auto-check: notes

Categories

Questions about Learn

What does Learn do?

Persist user preferences and styles across sessions. An agent skill from TyrealQ/q-skills. Learn is an agent skill from TyrealQ/q-skills. Persist user preferences and styles across sessions.

When should I use Learn?

Learn fits situations like: save preference; update CLAUDE.md; what do you remember; after repeated corrections in a session.

How do I install Learn in Claude Code?

Run `npx skills add TyrealQ/q-skills --skill learn -a claude-code`. Or copy the skill folder (skills/learn in TyrealQ/q-skills) into .claude/skills/learn in your project. Claude Code loads it when a task matches its description.

How do I install Learn in Codex?

Run `npx skills add TyrealQ/q-skills --skill learn -a codex`. Or copy the skill folder (skills/learn in TyrealQ/q-skills) into .agents/skills/learn in your project. Codex loads it when a task matches its description.

Can I use Learn in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TyrealQ/q-skills --skill learn -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/learn, .gemini/skills/learn, .github/skills/learn and .opencode/skills/learn in your project.

What does Learn need to run?

SKILL.md names no scripts, command-line tools or credentials: Learn is instructions for the agent only.

Does Learn access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Learn safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Learn use?

Learn is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Learn use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Learn?

Skills that share tags, products or a category with Learn: Using Agent Skills (addyosmani/agent-skills, 102k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars) and Task Observer (rebelytics/one-skill-to-rule-them-all, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Learn?

TyrealQ (a GitHub user) maintains it in TyrealQ/q-skills, which has 108 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 23, 2026.

Source: TyrealQ/q-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.