code-refactoring-context-restore

code-refactoring-context-restore is a skill for Claude Code, Codex from bugrabilge/bilge-development-kit. It costs 16 tokens per session (1,181 once invoked), scanned A, a copy of code-refactoring-context-restore, MIT.

A guide for recovering and rebuilding project information during code refactoring and other complex work involving multiple AI agents.

In plain words
What is it for?
Use it to clarify the information needed, reconstruct missing project context, apply relevant practices, and check that the restored understanding is correct.
Why use it?
It helps prevent important project knowledge, decisions, and constraints from being lost when work is interrupted or moved between agents.

Skill for Claude CodeCodex

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

Good fit Use it to clarify the information needed, reconstruct missing project context, apply relevant practices, and check that the restored understanding is correct.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore
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 bugrabilge/bilge-development-kit --skill code-refactoring-context-restore
Clone the repo
git clone --depth 1 https://github.com/bugrabilge/bilge-development-kit

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 code-refactoring-context-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore/github.svg)](https://agentmods.dev/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore)
Your own site
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore/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 code-refactoring-context-restore

Your own site · 80×15
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/code-refactoring-context-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,181 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 95% copy Near-identical to another mod 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.00016 $0.01181
Opus 5.5 $0.00006 $0.00472
Sonnet 5.5 $0.00003 $0.00236
Haiku 4.5 $0.00002 $0.00118

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

Security

Grade A, and why

code-refactoring-context-restore 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.

Origin

This is a copy

95% identical to code-refactoring-context-restore — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills-extra/code-refactoring-context-restore/SKILL.md · 182 lines

How it starts

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

Context Restoration: Advanced Semantic Memory Rehydration

Use this skill when

  • Working on context restoration: advanced semantic memory rehydration tasks or workflows
  • Needing guidance, best practices, or checklists for context restoration: advanced semantic memory rehydration

Do not use this skill when

  • The task is unrelated to context restoration: advanced semantic memory rehydration
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Role Statement

Expert Context Restoration Specialist focused on intelligent, semantic-aware context retrieval and reconstruction across complex multi-agent AI workflows. Specializes in preserving and reconstructing project knowledge with high fidelity and minimal information loss.

Context Overview

The Context Restoration tool is a sophisticated memory management system designed to:

  • Recover and reconstruct project context across distributed AI workflows
  • Enable seamless continuity in complex, long-running projects
  • Provide intelligent, semantically-aware context rehydration
  • Maintain historical knowledge integrity and decision traceability

Core Requirements and Arguments

Input Parameters

  • context_source: Primary context storage location (vector database, file system)
  • project_identifier: Unique project namespace
  • restoration_mode:
    • full: Complete context restoration
    • incremental: Partial context update
    • diff: Compare and merge context versions
  • token_budget: Maximum context tokens to restore (default: 8192)
  • relevance_threshold: Semantic similarity cutoff for context components (default: 0.75)

Advanced Context Retrieval Strategies

1. Semantic Vector Search

  • Utilize multi-dimensional embedding models for context retrieval
  • Employ cosine similarity and vector clustering techniques
  • Support multi-modal embedding (text, code, architectural diagrams)

Read the full file on GitHub · 182 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 · 182 lines · 16 tokens per session scan A af1284381680

Subscribe to this mod's changes

code-refactoring-context-restore is a skill published in the GitHub repository bugrabilge/bilge-development-kit (10 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 1,181 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to code-refactoring-context-restore, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

forget

Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…

asgeirtj/system_prompts_leaks · 74 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

shellm

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

laude-institute/headlong · 49 tokens