learn

A command for learning a new capability through experiments and then recording what worked. It supports both figuring out a process from scratch and documenting a successful process afterward.

In plain words
What is it for?
Use it to test how to interact with a tool or system, refine the process, and save the resulting method for future work.
Why use it?
It turns trial and error into repeatable instructions instead of leaving useful discoveries only in a conversation. It also gives experiments a defined sequence to follow.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dork-labs/dorkos/learn
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.02249
Opus 5 $0.00006 $0.01125
Sonnet 5 $0.00002 $0.00450
Haiku 4.5 $0.00001 $0.00225

Measured 2d ago against content hash 905e4e633649, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

learn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/system/learn.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.

System Learn Command

Learn new capabilities through trial and error experimentation, then codify successful behaviors into the system. This command acts as a collaborative learning partner.

Arguments

  • $ARGUMENTS - What to learn or codify. Examples:
    • Proactive: "learn how to interact with contacts using applescript"
    • Retrospective: "we successfully created calendar events with smart defaults - codify this"

Mode Detection

Detect which mode based on the user's instructions:

Proactive mode (experimentation first):

  • Keywords: "learn how to", "figure out how to", "try to", "experiment with", "discover how"
  • Flow: Research → Experiment → Iterate → Codify

Retrospective mode (codify what worked):

  • Keywords: "we just", "we successfully", "codify this", "what we did", "save this behavior", "remember how we"
  • Flow: Analyze → Codify

Order of Operations

Execute these phases sequentially. This is an interactive, collaborative process.

Phase 1: Understanding

  • 1.1 Parse $ARGUMENTS to detect mode (proactive vs retrospective)

  • 1.2 For Proactive mode:

    • Ask clarifying questions to understand the goal
    • Define testable success criteria together with the user
    • Present what we'll be experimenting with
    • Get upfront consent: "This will involve experimentation. I'll try different approaches and ask for your feedback. Ready to proceed?"
  • 1.3 For Retrospective mode:

    • Confirm what was accomplished: "It sounds like we successfully [X]. Is that what you'd like to codify?"
    • Clarify the scope: What specific behavior should be captured?
    • Identify the key patterns that made it work

Phase 2: Research

  • 2.1 Search for related existing behaviors in the system:

    # Check existing skills
    Search .claude/skills/ for related patterns
    
    # Check existing commands
    Search .claude/commands/ for related functionality
    
    # Check hooks (configured in settings.json)
    Read .claude/settings.json for hook configurations
    
    # Check existing agents
    Search .claude/agents/ for related expertise
    
    # Check AGENTS.md for documented behaviors
    Read AGENTS.md and search for related keywords
    

Read the full file on GitHub · 307 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 307 lines · 12 tokens per session scan A 905e4e633649

Subscribe to this mod's changes

learn is a command published in the GitHub repository dork-labs/dorkos (9 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 2,249 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.