afc:learner

afc:learner is a skill for Claude Code from jhlee0409/all-for-claudecode. It costs 14 tokens per session (1,757 once invoked), scanned A, original, MIT.

A tool that reviews patterns from your past sessions and, with approval, turns them into project rules. It also shows, enables, disables, or clears the pattern-learning system.

In plain words
What is it for?
Reviewing learned patterns, promoting them to project guidance, checking learner status, and managing its collection of correction signals.
Why use it?
It helps keep useful corrections and repeated preferences from being forgotten. You can inspect pending patterns before they become rules.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Part of the afc plugin — 31 skills, 12 agents, 19 hooks shipped together

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 skills/jhlee0409/all-for-claudecode/learner
Any agent
npx skills add jhlee0409/all-for-claudecode --skill learner
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/all-for-claudecode

Made for: Claude Code.

Or install afc, the plugin that ships this one along with the rest of its 31 skills, 12 agents, 19 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afc:learner

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/learner.svg)](https://agentmods.dev/skills/jhlee0409/all-for-claudecode/learner)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/all-for-claudecode/learner"><img src="https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/learner.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,757 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.1 $0.00014 $0.01757
Opus 5 $0.00007 $0.00879
Sonnet 5 $0.00003 $0.00351
Haiku 4.5 $0.00001 $0.00176

Measured 6d ago against content hash da89b72c6868, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

afc:learner 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 6d 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.

skills/learner/SKILL.md · 132 lines

How it starts

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

/afc:learner — Pattern Learning & Rule Promotion

Reviews correction patterns detected from your sessions and promotes approved ones to project rules in .claude/rules/afc-learned.md.

Arguments

  • $ARGUMENTS — (optional) action:
    • review (default) — review pending patterns and promote to rules
    • status — show learner status (enabled/disabled, queue size, rule count)
    • reset — clear the signal queue without promoting
    • enable — create learner config to start collecting signals
    • disable — remove learner config to stop collecting

Execution Steps

0. Action Routing

Parse $ARGUMENTS:

  • If "enable": create .claude/afc/learner.json with {"enabled": true, "createdAt": "{ISO timestamp}"}, then output status and exit
  • If "disable": remove .claude/afc/learner.json if it exists, then output "Learner disabled" and exit
  • If "reset": remove .claude/.afc-learner-queue.jsonl if it exists, then output "Queue cleared" and exit
  • If "status" or empty with no queue: show status and exit
  • Otherwise: proceed to review flow

1. Load Context

  1. Read .claude/.afc-learner-queue.jsonl (JSONL format — one JSON object per line)
  2. If queue is empty or file does not exist:
    • Fallback: git history analysis — scan recent fix/chore commits (git log --oneline --grep="fix" --grep="chore" -n 25) for recurring correction patterns (e.g., repeated lint fixes, naming changes, convention enforcement). Extract up to 5 candidate patterns from commit messages and diffs.
    • If fallback also finds nothing: output "No pending patterns and no recurring corrections in recent history. Use /afc:learner enable to start collecting signals automatically." and exit
    • If fallback finds candidates: continue to Step 2 with git-derived entries (mark source: "git-history" to distinguish from queue entries)
  3. Read .claude/rules/afc-learned.md if it exists (for deduplication)
  4. Read CLAUDE.md (project root) if it exists (for conflict detection)
  5. Count pending signals: {N} patterns pending (note source: queue vs git-history)

Read the full file on GitHub · 132 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 132 lines · 14 tokens per session scan A da89b72c6868

Subscribe to this mod's changes

afc:learner is a skill published in the GitHub repository jhlee0409/all-for-claudecode (7 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 1,757 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.

Related

Other skills, from other repositories

issue-triage

Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.

rtk-ai/rtk · 70 tokens

performance

CLI performance optimization - startup time, memory usage, token savings benchmarking.

rtk-ai/rtk · 13 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

moai-workflow-worktree

Git worktree management for parallel SPEC development with isolated workspaces, automatic branch registration, and seamless MoAI-ADK integration. Use when setting up parallel development environments.

modu-ai/moai-adk · 41 tokens

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-workflow-thinking

Sequential Thinking MCP for structured step-by-step analysis via --deepthink flag. Separate from UltraThink which is Claude's native extended reasoning mode. Use for multi-step analysis or architecture decisions.

modu-ai/moai-adk · 43 tokens