backpropagation

backpropagation is a skill for Claude Code from LucasDuys/forge. It costs 27 tokens per session (2,400 once invoked), scanned A, original, MIT.

A workflow that traces a runtime bug back to a missing or unclear requirement in the specification, then updates the specification and creates a regression test.

In plain words
What is it for?
Use it with a bug report or failing test to identify the affected requirement, close the specification gap, generate a test, and record the correction.
Why use it?
Fixing one bug does not prevent it from returning if the expected behavior was never written down or tested. This process records the lesson for future work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forge plugin — 10 skills, 13 commands, 9 agents, 3 hooks shipped together

Good fit Use it with a bug report or failing test to identify the affected requirement, close the specification gap, generate a test, and record the correction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lucasduys/forge/backpropagation
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.

Any agent
npx skills add LucasDuys/forge --skill backpropagation
Clone the repo
git clone --depth 1 https://github.com/LucasDuys/forge

Made for: Claude Code.

Or install forge, the plugin that ships this one along with the rest of its 10 skills, 13 commands, 9 agents, 3 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 backpropagation

README.md
[![agentmods](https://agentmods.dev/badge/skills/lucasduys/forge/backpropagation/github.svg)](https://agentmods.dev/skills/lucasduys/forge/backpropagation)
Your own site
<a href="https://agentmods.dev/skills/lucasduys/forge/backpropagation"><img src="https://agentmods.dev/badge/skills/lucasduys/forge/backpropagation/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 backpropagation

Your own site · 80×15
<a href="https://agentmods.dev/skills/lucasduys/forge/backpropagation"><img src="https://agentmods.dev/badge/skills/lucasduys/forge/backpropagation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,400 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.00027 $0.02400
Opus 5.5 $0.00011 $0.00960
Sonnet 5.5 $0.00005 $0.00480
Haiku 4.5 $0.00003 $0.00240

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

Security

Grade A, and why

backpropagation 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 1mo 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/backpropagation/SKILL.md · 223 lines

How it starts

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

Backpropagation Skill

You are running the Forge backpropagation workflow. Your job is to trace a runtime bug back to a specification gap, update the spec to close that gap, generate a regression test, and log the correction for systemic pattern detection.

Inputs

You will receive:

  • Bug description: Natural-language description of the bug, or test failure output + test source code (from --from-test mode)
  • Test file path (optional): Path to the failing test, if --from-test was used
  • Test source code (optional): Contents of the failing test file
  • Spec files: List of spec files in .forge/specs/

Workflow

Step 1: TRACE — Which spec?

Find the spec and requirement that should have prevented this bug.

  1. Read all spec files in .forge/specs/. For each spec, extract:

    • Domain name (from frontmatter)
    • All R-numbered requirements and their acceptance criteria
    • The linked_repos field (to know which repos are involved)
  2. Analyze the bug description (and test failure output if available) to determine:

    • What component or feature is affected?
    • What behavior went wrong?
    • What was the expected behavior?
  3. Match the bug to the most relevant spec and requirement:

    • Use keyword matching between the bug description and requirement names/descriptions
    • Use code context: if the bug mentions specific files, endpoints, or functions, grep the spec for those references
    • If --from-test was used: read the test source code to understand which feature it tests, cross-reference with spec requirements
  4. If no spec appears to cover this area at all, note this as a potential "missing requirement" gap and pick the closest spec by domain.

  5. Present your finding to the user:

    Traced to: spec-{domain}.md > R{NNN}: {requirement name} Reasoning: {why this requirement is the match}

Step 2: ANALYZE — What was missed?

Determine exactly what the spec's acceptance criteria failed to cover.

  1. Read the identified requirement's acceptance criteria in full.

Read the full file on GitHub · 223 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. 1mo ago First seen · 223 lines · 27 tokens per session scan A f61d3498eda0

Subscribe to this mod's changes

backpropagation is a skill published in the GitHub repository LucasDuys/forge (56 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 2,400 once invoked, about $0.0001 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

Other skills, from other repositories

maintain-formal-verification-skill

Bring a project's formal verification back in line with the code after the code changes: find the commits that touched verified code, update the model, harness, or properties to describe the code as it is now, rerun, and say whether each failure is drift in the verification or a bug in the code. Use for…

michael-denyer/pstack-claude · 107 tokens

evidence-audit

Evidence-led audit/fix rounds for any codebase in any language. Finds only defects that a runnable proof reproduces on current code, applies the narrowest in-scope patch, verifies with a second proof, promotes high-risk proofs to permanent regression tests, and reports exact validation results. Use whenever the user…

WrongStack/WrongStack · 152 tokens

debugging

Use this skill when something is broken and the cause is unknown — a failing test, a crash, an error message, wrong output, a regression, a hang, or behaviour that differs between environments — and it has to be found and fixed at the root. Also use it to build the failing proof for a suspected defect before fixing…

WrongStack/WrongStack · 148 tokens

prevent-recurrence

Use when correcting an issue or failure reveals a reusable prevention lesson, including code, setup, measurement, validation, workflow, agent mistakes, or accepted code-review findings; when someone says "this keeps happening" or asks how to stop it; or in post-incident follow-up. Fixes the instance (failing-first…

closedloop-ai/claude-plugins · 133 tokens

refactor-ops

Safe refactoring patterns - extract, rename, restructure with test-driven methodology and dead code detection. Use for: refactor, refactoring, extract function, extract component, rename, move file, restructure, dead code, unused imports, code smell, duplicate code, long function, god object, feature envy, DRY…

0xDarkMatter/claude-mods · 95 tokens

pair-programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

frankxai/claude-skills-library · 85 tokens