Context Engine

Loads and manages company context for all C-suite advisor skills. Reads ~/.claude/company-context.md, detects stale context (>90 days), enriches conte

What Is Context Engine?

The Context Engine is a specialized skill for the Claude Code ecosystem, designed to load and manage company-specific context for all C-suite advisor skills. Acting as an intelligent memory and orchestration layer, it reads structured company data from a configuration file (~/.claude/company-context.md), assesses its freshness, enriches it during user interactions, and applies strict privacy and anonymization protocols before any external communication. This ensures that every advisor session leverages up-to-date and relevant company information, transforming generic AI advice into nuanced, actionable guidance tailored to the organization’s current situation.

By centralizing the handling of context, the Context Engine enables a seamless experience across multiple advisor modules—be it strategic planning, financial analysis, or operational optimization—ensuring that all skills access a unified and current representation of the company profile. It is the foundational layer for C-level orchestration and decision support within the Claude Skills framework.

Why Use Context Engine?

Generic AI assistance often falls short when faced with the nuanced realities of a specific enterprise. Without contextual awareness, advisor skills may produce advice that is too general, missing critical subtleties unique to your company's stage, market, or operating environment. The Context Engine addresses this gap by:

  • Enabling Contextual Intelligence: Every advisor skill can draw from a single source of truth, ensuring recommendations are grounded in your actual company data.
  • Reducing Redundant Input: Users do not need to repeatedly provide company background information in every session or skill invocation.
  • Improving Advice Quality: Context-aware responses are more relevant, actionable, and credible, directly impacting executive productivity and decision-making quality.
  • Maintaining Privacy: Sensitive company data is protected via built-in anonymization before any external service is called, minimizing data leakage risks.

How to Get Started

Integrating the Context Engine into your Claude advisor setup is straightforward. Here is a step-by-step guide:

1. Install the Skill

Clone the repository and install the dependencies as per the documentation:

git clone https://github.com/alirezarezvani/claude-skills.git
cd claude-skills/c-level-advisor/context-engine
## Follow specific install instructions (e.g., pip install -r requirements.txt)

2. Create the Company Context File

Create a markdown file at ~/.claude/company-context.md containing your company's key information. Example structure:

## Company Context

Company Name: Acme Inc.
Stage: Scaling
Founders: Jane Doe, John Smith
Industry: SaaS
Last updated: 2026-03-01

Summary:
Acme Inc. provides cloud-based workflow automation for small businesses...

Key Metrics:
- Revenue: $12M ARR
- Employees: 80
- Product-Market Fit: Achieved

3. Start a C-Suite Session

Whenever you initiate a C-suite advisor skill, the Context Engine automatically runs its load protocol, checks for the context file, verifies its freshness, and loads the parsed data into working memory for immediate use.

4. Update Stale Context

If the context is older than 90 days, the engine will prompt for a refresh via /cs:update. Keeping this information current ensures all advice remains relevant.

Key Features

  • Automated Context Loading: Detects and loads the company context file at session start. If missing, prompts user setup.
  • Staleness Detection: Checks the Last updated date; prompts for refresh if the context is over 90 days old, but allows override if necessary.
  • Live Context Parsing: Extracts key attributes into memory—stage, founders, industry, summary, and metrics—making them instantly available to all advisor skills.
  • Context Enrichment: Dynamically augments context as relevant information surfaces during conversations.
  • Privacy & Anonymization: Scrubs or masks sensitive data before making any external API calls, enforcing privacy compliance.
  • Orchestration: Serves as the context backbone for all C-suite advisor skills, ensuring synchronized and consistent context sharing.

Example: Load Protocol Implementation (Python-like pseudocode)

def load_company_context():
    context_path = os.path.expanduser('~/.claude/company-context.md')
    if not os.path.exists(context_path):
        prompt_user("Run /cs:setup to build your company context...")
        return None

    context = parse_markdown(context_path)
    last_updated = context.get('Last updated')
    days_old = (datetime.now() - parse_date(last_updated)).days

    if days_old >= 90:
        prompt_user(f"Your context is {days_old} days old. Quick refresh (/cs:update)?")
        if not user_confirms():
            context['STALE'] = True

    return context

Best Practices

  • Maintain Freshness: Regularly update the company-context.md file, especially after major organizational changes (funding, pivots, leadership shifts).
  • Use Structured Data: Stick to a consistent markdown schema for key fields (Company Name, Stage, Last updated, etc.) to ensure reliable parsing.
  • Review Privacy Settings: Clearly flag confidential fields and verify anonymization is functioning as intended before external API calls.
  • Collaborate on Context: Involve relevant stakeholders (e.g., HR, Finance, Product) to keep the context comprehensive and accurate.
  • Audit for Staleness: Respond promptly to staleness prompts; outdated context can degrade the quality of AI-generated advice.

Important Notes

  • The Context Engine is a foundational dependency: it must be loaded before any other C-suite advisor skill for optimal operation.
  • The company-context.md file is stored locally in the user’s home directory. Ensure access permissions are secure.
  • If the context file is missing, no advisor skills will have company-specific grounding—always set up context first.
  • Staleness checks are based on the Last updated field; be diligent in updating this on edits.
  • Privacy mechanisms are enforced before every external call, but sensitive data stewardship remains a user responsibility.
  • The skill is distributed under the MIT License; review the repository for the latest updates and contributions.

By centralizing and automating context management, the Context Engine elevates the effectiveness of all C-suite advisor skills within Claude, ensuring every recommendation is timely, relevant, and secure.