context-optimizer

Refresh AI memory from GEMINI.md and TDD policy via MCP token sync.

1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/hdkz-dev/multi-game-engines --skill context-optimizer-hdkz-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-optimizer
Source: https://github.com/hdkz-dev/multi-game-engines/tree/main/.agent/skills/context-optimizer
Command: npx skills add https://github.com/hdkz-dev/multi-game-engines --skill context-optimizer-hdkz-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill refreshes and optimizes the project context to prevent drift or hallucinations in AI agents by aligning their understanding with the project's single source of truth.

Core Features & Use Cases

  • Re-loads the authoritative project context from the central sources (GEMINI.md and docs/TEST_DRIVEN_DEVELOPMENT_POLICY.md) to remove outdated information.
  • Synchronizes memory and environment state by executing MCP token synchronization and querying the mcp-memory-service for relevant historical context.
  • Checks current work progress by inspecting docs/TASKS.md and docs/PROGRESS.md to identify active tasks and recent changes.
  • Supports repetitive context refresh during long-running sessions to maintain consistent decision-making and task tracking.

Quick Start

Command the system to refresh the context by invoking the skill with a request to re-sync the project's context and memory.

Frequently Asked Questions about context-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI agent hallucinations and context drift in long-running sessions?

Refresh AI memory by re-syncing with the project's single source of truth. Reloading authoritative context from GEMINI.md and test-driven development policies removes outdated information and stabilizes agent understanding.

What is the best way to synchronize MCP tokens and memory for an AI agent?

Synchronize MCP tokens by running the MCP token sync script and querying the mcp-memory-service. This reconstructs the current context, aligns memory state, and prevents drift during active development sessions.

How do I refresh AI context to align with task management documents?

Refresh AI context by loading project task management documents. Inspecting docs/TASKS.md and docs/PROGRESS.md identifies active tasks and recent changes, ensuring the agent's decision-making aligns with current work progress.

When should I perform a context refresh on my AI agent?

Perform a context refresh during sessions where the agent risks drift, hallucinations, or requires token synchronization. Repetitive refresh in long-running sessions maintains consistent decision-making and accurate task tracking.

Does context optimization require specific project files to function?

Context optimization requires specific project files to establish a single source of truth. It loads GEMINI.md and docs/TEST_DRIVEN_DEVELOPMENT_POLICY.md, and checks docs/TASKS.md and docs/PROGRESS.md to reconstruct context.