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
npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/learn-optimization-skills/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/learn-optimization-skills/
1Skills CLI (Vercel)
npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a codex2Manually: put the files in place
.agents/skills/learn-optimization-skills/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a cursor2Manually: put the files in place
.cursor/skills/learn-optimization-skills/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install TokenRhythm/InfraRSI skills/learn-optimization-skills2Manually: put the files in place
.github/skills/learn-optimization-skills/SKILL.md1Skills CLI (Vercel)
npx skills add TokenRhythm/InfraRSI --skill learn-optimization-skills -a gemini-cli2Platform CLI
gemini skills install https://github.com/TokenRhythm/InfraRSI --path skills/learn-optimization-skillsManually: put the files in place
.devin/skills/learn-optimization-skills/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → 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