The Problem

Developers using Claude‑Code, OpenCode, Cursor, Antigravity, Gemini‑CLI, or similar AI‑coding assistants need a reliable way to inject high‑quality, token‑efficient context (prompts, rules, and sub‑agents) without bloating the model’s input window. Maintaining that context manually is error‑prone and costly in token budget.

What This Does

The Context‑Engineering‑Kit (CEK) ships a curated marketplace of “skills”, “commands”, and “agents” that are loaded on demand. Each plugin lives under plugins/ and contains self‑contained definitions (e.g., plugins/sdd/README.md, plugins/reflexion/hooks/src/index.ts). The kit follows the agentskills.io spec, so agents can be composed, extended, or swapped without touching the core.

Key files:

  • plugins/reflexion/hooks/src/index.ts – the primary entry point for the Reflexion plugin, exporting hook functions used by Claude‑Code.
  • plugins/reflexion/hooks/package.json & tsconfig.json – define the TypeScript build and runtime dependencies for the hook.
  • plugin.json (root) – lists the marketplace metadata consumed by the host IDE/CLI.
  • docs/ – 140 markdown files describing each plugin’s intent, usage, and best‑practice patterns.

How It Is Wired

  1. Startup – When Claude‑Code loads a marketplace (.claude-plugin/marketplace.json), it reads each plugin’s plugin.json to discover available agents/commands.
  2. Entry → Hook – Execution of a Reflexion‑based command starts at plugins/reflexion/hooks/src/index.ts. This file exports runReflexion(context) which: - Imports helper modules from the same folder (./critique, ./memorize, ./reflect). - Calls invokeAgent(context, "reflexion") (defined in the shared runtime located under .claude/commands/). - Returns a structured response that the host IDE injects back into the user’s prompt.
  3. Agent/Skill Loading – Each plugin’s README.md (e.g., plugins/sdd/README.md) documents how its agents (e.g., spec-driven-developer, code-reviewer) are instantiated. The agents reference the shared skill files in agents/ (e.g., agents/code-reviewer.md). Those markdown files are parsed at runtime to form prompt fragments.
  4. Dependency Scope – The only compiled code lives in plugins/*/hooks/ (currently Reflexion). All other plugins are pure markdown; they incur no build cost and are loaded lazily. This keeps the blast radius small: a change to a markdown skill only affects its own prompts, not the TypeScript runtime.
  5. Export Chainplugins/reflexion/hooks/src/index.tsrunReflexioninvokeAgent (in .claude/commands/) → Claude‑Code’s execution engine. No circular imports are present; the hook acts as the sole hub for compiled code.

How To Use It

# Clone the repo (use the exact URL requested)
git clone https://github.com/moses-y/context-engineering-kit
cd context-engineering-kit

# Install the only compiled plugin (Reflexion) – npm is implied by package.json
npm install --prefix plugins/reflexion/hooks
# No lockfile is present; consider generating one (npm ci) for reproducibility.

# Register the marketplace in Claude‑Code:
#   1. Open Claude‑Code > Settings > Plugins
#   2. Add the path to `.claude-plugin/marketplace.json`

# Activate a plugin, e.g., Spec‑Driven Development:
#   In Claude‑Code, run the command “install sdd” (documented in docs/plugins/sdd/README.md)

If you prefer a containerised workflow, the repository includes a justfile with a just build target that runs tsc for the Reflexion hook.

Real‑World Use

A team building a microservice can enable the Spec‑Driven Development (SDD) plugin. When a developer writes a new endpoint, the spec-driven-developer agent automatically generates an Arc42‑style spec, then hands the code to the code-reviewer agent. The reviewer applies DDD/SOLID rules (from plugins/ddd/README.md) and returns a diff, all within the same Claude‑Code session, saving manual PR reviews.

Code Health & Issues

  • Low – Missing lockfileplugins/reflexion/hooks/package.json declares dependencies without a package-lock.json or pnpm-lock.yaml; builds are not reproducible.
  • Low – Test coverage – 57 test files exist, but the majority are markdown‑based specifications; there are no executable unit tests for the TypeScript hook.
  • Low – CI only for sync.github/workflows/sync-provider-formats.yml runs a sync script but does not lint, type‑check, or run tests on PRs.
  • Low – Single compiled entry – All functional code lives in one TypeScript module, which limits scalability but also reduces complexity.

No high‑severity security or licensing concerns are evident; the repository includes an SPDX‑compatible GPL‑3.0 license.

The Bottom Line

CEK provides a well‑structured, markdown‑first marketplace for augmenting Claude‑Code with proven context‑engineering patterns. It excels for teams that want token‑efficient prompt composition without a heavy build pipeline. The primary drawback is the lack of a lockfile and automated test/CI for the compiled hook, which could affect reproducibility for production deployments. Use it if you need plug‑and‑play prompt assets and are comfortable managing the single TypeScript dependency manually.