Skip to main content
skill CX Codex

learn-optimization-skills — Claude Code skill: purpose and setup

The learn-optimization-skills Claude Code skill guides an optimizer’s learning between development tasks and records reusable lessons. It runs for post-task reflection or when a search turns up a reusable finding.

Apache-2.0 ★ 99 updated 2026-11-12

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a claude-code
Open on GitHub

What learn-optimization-skills does

The skill sets rules for changing an optimizer’s skills, memory, retrieval settings, prompts, and analysis tools. It separates knowledge that carries across tasks from changes to the training job, and marks system parts such as budgets, model weights, and the L0 schema as off-limits.

Memory entries include hardware, model, and data tags, configuration changes and step times for slow and fast variants, outcomes, failure causes, and lessons. Skill rules describe when a lesson applies and keep counter-examples beside it. A new package must pass selfcheck; if it fails, the previous package stays in place and the reflection is recorded as invalid_fallback.

Reflection uses the task trace: candidate changes and verdicts, step times and costs, invalid-result reasons, plus logs showing which skills, memories, and tools were retrieved or used. A changed tool that was never invoked does not count as learned.

What it helps with

  • carry reusable findings across development tasks
  • record a failure mechanism with its context
  • separate general conditions from a task-specific configuration
  • reject an optimizer package that fails selfcheck

Example prompts for the agent

  • Reflect on the finished development task and update any reusable skills.
  • Save the search finding to memory with its conditions and failure cause.
  • Decide whether this lesson applies beyond the current task.

How to install learn-optimization-skills

1Skills CLI (Vercel)

npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a claude-code

2Manually: put the files in place

~/.claude/skills/learn-optimization-skills/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/learn-optimization-skills/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about learn-optimization-skills

How do I install learn-optimization-skills in Claude Code?

Run npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a claude-code. The skill file is at ~/.claude/skills/learn-optimization-skills/SKILL.md.

What does learn-optimization-skills do?

It defines how an optimizer reflects on development tasks, stores reusable lessons, and checks package updates. It also sets limits on which parts of the optimizer may be edited.

When does the skill call for reflection?

After each development task. During a search, it also calls for a memory entry when a result explains a reusable finding.

Source text

SKILL.md · Apache-2.0
---
name: learn-optimization-skills
description: How the optimizer improves itself between development tasks - what it may and may not edit, the promotion gate for a new package, memory entry format, and how to distill applicability conditions and counter-examples from a trajectory.
license: Apache-2.0
when_to_use: Reflection after a development task; writing memory entries during a search; deciding whether a lesson is general or task-specific; 'what did we learn', 'update skills', 'memory entry', 'reflect'.
metadata:
  author: InfraRSI A0 (human-authored)
  source: human-authored (A0)
  version: 1
  tags: [rsi, reflection, memory, skills, package, learning]
---

# Learn optimization skills

The optimizer A (skills, memory, retrieval and analysis tools, policy, prompts) is distinct from the target S (the
training job). Only A transfers between tasks. Training patches never transfer, and private retest results never
feed back into A.

## Trigger conditions
- After each development task (reflect), and during a search when a result explains something reusable (write_memory).

## Required observations (receipt fields)
- The finished task's trace: candidates with changes and verdicts, screens with StepTime and costs, invalid reasons, skill/memory/tool hit logs.

## Rules: what may change
- May edit: skills (conditions, rules, counter-examples, real cases), memory.db entries, retrieval and policy settings within caps, prompts, receipt-analysis tools (JSON analysis subset).
- May not edit: harness, reward, invariants, frozen zone, budgets, tolerances, model weights, the L0 schema, patch guard. They are outside the package.
- A new package must pass selfcheck (schema; skills parse with all sections; tools run on historical receipts; prompts keep placeholders; policy within caps; answer-isolation audit). Otherwise the previous package is kept and the reflection is recorded as invalid_fallback.

## Rules: memory entries
- Format: tags {hardware: [...], model: [...], data: [...]}, slow (config delta, StepTime), fast (config delta, StepTime), outcome, failure_reason, lesson. Tags make retrieval conditional on context; a lesson without tags generalizes blindly.
- Record failures with their mechanism (e.g. "OOM at update 2: lazy moments"), not just "failed".

## Rules: distilling skills
- Write conditions, not answers: "when headroom > X and recompute is full, remove recompute from k layers" rather than "use config c7".
- Keep counter-examples next to the rule: Muon three-phase optimizations have no AdamW counterpart; fastmask needs zero bases or falls back; NUMA binding depends on the node's NUMA layout; an external TP4 suggestion was reordered after timings contradicted it.
- A tool that changed but was never invoked is "unconsumed": it is not evidence of learning. Inheritance counts only when retrieval or tool logs show use.
- Re-solving a task seen before is an answer-isolated re-solve, not an unseen task.

## Allowed actions
- write_memory during search; in reflection: edit skills/policy/prompts/tools, add memory.

## Failure signals
- Package unchanged after a task with clear lessons; selfcheck failures; lessons that name one task's final config; held-out identifiers anywhere in the package (audit failure).

## Verification
- selfcheck passes; audit passes; later tasks' logs show the new skill sections or tools being retrieved/invoked.

## Success case (real)
- Tool inheritance (T5): compare_same_rank_stages.py, written for the FP8 investigation, read the BF16 anchor queue, paired (rank, step) and checked 448 pairs, then produced QSA/prefix/QKV/segsum analyses for later candidates. The row-wise dual-FP64 gate (T2), frozen before a kernel repair, rejected v1 and was reused on two more layer sets. (agentic_moe_sft_tech_report_20261018/RSI_TRACK.md T5, T2)

## Failure case (real)
- RSI pilots of the previous project: pilot-1 10.441060 -> 10.448436 s (retest 10.490263), pilot-2 10.556310 -> 10.607184 s. The A0 package came out unchanged, pilot-2 was interrupted, 0 of 6 formal lineages ran, and the evidence was judged insufficient (pilot-1 had 1 reflection cycle where 2 were needed). Without completed cycles and recorded inheritance, no self-improvement claim is possible. (RSI_TRACK.md 3, 6; rsi_pilot_v1/D1_PILOT_COMPLETION_V1.md)

© InfraRSI A0 (human-authored) · Apache-2.0 · TokenRhythm/InfraRSI

Similar skills

SKILL.md skills catalog →

From the same set19

The whole set →
reflect The reflect Claude Code prompt revises an optimizer package using the trace from a finished task. It turns observed evidence into rules for later tasks instead of carrying over one task’s settings. GP ChatGPT ★ 99repo stars proposer proposer is a Claude Code and ChatGPT prompt that tunes training throughput in InfraRSI by proposing configuration and overlay changes while preserving fixed task settings. GP ChatGPT ★ 99repo stars weak-model-protocol The weak-model-protocol Claude Code skill sets rules for an optimizer driven by a weaker or cheaper language model. It activates when actions are malformed, context runs short, or the provider returns errors. CX Codex +1 ★ 99repo stars optimize-data-path The optimize-data-path Claude Code skill optimizes data and state transfers between the host and GPU without changing the data contract. It is triggered by costly loading, host synchronization, or optimizer-state transfers. CX Codex +1 ★ 99repo stars profile-whole-update The profile-whole-update Claude Code skill measures full-update time and checks whether a change improved the end-to-end update. It comes into play when reviewing profiles, comparing candidates, or tracing delays between steps. CX Codex +1 ★ 99repo stars validate-training-lifecycle The validate-training-lifecycle Claude Code skill checks a model-training run from checkpoint save through fresh-process resume, HF export, and forward comparison. CX Codex +1 ★ 99repo stars optimize-training-kernels The optimize-training-kernels Claude Code skill adjusts fusion settings and attention backends while checking numerical tolerances. It is triggered by slow kernels, proposed kernel changes, or numerical drift. CX Codex +1 ★ 99repo stars recompute-policy The recompute-policy Claude Code skill helps choose full, selective, or no recomputation based on memory headroom and model structure. It activates for activation-checkpointing changes, OOMs, or recompute_modules decisions. CX Codex +1 ★ 99repo stars

Project sponsors

Companies that keep this analytics open