save-bugfix

save-bugfix is a skill for Claude Code, Codex from hifriendbot/cogmemai-mcp. It costs 97 tokens per session (1,269 once invoked), scanned A, original, MIT.

A workflow rule that records the symptom, cause, and fix whenever a software bug or incident is resolved in CogmemAi, a searchable memory system.

In plain words
What is it for?
Use it after fixing bugs, diagnosing flaky tests, resolving production incidents, or finding non-obvious workarounds.
Why use it?
It prevents developers from repeating investigations whose solutions were already found but forgotten or buried in old messages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after fixing bugs, diagnosing flaky tests, resolving production incidents, or finding non-obvious workarounds.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hifriendbot/cogmemai-mcp/save-bugfix
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 hifriendbot/cogmemai-mcp --skill save-bugfix
Clone the repo
git clone --depth 1 https://github.com/hifriendbot/cogmemai-mcp

Made for: Claude Code, Codex.

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 save-bugfix

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hifriendbot/cogmemai-mcp/save-bugfix"><img src="https://agentmods.dev/badge/skills/hifriendbot/cogmemai-mcp/save-bugfix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 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.
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.00097 $0.01269
Opus 5.5 $0.00039 $0.00508
Sonnet 5.5 $0.00019 $0.00254
Haiku 4.5 $0.00010 $0.00127

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

Security

Grade A, and why

save-bugfix 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.

skill/save-bugfix/SKILL.md · 107 lines

How it starts

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

Save Every Bugfix with CogmemAi

Every team wastes hours re-debugging problems that someone already solved. The fix lives in someone's head, buried in Slack, or attached to an old Jira ticket nobody can find. CogmemAi solves this: every bugfix gets saved as a searchable memory, and every new bug starts with a search instead of from-scratch debugging.

This skill is the save half of that loop. Pair it with the search-before-debugging skill for the recall half.

When to Use

Trigger immediately on any of these signals:

  • A bug was just fixed and the test/build is now passing
  • A flaky test was diagnosed and the root cause identified
  • A production incident was resolved
  • The user says: "got it", "that fixed it", "it works now", "nailed it", "found it", "the problem was X"
  • A non-obvious workaround was applied
  • An error message has been understood and resolved

Do not wait for the user to ask. Save proactively the moment the fix is verified.

What to Save

Use save_memory with memory_type: "bug" and capture all four parts. Skipping any of them makes the memory useless for future recall.

1. Symptom (what broke)

The exact error message or observable behavior. Future-you will search for this. Include:

  • Verbatim error text or stack trace summary
  • Affected component, file, or service
  • Conditions under which it appeared (browser, OS, request volume, time of day)

2. Root cause (why it broke)

The actual underlying reason, not the surface trigger. "Login failed because the JWT signing key was rotated last week but the auth service cached the old key in memory." Not "login failed."

3. Fix (what made it work)

The concrete change. Include the file path and the nature of the edit. "Added a 60-second TTL to the JWT key cache in src/auth/keystore.ts." Not "fixed the cache."

4. Why this fix works (mechanism)

One sentence on the mechanism so future readers can judge whether the same fix applies to a similar bug. "Forces re-fetch when keys rotate, at the cost of one extra round trip per minute under load."

Read the full file on GitHub · 107 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 · 107 lines · 97 tokens per session scan A b904ce50a17e

Subscribe to this mod's changes

save-bugfix is a skill published in the GitHub repository hifriendbot/cogmemai-mcp (7 stars, last pushed today), licensed MIT. It adds 97 tokens to every session and 1,269 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-31.

Related

Other skills, from other repositories

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

md-audit

Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…

chaitanyagiri/munder-difflin · 85 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

code-understand

Map the load-bearing files, symbols, callers, and dependencies of an unfamiliar codebase before making changes. Use for architecture orientation, impact analysis, what-would-break questions, or finding callers. Uses CodeGraph when available and a dependency-free builtin fallback.

Ar9av/obsidian-wiki · 55 tokens

exploiting-format-string-vulnerabilities

Methodology for exploiting format string bugs where attacker-controlled data reaches the format argument of printf-family functions, enabling stack/memory disclosure (info leaks for ASLR/PIE/canary defeat) and arbitrary write primitives (%n) to hijack control flow via GOT/.finiarray overwrites.

xalgorix/xalgorix · 69 tokens