AI coding agents such as Claude Code and OpenAI Codex generate much better Metalama code when they can look up the real documentation instead of guessing from memory. The Metalama plugin gives them comprehensive knowledge about aspects, templates, fabrics, and the entire Metalama API.
What the plugin provides
The Metalama plugin gives your AI agent access to:
- Conceptual documentation: Complete guides on aspects, templates, fabrics, validation, and configuration.
- API reference: Full documentation for all Metalama namespaces and types.
- Sample code: Working examples demonstrating common patterns and techniques.
- Pattern libraries: Documentation for
Metalama.Patterns.Contracts,Metalama.Patterns.Caching,Metalama.Patterns.Observability, and more.
Installing in Claude Code
Add the Metalama marketplace to Claude Code:
/plugin marketplace add https://github.com/metalama/Metalama.AI.SkillsInstall the Metalama plugin:
/plugin install metalama
To update to a newer version:
/plugin update metalama
Installing in OpenAI Codex
Add the Metalama marketplace to Codex:
codex plugin marketplace add metalama/Metalama.AI.SkillsInstall the
metalamaplugin from the plugin directory (Plugins) in the Codex app.
To update to a newer version:
codex plugin marketplace upgrade
Using the plugin
Once installed, the agent automatically uses the Metalama plugin when you ask questions about:
- Creating or modifying aspects
- Writing T# templates
- Using fabrics to apply aspects in bulk
- Working with the Metalama code model
- Implementing patterns like caching, contracts, or observability
If the agent doesn't seem to use Metalama-specific knowledge, explicitly mention "Metalama" in your prompt.
Example prompts
- "Create a logging aspect that logs method entry and exit"
- "How do I introduce a property to a class using Metalama?"
- "Write a contract that validates a string parameter is not empty"
- "How do I apply an aspect to all public methods in a namespace?"