It is built with AI assistance, and it ultimately builds AI.

For .NET developers who change the agent in their own code.

GitHub

The agent is in the terminal you already use.

Crystal Code runs in the repository you opened and streams the model and tool loop in the terminal. The host keeps approval, workspace limits, and timeouts.

Change the tools, prompts, and skills it uses from the same workspace.

Built on modern .NET

One self-contained front end today. A separate engine ready for another tomorrow.

One executable

Crystal Code ships as a self-contained .NET binary. There is no Node runtime underneath the agent.

One shared engine

Sessions, approval, compaction, and tools live in a library, separate from the terminal UI.

Ready for the desktop.

A future desktop client can reference the same engine. No desktop client is available today.

Build on the engine

Review with a second model.

Review is automatic approval without full pass-through. The main agent proposes a side-effecting call, another model checks the task, command, and risk, then allows it or returns a denial to the agent.

  • Forbidden actions still cannot pass.
  • The reviewer can be a different provider and model.
  • Turning off the separate reviewer does not turn off Review.
  • If review fails, the host falls back to you.
Review and approval in the user guide
config.jsonexample
{
  // Review mode: another model checks side-effecting calls.
  "approval": "review",

  "approvalModel": {
    // true uses a separate reviewer.
    // false or omitted keeps Review on and uses the session model.
    "enabled": true,
    "provider": "deepseek",
    "model": "deepseek-flash",
    "thinkingEffort": "max"
  }
}

Comments are explanatory. config.json is JSON and does not accept comments.

Keep the context that matters.

Long sessions do not have to end at the context window. Automatic compaction summarizes older turns and keeps a recent tail, while the full conversation stays on disk.

  • Choose when automatic compaction starts.
  • Use a separate summarizer, or the session model.
  • Turning off the separate summarizer does not turn off compaction.
  • Control how much recent work is protected when old tool output is cleared.
Compaction in the user guide
config.jsonexample
{
  // Compact at 80% of the selected context window.
  "compactionThreshold": 0.8,

  "compactionModel": {
    // true uses a separate summarizer.
    // false or omitted keeps compaction on and uses the session model.
    "enabled": true,
    "provider": "deepseek",
    "model": "deepseek-flash",
    "thinkingEffort": "default"
  },

  "microCompaction": {
    // Replace old successful tool results before each model call.
    "enabled": true,
    // Keep the newest 2 user turns and 40k tokens of older tool output.
    "protectTurns": 2,
    "protectTokens": 40000,
    // Clear only when the removed text is worth more than 20k tokens.
    "minimumTokens": 20000
  }
}

Comments are explanatory. config.json is JSON and does not accept comments.

Change the agent in your own code.

Crystal Code is built to be changed. The host keeps the workspace boundary, approval, and timeouts while you choose what the agent can do.

Plugins
Add an assembly of your own. It loads beside the product, in its own context.
Prompts
Replace the built-in Work, Plan, or Review prompt, or append reusable prompt attachments.
Skills
Keep markdown procedures in the repository and let the agent load them when they apply.
Tools
Add tools under ~/.crystal/tools or in the repository. The host still enforces approval and timeouts.
Extend Crystal Code

Different work, a different prompt set.

A prompt set is a directory of instructions for one kind of work. Keep several under ~/.crystal/promptsets/, then enable one at a time with /promptset.

  • /promptset search
  • /promptset reverse
  • /promptset security
  • /promptset develop
  • /promptset frontend
  • /promptset backend
  • /promptset code-review
  • /promptset docs
  • /promptset test
  • /promptset refactor
  • /promptset plan
  • /promptset review
  • /promptset debug
  • /promptset migrate
  • /promptset release
  • /promptset data
  • /promptset infra
  • /promptset api
  • /promptset design
  • /promptset research
  • /promptset incident
  • /promptset performance
  • /promptset accessibility
  • /promptset writing

The names below are examples. The sets are yours to write.

Prompt sets in the user guide

Start from your repository.

Install the self-contained build and open a workspace. Your model endpoint stays yours.