llamero: Skill for Claude Code

.claude/skills/adapter-training/SKILL.md

adapter-training is a skill for Claude Code from crimson-knight/llamero. It costs 92 tokens per session (2,527 once invoked), scanned A, original, MIT.

A Crystal programming skill for training LoRA or QLoRA adapters on a local AI model with llamero. An adapter is a small removable set of learned changes that adds facts or behavior without replacing the base model.

In plain words
What is it for?
Use it to prepare prompt-and-answer training data, train an adapter on Apple Silicon, monitor training loss, and activate or deactivate the learned adapter.
Why use it?
It lets you teach a resident local model specific documents or domain knowledge while keeping the original model unchanged and reload-free.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is crimson-knight/llamero's own configuration. It tells Claude Code how to work on llamero itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llamero configures →

Reuse

Borrowing it

Nothing to install: this file belongs to crimson-knight/llamero. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/crimson-knight/llamero/main/.claude/skills/adapter-training/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/crimson-knight/llamero

Made for: Claude Code.

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 adapter-training

README.md
[![agentmods](https://agentmods.dev/badge/skills/crimson-knight/llamero/adapter-training/github.svg)](https://agentmods.dev/skills/crimson-knight/llamero/adapter-training)
Your own site
<a href="https://agentmods.dev/skills/crimson-knight/llamero/adapter-training"><img src="https://agentmods.dev/badge/skills/crimson-knight/llamero/adapter-training/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adapter-training

Your own site · 80×15
<a href="https://agentmods.dev/skills/crimson-knight/llamero/adapter-training"><img src="https://agentmods.dev/badge/skills/crimson-knight/llamero/adapter-training.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,527 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00092 $0.02527
Opus 5.5 $0.00037 $0.01011
Sonnet 5.5 $0.00018 $0.00505
Haiku 4.5 $0.00009 $0.00253

Measured 2mo ago against content hash 78b8ab38c5cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adapter-training 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 2mo 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/skills/adapter-training/SKILL.md · 203 lines

How it starts

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

Training adapters with llamero (LoRA / QLoRA)

llamero trains LoRA adapters in-process on the resident model: build a golden dataset of prompt/completion pairs, call train_adapter, watch the loss stream down, then activate the adapter. The knowledge behaves like a removable filter — on when activated, gone when deactivated, and the base model never reloads at any point.

When the base model is quantized (any *-4bit model — the normal case), the adapters automatically train QLoRA-style over the quantized layers. There is no separate QLoRA mode to configure.

Prerequisites are the same as the local-inference skill: Apple Silicon, the Swift bridge built once via build.sh, and a loaded model session.

Storage root

Default adapter storage is under ~/.llamero. Apps that need app-owned AI data set this at boot before creating runtimes or training:

Llamero.storage_root = Path.home.join(".scribe")

LLAMERO_HOME=/path/to/root is the env alternative; programmatic wins. The default train_adapter output becomes Llamero::Storage.adapters_dir/<name>/.

Recipe: teach a model facts it cannot know (complete program)

require "llamero"

# Train on a DENSE model (see "Choosing a base model" below).
runtime = Llamero::Native::MLXRuntime.new(model_id: "mlx-community/gemma-3-1b-it-4bit")
session = runtime.start_session
session.load_model

# 1. Golden dataset: prompt/completion pairs. Use several phrasings of each
#    fact so short training runs generalize beyond exact wording.
#    No format: needed — train_adapter automatically uses the model's own
#    chat template (or the right built-in) for datasets with the default.
dataset = Llamero::Native::TrainingDataset.new(
  system_prompt: "You are a Crawley LX-900 bulldozer maintenance expert."
)
dataset.add("What fuel injectors does the Crawley LX-900 use?",
  "The Crawley LX-900 uses BR-7741 fuel injectors rated at 2,150 PSI.")
dataset.add("Tell me the LX-900 fuel injector part number.",
  "The part number is BR-7741, rated at 2,150 PSI.")
dataset.add("What oil does the Crawley LX-900 use?",
  "The LX-900 uses 15W-40 heavy duty diesel engine oil.")

# 2. Hyperparameters. lr 1e-4 memorizes small fact sets quickly.
config = Llamero::Native::AdapterTrainingConfig.new
config.iterations = 300
config.learning_rate = 1e-4

# 3. Train. Streams live loss. Speed scales with model size: ~1 minute for
#    300 iterations on a 0.6B model, tens of minutes on a 2B-class model.
descriptor = session.train_adapter("lx900-manual", dataset, config) do |progress|
  puts "iter #{progress.iteration}/#{progress.total_iterations}: loss=#{progress.loss.round(3)}"
end
puts "saved to #{descriptor.path}"

# 4. The adapter is auto-registered. Toggle the knowledge on and off:
session.activate_adapters(
  Llamero::Native::AdapterStack.additive([
    Llamero::Native::AdapterSlot.new("lx900-manual"),
  ])
)
puts session.chat([Llamero::Message.user("What injectors does the LX-900 use?")]).content
session.deactivate_adapters

runtime.close

Read the full file on GitHub · 203 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. 2mo ago First seen · 203 lines · 92 tokens per session scan A 78b8ab38c5cb

Subscribe to this mod's changes

adapter-training is a skill published in the GitHub repository crimson-knight/llamero (23 stars, last pushed 27d ago), licensed MIT. It adds 92 tokens to every session and 2,527 once invoked, about $0.0004 per session on Opus 5.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.

Related

adapter-training compared with skills from other repositories

adapter-training next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
adapter-trainingcrimson-knight/llameroSkill2327d agoMITA92Claude Code
pytorch-patternsaffaan-m/ECCSkill298k4d agoMITA32Claude Code, Kiro
optimize-for-gpuK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA151Claude Code, Codex
developing-genkit-pythongoogle/skillsSkill22kyesterdayApache-2.0A49Claude Code, Codex
ax-cpp-genax-llm/axSkill3.0k3d agoApache-2.0A48Claude Code, Codex
ax-go-genax-llm/axSkill3.0k3d agoApache-2.0A54Claude Code, Codex
ax-java-genax-llm/axSkill3.0k3d agoApache-2.0A49Claude Code, Codex