learn

A command that saves reusable discoveries and lessons from a coding session as one-line JSON records. JSONL means one JSON object per line, making the file easy to append to and process.

In plain words
What is it for?
Use it when a pattern, mistake, or insight could help in another session or project. It appends the lesson to an Eureka log using a fixed record format.
Why use it?
It preserves useful knowledge while it is fresh instead of losing it when the session ends. It separates reusable lessons from temporary session state and end-of-session retrospectives.

Command

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/ramsbaby/jarvis/learn
Clone the repo
git clone --depth 1 https://github.com/Ramsbaby/jarvis
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,478 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.00056 $0.04478
Opus 5 $0.00028 $0.02239
Sonnet 5 $0.00011 $0.00896
Haiku 4.5 $0.00006 $0.00448

Measured 2d ago against content hash 109014ebad2e, 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.

dotfiles/claude/commands/learn.md · 303 lines

How it starts

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

/learn — 학습 기록 자동화 (JSONL + Compound Loop)

존재 이유

주인님, 이 스킬은 한 세션에서 얻은 깨달음이 다음 세션에서 다시 기억나지 않는 구조적 낭비를 막기 위해 존재합니다. Jarvis 생태계의 ETHOS는 "오답노트 → Eureka → 회고" 세 기록을 반드시 체인으로 연결할 때만 복리(compound)로 누적된다고 규정합니다. /learn은 그 체인의 실시간 입력구(input port) 입니다.

말로 풀자면 — 작업 도중 "어? 이거 어디서 봤는데"라는 감각이 들 때, 그 순간을 JSONL 한 줄로 강제 저장해 다음 주, 다음 달의 저를 돕는 장치입니다.


기존 스킬과의 경계

스킬 목적 호출 시점 산출물
/retro 세션 완료 후 회고 + 오답노트 등록 세션 종료 직전 learned-mistakes.md + 회고 리포트
/context-save 현재 세션 스냅샷 (todo, 파일, 결정사항) 컴팩션 직전·세션 전환 시 ~/jarvis/runtime/context/*.md
/learn 실시간 세션 중 재사용 가능한 패턴/인사이트 즉시 기록 깨달음 발생 순간 (세션 진행 중) eureka.jsonl 한 줄 append

한 줄 판단 기준: "이 배움이 다른 세션·다른 도메인에서도 재사용될 것인가"가 Yes이면 /learn, "이번 세션 내부 상태"면 /context-save, "세션이 끝났고 돌아보는 시간"이면 /retro입니다.

기존 Eureka 시스템과의 관계

~/jarvis/runtime/wiki/meta/eureka.jsonl이번 gstack 이식(2026-04-21 KST)과 함께 초기화된 빈 파일입니다. 스키마는 아래 "JSONL 스키마" 절의 정의를 SSoT로 삼으며, /learn은 이 파일에 append-only로 누적합니다. 즉 본 스킬의 첫 호출부터 축적이 시작되며, 기존 레코드 호환 이슈는 없습니다.


JSONL 스키마 (엄격 정의)

모든 신규 레코드는 아래 스키마를 따릅니다. 기존 필드 삭제·이름 변경 금지, 새 필드 추가만 허용합니다.

{
  "id": "eureka-YYYYMMDD-NNN",
  "date": "YYYY-MM-DD HH:MM KST",
  "type": "pattern|insight|correction|anti-pattern",
  "domain": "backend|frontend|devops|cron|db|rag|discord|apple|google|...",
  "title": "한 줄 요약 (40자 이내 권장)",
  "context": "언제·어디서 발견하였는지 (1-2문장)",
  "pattern": "무엇이 재사용 가능한 구조인지 (핵심 원리)",
  "evidence": ["증거 파일 경로", "로그 스니펫", "재현 명령"],
  "reusable_in": ["유사 상황 1", "유사 상황 2"],
  "gain": "정량 효과(예: 15분 단축) 또는 정성 효과(예: 재발 방지)",
  "source_session": "세션 ID 또는 Claude Code 대화 링크"
}

필드별 규칙

필드 필수 비고
id O eureka- 접두 + 날짜 + 3자리 순번. 중복 금지
date O KST 필수 (UTC 금지), date '+%Y-%m-%d %H:%M KST'
type O 4종 enum 외 값 금지
domain O 도메인 미상이면 general
title O 한국어, 40자 이내 권장
context O "언제 발견했는가" — 트리거 맥락
pattern O "무엇이 재사용 가능한가" — 이 필드가 없으면 Phase 3에서 reject
evidence O 최소 1개. 빈 배열 금지
reusable_in O 최소 1개. 재사용처 없으면 /learn이 아니라 /retro 대상
gain O 정량/정성 중 하나
source_session O 추적 불가능하면 unknown

Read the full file on GitHub · 303 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 · 303 lines · 56 tokens per session scan A 109014ebad2e

Subscribe to this mod's changes

learn is a command published in the GitHub repository Ramsbaby/jarvis (15 stars, last pushed 10d ago), licensed MIT. It adds 56 tokens to every session and 4,478 once invoked, about $0.0003 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-30.