Agent skill

Learning From Corrections

by noemuch in noemuch/bridge

A skill your agent uses when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual…

MITAuto-check passedFrontend & Design

Install Learning From Corrections

skills CLI
$ npx skills add noemuch/bridge --skill learning-from-corrections -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install noemuch/bridge learning-from-corrections --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/noemuch/bridge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/learning-from-corrections .claude/skills/learning-from-corrections && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
learning-from-corrections
GitHub stars
156
Token cost
~2.4k tokens
SKILL.md length
879 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual…

  • Works in 12 steps: Load artifacts → Re-extract current Figma state → Diff snapshot vs current state → …
  • The user says they adjusted the design in Figma
  • SKILL.md covers Overview, When to Use, Procedure and Prerequisites, plus 4 more sections
  • Calls make

What it does

Learning From Corrections is an agent skill from noemuch/bridge. Use when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual Figma edits back into the spec. Diffs the current Figma state against the last snapshot, classifies each change as a DS learning or a hardcoded flag, persists learnings, and patches the active recipe.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with Figma. The repository describes itself as: Design in Figma with Claude Code. Bridge connects your terminal to the Figma Plugin API via WebSocket. The licence is MIT.

When your agent uses it

  • The user says they adjusted the design in Figma
  • Wants the system to incorporate manual Figma edits back into the spec

Example prompts

  • “correct”
  • “learn from”
  • “I changed”
  • “/learning-from-corrections”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Load artifacts
  2. Re-extract current Figma state
  3. Diff snapshot vs current state
  4. Classify changes
  5. Save learnings
  6. Extract flags
  7. Check recipe patch eligibility
  8. Update CSpec
  9. Save learnings file
  10. Update snapshot
  11. Report
  12. Offer next step

What it can do on your machine

Read from SKILL.md and the folder at commit 414977f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Learning From Corrections loads about 2.4k tokens when it runs. Until then it costs about 101 tokens; SKILL.md has 879 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from noemuch/bridge at commit 414977f, republished under its MIT licence (© noemuch). 879 words, ~2,440 tokens.

Download SKILL.mdSave it as .claude/skills/learning-from-corrections/SKILL.md (or your agent's skills folder).
name
learning-from-corrections
description
Use when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual Figma edits back into the spec. Diffs the current Figma state against the last snapshot, classifies each change as a DS learning or a hardcoded flag, persists learnings, and patches the active recipe.

{{ACTIVE_RULES}}

Learning From Corrections

Overview

Closes the feedback loop from manual Figma edits back into Bridge's knowledge base. Diffs the live Figma state against the saved snapshot, classifies each correction as a LEARNING (DS-compliant → persisted) or a FLAG (hardcoded → surfaced), updates learnings.json, and auto-patches the active recipe when eligible.

When to Use

Invoke when the user:

  • says "I adjusted it", "I fixed it in Figma", "fix", "correct", or "learn from what I changed"
  • has an active CSpec in specs/active/ with a snapshot

Do NOT use if:

  • there is no active CSpec — the user should make first (use generating-figma-design)
  • the user wants to start fresh — use generating-figma-design with a new description
  • the user wants to ship — use shipping-and-archiving

Procedure

Before starting, load:

  • references/transport-adapter.md (repo-root) — for Figma state re-read
  • references/compiler-reference.md (repo-root) — for scene graph recompile (if re-executing after fix)

Prerequisites

  • Active CSpec in specs/active/ (abort if missing: "No active CSpec. Run: make <description>")
  • Snapshot file exists at specs/active/{name}-snapshot.json (abort if missing: "No snapshot found. The design must have been generated with make. Run make first.")
  • Figma MCP transport available (see references/transport-adapter.md (repo-root) Section F)

1. Load artifacts
  • Read the active CSpec from specs/active/{name}.cspec.yaml
  • Read the snapshot from specs/active/{name}-snapshot.json
  • Read existing learnings from knowledge-base/learnings.json (create empty structure if file doesn't exist)
  • Load knowledge-base/registries/variables.json for token resolution
2. Re-extract current Figma state

Run a node tree extraction script via Plugin API execution, using the rootNodeId and fileKey from the snapshot's meta.

Console transport:

figma_execute({
  code: "return (async function() { ... extraction script with rootNodeId ... })();"
})

Official transport:

use_figma({
  fileKey: "{fileKey}",
  description: "Re-extract node tree for fix diff",
  code: "... extraction script without IIFE wrapper ..."
})

The extraction script walks the node tree and captures: id, name, type, layoutMode, itemSpacing, padding*, cornerRadius, fills, boundVariables, width, height, componentKey, children.

3. Diff snapshot vs current state

Compare the two JSON trees in context. Claude performs this comparison directly.

Match strategy:

  • Match nodes by id (stable across edits)
  • For each matched node, compare:
    • Layout: layoutMode, itemSpacing, paddingTop/Bottom/Left/Right
    • Visual: cornerRadius, fills, boundVariables
    • Size: width, height
    • Component: componentKey (detect swapped components)
  • Detect added nodes (present in current, absent in snapshot)
  • Detect removed nodes (present in snapshot, absent in current)
  • Detect property changes (same node, different values)

Ignore:

  • Pure name changes (layer renaming)
  • Position changes (x, y) unless they indicate a structural move (re-parenting)
4. Classify changes

For each detected change:

Does the new value use a DS token (bound variable)?
  -> YES: Classify as LEARNING (DS-compliant correction)
  -> NO (hardcoded hex, raw px, unbound): Classify as FLAG (needs attention)

Token resolution: Check boundVariables in the current tree. If the property has a bound variable ID, resolve it against registries/variables.json to get the token name.

5. Save learnings

For each LEARNING-classified change:

  1. Determine context:

    • screenType: from the CSpec's meta.pattern or intent
    • component: nearest component ancestor name, or the node's own name if it's a component instance
    • section: parent frame name (e.g., "header", "content", "sidebar")
  2. Check for existing learning: Search learnings.json for a learning with matching context + change.property + change.to.token

    • If found: increment signals, append to history
    • If not found: create new learning entry
  3. Generate rule: Write a human-readable rule describing the preference (e.g., "For settings screens, cards use spacing/medium (not large)")

  4. Check promotion: After updating signals, check if any contextual learning qualifies for global promotion:

    • signals >= 3
    • Observations from >= 2 different screenType values
    • No contradiction (same property pointing to different tokens in different learnings)
Show full SKILL.md (372 more words)Show less
6. Extract flags

For each FLAG-classified change:

  1. Create a flag entry with the CSpec name, node description, and what was hardcoded
  2. Add to flags array in learnings.json
  3. Suggest the correct DS token if one exists: "Node {name} uses hardcoded {value}. Consider using {$token} instead."
7. Check recipe patch eligibility

If a recipe was used (check snapshot.meta.recipe):

  1. Count the number of LEARNING signals from this fix cycle
  2. If signals >= 2 for the same recipe context:
    • Load the recipe file
    • Patch the recipe's graph to reflect the learned changes
    • Increment recipe version, update lastEvolvedAt
    • Add entry to recipe evolution_log
    • Report: "Recipe {name} patched with {n} corrections (v{version})"

If a learning is promoted to global scope, scan ALL recipes and patch any where the change applies.

8. Update CSpec

If learnings were extracted (DS-compliant changes):

  • Update the active CSpec's token references to match the corrected values
  • This ensures the CSpec reflects the final intended design
9. Save learnings file

Write updated learnings.json to knowledge-base/learnings.json. Update meta.lastUpdated to today's date.

10. Update snapshot

Re-save the snapshot with the current Figma state (so future fix runs diff against the latest corrections, not the original generation).

11. Report
markdown
## Fix: {name}

### Changes detected: {total count}

### Learnings extracted: {count}
| # | Context | Property | From | To | Rule |
|---|---------|----------|------|----|------|
| 1 | settings / card | itemSpacing | spacing/large (24) | spacing/medium (16) | Cards in settings use medium spacing |

### Flags: {count}
| # | Node | Issue | Suggestion |
|---|------|-------|------------|
| 1 | StatusBadge | Hardcoded hex #FF5722 | Use $color/text/error/default |

### Recipe patches: {count}
- Recipe "{name}" v{version}: {description of patch}

### Promotions: {count}
- "{rule}" promoted to global (signals: {n}, screenTypes: {list})

### CSpec updated: {yes/no}
{list of CSpec changes if any}
12. Offer next step
Fix complete for {name}.

Learnings: {n} extracted ({n} new, {n} reinforced, {n} promoted)
Flags: {n} hardcoded values flagged
Recipe: {patched | not applicable}

Options:
  - Continue editing in Figma, then run `fix` again
  - "done" to archive and ship

Transition

  • If user wants to continue editing -> they can run fix again after more changes
  • When satisfied -> suggest: "Run: done" (handled by shipping-and-archiving)
<HARD-GATE>
Every correction MUST be classified before `learnings.json` is written.
Unclassified changes are a gate failure.

Every LEARNING MUST reference a token from the current registries/variables.json / registries/text-styles.json. A LEARNING that points to a non-existent token is a gate failure.

Every FLAG MUST be surfaced to the user before saving the snapshot. </HARD-GATE>

Red Flags

See the full catalog at references/red-flags-catalog.md (repo-root).

Top flags for this skill:

  • "I'll store this hardcoded hex as a LEARNING for later" → Flags are for DS gaps; hardcoded values are FLAGs, not learnings.
  • "I can tell what changed without re-reading Figma" → Always re-read Figma. Memory is not a snapshot.

Verification

This skill is gated by references/verification-gates.md (repo-root):

  • Gate A — only applies if the fix recompiles the scene graph (rare, optional).
  • Gate B — applies if the fix re-executes in Figma.

Evidence to surface: diff summary, classification table, updated learnings.json diff.


The fix flow (decision diagram)

dot
digraph fix_flow {
  "User says 'fix'" [shape=doublecircle];
  "Diff Figma vs snapshot" [shape=box];
  "DS-compliant changes?" [shape=diamond];
  "Hardcoded primitives?" [shape=diamond];
  "Persist as LEARNING" [shape=box];
  "Surface as FLAG" [shape=box style=filled fillcolor=lightyellow];
  "Recipe eligible?" [shape=diamond];
  "Auto-patch recipe" [shape=box];
  "Update snapshot" [shape=doublecircle style=filled fillcolor=lightgreen];

  "User says 'fix'" -> "Diff Figma vs snapshot";
  "Diff Figma vs snapshot" -> "DS-compliant changes?";
  "DS-compliant changes?" -> "Persist as LEARNING" [label="yes"];
  "DS-compliant changes?" -> "Hardcoded primitives?" [label="check next"];
  "Hardcoded primitives?" -> "Surface as FLAG" [label="yes"];
  "Persist as LEARNING" -> "Recipe eligible?";
  "Recipe eligible?" -> "Auto-patch recipe" [label="yes"];
  "Auto-patch recipe" -> "Update snapshot";
  "Recipe eligible?" -> "Update snapshot" [label="no"];
  "Surface as FLAG" -> "Update snapshot";
}

© noemuch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/learning-from-corrections of noemuch/bridge.

Open the folder on GitHubat commit 414977f

Compare with similar skills

Learning From Corrections next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Learning From Corrections compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Learning From Corrections this skillnoemuch/bridge156—~2.4kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma Design to Codewarpdotdev/warp65k4 repos~2.9kAutomated safety check: PassAGPL-3.0
Figma Design System Rules Generatorwarpdotdev/warp65k3 repos~4.6kAutomated safety check: PassAGPL-3.0
Figma Code Connect Componentswarpdotdev/warp65k2 repos~4.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Figma Design to Code

    warpdotdev/warp

    Turns a Figma frame or component into production code that matches the design, using the Figma MCP server and the project's own design system.

    65k GitHub starsUsed in 4 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Creates project-specific design system rules from your codebase so coding agents implement Figma designs with your components, naming and tokens.

    65k GitHub starsUsed in 3 repos~4.6k tokens
    Frontend & DesignAuto-check passed
  • Maps published Figma components to their code implementations with Code Connect, using the Figma MCP suggestion and mapping tools.

    65k GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed
  • Cc Design

    ZeroZ-lab/cc-design

    High-fidelity HTML design and prototype creation. An agent skill from ZeroZ-lab/cc-design.

    827 GitHub stars~2.2k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check: notes

More from noemuch/bridge

  • A skill your agent uses when the user requests to design, create, build, generate, or make a new Figma component or screen — including phrases like "make a button", "design a settings page", "build…

    156 GitHub stars~4.6k tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when the user says "setup", "setup bridge", "extract", "extract DS", "onboard", "build knowledge base", "initialize bridge", or is starting Bridge in a project for the first…

    156 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • A skill your agent uses when the user says "done", "ship it", "finish", "complete", "archive", or otherwise indicates the current design is ready to be shipped.

    156 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Using Bridge

    noemuch/bridge

    A skill your agent uses when any Bridge command is invoked (make, fix, done, setup, drop, status) or any Figma / design-system / compiler / Bridge workflow topic is raised.

    156 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Learning From Corrections

What does Learning From Corrections do?

A skill your agent uses when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual…. Learning From Corrections is an agent skill from noemuch/bridge. Use when the user says they adjusted the design in Figma, mentions "fix", "correct", "learn from", "I changed", "diff", "what changed", or wants the system to incorporate manual Figma edits back into the spec.

When should I use Learning From Corrections?

Learning From Corrections fits situations like: the user says they adjusted the design in Figma; wants the system to incorporate manual Figma edits back into the spec.

How do I install Learning From Corrections in Claude Code?

Run `npx skills add noemuch/bridge --skill learning-from-corrections -a claude-code`. Or copy the skill folder (skills/learning-from-corrections in noemuch/bridge) into .claude/skills/learning-from-corrections in your project. Claude Code loads it when a task matches its description.

How do I install Learning From Corrections in Codex?

Run `npx skills add noemuch/bridge --skill learning-from-corrections -a codex`. Or copy the skill folder (skills/learning-from-corrections in noemuch/bridge) into .agents/skills/learning-from-corrections in your project. Codex loads it when a task matches its description.

Can I use Learning From Corrections in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add noemuch/bridge --skill learning-from-corrections -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/learning-from-corrections, .gemini/skills/learning-from-corrections, .github/skills/learning-from-corrections and .opencode/skills/learning-from-corrections in your project.

What does Learning From Corrections need to run?

Going by SKILL.md and its folder, Learning From Corrections needs the command-line tools its instructions call (make).

Does Learning From Corrections access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Learning From Corrections safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Learning From Corrections use?

Learning From Corrections is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Learning From Corrections use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Learning From Corrections?

Skills that share tags, products or a category with Learning From Corrections: Figma Design System Builder (warpdotdev/warp, 65k stars), Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars), Figma Design to Code (warpdotdev/warp, 65k stars) and Figma Design System Rules Generator (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Learning From Corrections?

noemuch (a GitHub user) maintains it in noemuch/bridge, which has 156 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on June 3, 2026.

Source: noemuch/bridge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.