mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 09:37:15 +00:00
Address review feedback: restructure plugin for marketplace conventions
- Remove .mcp.json (not used in marketplace, add README instead) - Add marketplace.json entry for plugin discovery - Add README.md with MCP server setup guide, provider config, and troubleshooting - Add tools: declaration to image-generator agent (functional fix) - Move <example> blocks from YAML frontmatter to markdown body - Remove unused tools: Read, Grep, Glob from prompt-crafter agent - Remove redundant name: field from command frontmatter - Use full MCP tool prefix (mcp__meigen__*) in commands - Rewrite plugin.json description to factual style - Pin npm version to meigen@1.2.5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "meigen-ai-design",
|
||||
"version": "1.2.3",
|
||||
"description": "Turn Claude Code into a visual creative assistant rivaling Lovart — AI image generation with creative workflow orchestration, parallel multi-direction output, prompt engineering skills, and a 1,300+ curated inspiration library. Supports local ComfyUI, MeiGen Cloud, and OpenAI APIs.",
|
||||
"version": "1.0.0",
|
||||
"description": "AI image generation with creative workflow orchestration, parallel multi-direction output, prompt engineering, and a 1,300+ curated inspiration library. Requires MeiGen MCP server (supports MeiGen Cloud, local ComfyUI, and OpenAI-compatible APIs).",
|
||||
"author": {
|
||||
"name": "MeiGen",
|
||||
"url": "https://www.meigen.ai"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"meigen": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "meigen@latest"]
|
||||
}
|
||||
}
|
||||
112
plugins/meigen-ai-design/README.md
Normal file
112
plugins/meigen-ai-design/README.md
Normal file
@@ -0,0 +1,112 @@
|
||||
# MeiGen AI Design
|
||||
|
||||
AI image generation plugin with creative workflow orchestration, parallel multi-direction output, prompt engineering, and a 1,300+ curated inspiration library.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This plugin requires the **meigen** MCP server. Install it by adding to your project's `.mcp.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"meigen": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "meigen@1.2.5"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Restart Claude Code** after adding the configuration.
|
||||
|
||||
Requires Node.js 18+.
|
||||
|
||||
## Provider Setup
|
||||
|
||||
Configure at least one provider to enable image generation. **Free features** (gallery search, prompt enhancement, model listing, preference management) work without any provider configured.
|
||||
|
||||
### Option A: MeiGen Cloud (Recommended)
|
||||
|
||||
1. Sign up at [meigen.ai](https://www.meigen.ai)
|
||||
2. Click avatar → Settings → API Keys → create a new key (starts with `meigen_sk_`)
|
||||
3. Set environment variable:
|
||||
|
||||
```bash
|
||||
export MEIGEN_API_TOKEN=meigen_sk_your_token_here
|
||||
```
|
||||
|
||||
### Option B: Local ComfyUI (Free, Private)
|
||||
|
||||
1. Install and run [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
|
||||
2. Set environment variable:
|
||||
|
||||
```bash
|
||||
export COMFYUI_URL=http://localhost:8188
|
||||
```
|
||||
|
||||
3. Export workflows from ComfyUI (API format JSON) and import via the plugin
|
||||
|
||||
### Option C: OpenAI-compatible API (Bring Your Own Key)
|
||||
|
||||
Works with any OpenAI-compatible image generation API (OpenAI, Together AI, Fireworks AI, etc.):
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=your_key_here
|
||||
export OPENAI_BASE_URL=https://api.openai.com/v1
|
||||
export OPENAI_MODEL=gpt-image-1
|
||||
```
|
||||
|
||||
Alternatively, store configuration in `~/.config/meigen/config.json`.
|
||||
|
||||
## Agents
|
||||
|
||||
| Agent | Model | Purpose |
|
||||
|-------|-------|---------|
|
||||
| `gallery-researcher` | haiku | Search 1,300+ curated gallery, find references, build mood boards |
|
||||
| `prompt-crafter` | haiku | Write multiple distinct prompts for parallel image generation |
|
||||
| `image-generator` | inherit | Execute `generate_image` calls and relay results |
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/meigen-ai-design:gen <prompt>` | Quick image generation — skips intent assessment |
|
||||
| `/meigen-ai-design:find <keywords>` | Quick gallery search — browse inspiration |
|
||||
|
||||
## Free Features (No API Key)
|
||||
|
||||
These tools work immediately without any provider setup:
|
||||
- **search_gallery** — Search 1,300+ curated AI image prompts
|
||||
- **enhance_prompt** — Expand brief descriptions into detailed generation prompts
|
||||
- **list_models** — List available models across all configured providers
|
||||
- **manage_preferences** — Save default style, aspect ratio, and favorite prompts
|
||||
|
||||
## Verification
|
||||
|
||||
After setup, test with a free feature:
|
||||
> "Search the gallery for product photography inspiration"
|
||||
|
||||
Then test generation:
|
||||
> "Generate a product photo for a glass perfume bottle on marble"
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Problem | Solution |
|
||||
|---------|----------|
|
||||
| MCP tools not available | Restart Claude Code after adding `.mcp.json` configuration |
|
||||
| "No image generation providers configured" | Configure at least one provider (see Provider Setup above) |
|
||||
| API key / authentication errors | Verify env vars or check `~/.config/meigen/config.json` |
|
||||
| ComfyUI connection refused | Ensure ComfyUI is running at the configured URL |
|
||||
| Generation timeout | Server may be under high load — try again in a moment |
|
||||
| Empty gallery search results | Try different keywords or broader terms |
|
||||
|
||||
## Links
|
||||
|
||||
- [npm package](https://www.npmjs.com/package/meigen)
|
||||
- [GitHub](https://github.com/jau123/MeiGen-AI-Design-MCP)
|
||||
- [Homepage](https://www.meigen.ai)
|
||||
- [Demo Video](https://youtu.be/JQ3DZ1DXqvs)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -1,43 +1,44 @@
|
||||
---
|
||||
name: image-generator
|
||||
description: >-
|
||||
Image generation executor agent. Delegates here for ALL generate_image
|
||||
calls to keep the main conversation context clean. Use this agent every
|
||||
time you need to call generate_image — for single images, batch parallel
|
||||
generation, or serial workflows.
|
||||
|
||||
<example>
|
||||
Context: User wants to generate 4 logo concepts in parallel
|
||||
user: "Generate all 4 directions"
|
||||
assistant: "I'll spawn 4 image-generator agents in parallel, one for each direction."
|
||||
<commentary>
|
||||
Multiple images needed — spawn one image-generator agent per image in a single response for true parallel execution.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: User wants a single product photo
|
||||
user: "Generate a product photo for this perfume"
|
||||
assistant: "I'll use the image-generator agent to create the product photo."
|
||||
<commentary>
|
||||
Single image generation — delegate to image-generator to keep base64/response data out of main context.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: User approved a logo and wants mockup extensions
|
||||
user: "Use this logo for a mug and t-shirt mockup"
|
||||
assistant: "I'll spawn 2 image-generator agents in parallel for the mockups."
|
||||
<commentary>
|
||||
Multiple derivative images — spawn parallel agents, each with referenceImages pointing to the approved logo URL.
|
||||
</commentary>
|
||||
</example>
|
||||
calls to keep the main conversation context clean. Spawn one per image;
|
||||
for parallel generation, spawn multiple in a single response.
|
||||
model: inherit
|
||||
color: magenta
|
||||
tools: mcp__meigen__generate_image
|
||||
---
|
||||
|
||||
You are an image generation executor. Your ONLY job is to call `generate_image` and return the result.
|
||||
|
||||
## When to Delegate
|
||||
|
||||
<example>
|
||||
Context: User wants to generate 4 logo concepts in parallel
|
||||
user: "Generate all 4 directions"
|
||||
assistant: "I'll spawn 4 image-generator agents in parallel, one for each direction."
|
||||
<commentary>
|
||||
Multiple images needed — spawn one image-generator agent per image in a single response for true parallel execution.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: User wants a single product photo
|
||||
user: "Generate a product photo for this perfume"
|
||||
assistant: "I'll use the image-generator agent to create the product photo."
|
||||
<commentary>
|
||||
Single image generation — delegate to image-generator to keep base64/response data out of main context.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
Context: User approved a logo and wants mockup extensions
|
||||
user: "Use this logo for a mug and t-shirt mockup"
|
||||
assistant: "I'll spawn 2 image-generator agents in parallel for the mockups."
|
||||
<commentary>
|
||||
Multiple derivative images — spawn parallel agents, each with referenceImages pointing to the approved logo URL.
|
||||
</commentary>
|
||||
</example>
|
||||
|
||||
## Process
|
||||
|
||||
1. You will receive a prompt and optional parameters (aspectRatio, referenceImages)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
name: prompt-crafter
|
||||
description: >-
|
||||
Batch prompt writing agent. Delegates here when you need to write
|
||||
multiple distinct prompts at once — for parallel image generation
|
||||
@@ -7,7 +6,6 @@ description: >-
|
||||
logo then apply to mug/t-shirt/poster), or any task requiring 2+ prompts
|
||||
crafted simultaneously.
|
||||
model: haiku
|
||||
tools: Read, Grep, Glob
|
||||
---
|
||||
|
||||
You are an expert AI image generation prompt writer. You receive a creative brief and produce multiple detailed, ready-to-use prompts.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: find
|
||||
description: >-
|
||||
Quick gallery search. Use when user runs /meigen:find with keywords
|
||||
Quick gallery search. Use when user runs /meigen-ai-design:find with keywords
|
||||
to browse inspiration.
|
||||
argument-hint: <keywords>
|
||||
---
|
||||
@@ -12,13 +11,13 @@ Search the curated gallery for inspiration. Show visual results immediately.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. Call `search_gallery` with query: `$ARGUMENTS`
|
||||
1. Call `mcp__meigen__search_gallery` with query: `$ARGUMENTS`
|
||||
- If no arguments provided, call with no query to get trending picks
|
||||
- Use limit: 6 for a good visual spread
|
||||
2. Display results as a compact list:
|
||||
- Number, preview image (markdown), one-line prompt excerpt, category
|
||||
3. End with: "Say a number to see the full prompt, or describe what you want to generate."
|
||||
|
||||
If the user picks a number, call `get_inspiration` with that entry's ID to show the full prompt and images.
|
||||
If the user picks a number, call `mcp__meigen__get_inspiration` with that entry's ID to show the full prompt and images.
|
||||
|
||||
Keep output visual and scannable. No long explanations.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: gen
|
||||
description: >-
|
||||
Quick image generation. Use when user runs /meigen:gen with a prompt.
|
||||
Quick image generation. Use when user runs /meigen-ai-design:gen with a prompt.
|
||||
Skips intent assessment, generates directly.
|
||||
argument-hint: <prompt>
|
||||
---
|
||||
@@ -13,7 +12,7 @@ Generate an image immediately from the user's description. This is the fast path
|
||||
## Instructions
|
||||
|
||||
1. Look at the user's prompt: `$ARGUMENTS`
|
||||
2. If the prompt is very short (under 10 words), call `enhance_prompt` first to enrich it, then use the enhanced result
|
||||
2. If the prompt is very short (under 10 words), call `mcp__meigen__enhance_prompt` first to enrich it, then use the enhanced result
|
||||
3. If the prompt is already detailed (10+ words), use it directly
|
||||
4. Delegate to the **image-generator** agent with the prompt (keeps base64 data out of main context)
|
||||
5. When the agent returns, show a brief one-line creative comment about the generation
|
||||
@@ -21,7 +20,7 @@ Generate an image immediately from the user's description. This is the fast path
|
||||
Do NOT:
|
||||
- Ask for confirmation before generating
|
||||
- Suggest alternatives or options
|
||||
- Run search_gallery for references
|
||||
- Run mcp__meigen__search_gallery for references
|
||||
- Give lengthy explanations or describe the image
|
||||
- Call generate_image directly — always delegate to image-generator agent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user