AI skills and rules for managing Contentrain CMS content across all AI tools.
Works with or without MCP — when the @contentrain/mcp server is available, AI agents use it for git-synced operations. When it's not, they fall back to direct file editing with the same rules.
| File | Tool | Type | Description |
|---|---|---|---|
skills/contentrain/SKILL.md |
Claude Code | Auto-invoked skill | Claude automatically uses this when working with Contentrain projects |
commands/contentrain.md |
Claude Code | /contentrain command |
User-invoked slash command for content management |
.mcp.json |
Claude Code | MCP config | Connects @contentrain/mcp server for git-synced operations |
cursor/contentrain.mdc |
Cursor | Rule | Activates when editing files in contentrain/ directory |
Install as a Claude Code plugin:
claude plugin add /path/to/contentrain-aiThis gives you:
- Auto-invoked skill (Claude uses it automatically for Contentrain projects)
/contentrainslash command- MCP server integration (if
@contentrain/mcpis installed globally)
Copy the skill to your commands directory:
cp commands/contentrain.md ~/.claude/commands/contentrain.mdCopy the rule to your project's Cursor rules:
mkdir -p .cursor/rules
cp cursor/contentrain.mdc .cursor/rules/contentrain.mdcOr install globally:
mkdir -p ~/.cursor/rules
cp cursor/contentrain.mdc ~/.cursor/rules/contentrain.mdcFor git-synced operations (auto commit + push), install the MCP server:
npm install -g @contentrain/mcpThe .mcp.json in this plugin will automatically connect to it.
User: "Create a blog model with title and category fields"
┌─────────────────────────────────┐
│ AI Agent (Claude, Cursor, etc.) │
│ │
│ 1. Checks for MCP tools │
│ ├─ YES → Use MCP tools │
│ │ (git sync, validation) │
│ └─ NO → Direct file editing │
│ (follows skill rules) │
│ │
│ 2. Creates model metadata │
│ 3. Adds field definitions │
│ 4. Creates content directory │
│ 5. Validates all rules │
└─────────────────────────────────┘
- A Contentrain project set up via the Contentrain Web App
- The project's GitHub repository cloned locally
MIT