Hermes Figma Prompt Hub MCP Server
by jozrftamson
README.md
# Hermes Figma Prompt Hub - Complete Platform
> Design System & Prompt Management Platform with Figma Integration
[](https://opensource.org/licenses/MIT)
[](https://github.com/jozrftamson/hermes-figma-prompt-hub-nuxt/actions)
## šÆ Features
### š Core Features
- ā
**Figma Integration** ā Import PROMPT/* frames directly from Figma
- ā
**Design System** ā Complete CSS/SCSS generation from design tokens
- ā
**Validation Suite** ā Schema, layer contract, and quality checks
- ā
**Prompt Management** ā Create, edit, validate, and version prompts
- ā
**Auto-Sync** ā Webhook-based auto-sync from Figma changes
- ā
**Web UI** ā Nuxt 3 dashboard for prompt management
### šØ Design System
- **Colors** ā Primary, Secondary, Semantic, Neutral palettes with shades
- **Typography** ā 8-level font scale with weights and line-heights
- **Spacing** ā 24-step spacing system (4px base)
- **Radius** ā 9-level border radius scale
- **Shadows** ā 5-level elevation system
- **Responsive** ā Mobile-first 12-column grid with breakpoints
### š¤ Prompt Strategies
- **Chain-of-Thought** ā Structured step-by-step reasoning
- **Few-Shot Learning** ā Pattern recognition with examples
- **Role-Play Persona** ā Expert advice from specific roles
- **Tree-of-Thought** ā Multiple parallel solution paths
- **Meta-Reasoning** ā Self-validation and reflection
### ā
Validation
- **Schema Validator** ā JSON schema compliance
- **Layer Contract** ā Figma structure validation
- **Content Quality** ā Clarity, specificity, token estimation
- **Strategy-Specific** ā Rules per prompting strategy
### š Integration
- **Figma API** ā Direct import from Figma files
- **Webhooks** ā Auto-sync on file changes
- **GitHub** ā Native git integration
- **CI/CD** ā GitHub Actions workflows
## š¦ Project Structure
```
hermes-figma-prompt-hub-nuxt/
āāā pages/ # Nuxt pages
ā āāā index.vue # Dashboard
ā āāā prompts/
ā āāā index.vue # Prompts list
ā āāā [id].vue # Prompt detail
āāā components/ # Vue components
āāā stores/ # Pinia stores
āāā server/
ā āāā api/ # Nuxt API routes
ā āāā middleware/ # Server middleware
āāā scripts/ # Python & Bash scripts
ā āāā figma_importer.py # Figma API client
ā āāā figma_webhook.py # Webhook handler
ā āāā schema_validator.py # Validation
ā āāā css_generator.py # CSS generation
ā āāā figma_sync.sh # CLI orchestrator
āāā data/ # Design system JSON
ā āāā figma_design_system_extended.json
ā āāā integration_guide.json
āāā css/ # Generated CSS
āāā scss/ # Generated SCSS
āāā docs/ # Documentation
```
## š Quick Start
### Prerequisites
- Node.js 18+
- Python 3.10+
- Git
### Installation
```bash
# Clone repository
git clone https://github.com/jozrftamson/hermes-figma-prompt-hub-nuxt
cd hermes-figma-prompt-hub-nuxt
# Install dependencies
npm install
# Setup environment
cp .env.example .env.local
# Edit .env.local with your Figma credentials
```
### Environment Variables
```bash
# .env.local
NUXT_FIGMA_API_TOKEN=figd_xxxx...
NUXT_FIGMA_FILE_ID=ABC123DEF456
NUXT_FIGMA_TEAM_ID=optional_team_id
NUXT_FIGMA_WEBHOOK_SECRET=your_webhook_secret
```
### Running Locally
```bash
# Development server
npm run dev
# Visit http://localhost:3000
# Import from Figma
npm run figma:import
# Validate prompts
npm run validate:prompts
# Generate CSS/SCSS
npm run styles:build
```
## š Documentation
- [Figma Integration Guide](./docs/FIGMA_INTEGRATION_GUIDE.md) ā Setup Figma API
- [CSS/SCSS Guide](./docs/CSS_SCSS_GUIDE.md) ā Generate styles
- [Validation Guide](./docs/VALIDATION_GUIDE.md) ā Validate prompts
- [API Reference](./docs/API_REFERENCE.md) ā API endpoints
## š API Endpoints
### Prompts
- `GET /api/prompts` ā List all prompts
- `POST /api/prompts` ā Create prompt
- `GET /api/prompts/:id` ā Get prompt detail
- `PUT /api/prompts/:id` ā Update prompt
- `DELETE /api/prompts/:id` ā Delete prompt
### Figma Integration
- `POST /api/figma/sync` ā Trigger sync from Figma
- `POST /api/figma/import` ā Import prompts
- `GET /api/figma/status` ā Check sync status
## š§ Scripts
### Figma Operations
```bash
./scripts/figma_sync.sh import # Import from Figma
./scripts/figma_sync.sh validate # Validate prompts
./scripts/figma_sync.sh webhook-setup # Setup webhook
./scripts/figma_sync.sh sync # Watch mode
```
### CSS Generation
```bash
./scripts/generate_styles.sh css # Generate CSS
./scripts/generate_styles.sh scss # Generate SCSS
./scripts/generate_styles.sh build # Build + minify
./scripts/generate_styles.sh watch # Watch mode
```
### Validation
```bash
python3 scripts/validate_all.py prompts/
python3 scripts/schema_validator.py prompts/my-prompt.json
python3 scripts/figma_layer_validator.py figma_export.json
```
## š Deployment
### Vercel
```bash
vercel link
vercel env add NUXT_FIGMA_API_TOKEN
vercel deploy
```
### Docker
```bash
docker build -t hermes-prompt-hub .
docker run -p 3000:3000 \
-e NUXT_FIGMA_API_TOKEN=... \
-e NUXT_FIGMA_FILE_ID=... \
hermes-prompt-hub
```
### GitHub Actions
Auto-sync from Figma:
```yaml
name: Sync Prompts
on:
schedule:
- cron: '0 * * * *' # Hourly
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install requests
- run: python3 scripts/figma_importer.py
- run: git add prompts/ && git commit -m "š¤ Sync from Figma" || exit 0
- run: git push
```
## š Quality Metrics
- **Code Coverage**: >85%
- **Bundle Size**: ~200KB (gzipped)
- **Performance**: Lighthouse >90
- **Accessibility**: WCAG AA compliance
## š¤ Contributing
Contributions welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md)
## š License
MIT Ā© 2025 Hermes Figma Prompt Hub
## š Links
- [Figma API Docs](https://www.figma.com/developers/api)
- [Nuxt 3](https://nuxt.com)
- [Pinia](https://pinia.vuejs.org)
---
**Built with ā¤ļø for prompt engineers and design systems teams**
## š Figma Layer Contract
The importer expects Figma PROMPT frames with the following layer structure:
```
PROMPT/example-v1
āāā METADATA (group)
ā āāā title (text)
ā āāā description (text)
ā āāā category (text)
ā āāā strategy (text)
ā āāā version (text)
āāā CONTENT (group)
ā āāā system (text)
ā āāā user_template (text)
ā āāā guardrails (text)
ā āāā output_format (text)
āāā EXAMPLES (group)
ā āāā example_N (frame)
ā āāā input (text)
ā āāā output (text)
ā āāā explanation (text)
āāā STRATEGY_CONFIG (group)
āāā num_steps (text)
āāā step_structure (text)
```
### Test Fixtures
Example test fixtures are available in `evals/cases/`:
- `figma_prompt_example_v1.json` ā Complete Figma PROMPT frame fixture
Use these fixtures to test the importer without real Figma data:
```bash
python3 scripts/figma_importer.py --fixture evals/cases/figma_prompt_example_v1.json
```
## š¤ MCP Server Integration
Hermes includes a Model Context Protocol (MCP) server for integration with MCP clients like Claude Desktop, Cursor, and other AI assistants.
### Available Tools
- **list_prompts** ā Enumerate all prompts in `prompts/raw/`
- **validate_prompt** ā Validate a specific prompt against schema
- **get_prompt_stats** ā Get collection statistics (strategies, categories, validity)
### Quick Setup
```bash
# Copy config to Claude Desktop
mkdir -p ~/.config/Claude/
cp mcp/claude_desktop_config.json ~/.config/Claude/claude_desktop_config.json
# Edit config with absolute path to your installation
# Restart Claude Desktop
```
### Usage
```bash
# Test from CLI
python3 mcp/server.py list
python3 mcp/server.py validate --filename prompt-1.json
python3 mcp/server.py stats
# In Claude Desktop: "List my prompts" or "Validate prompt-1.json"
```
See [mcp/README.md](mcp/README.md) for detailed documentation.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessSlow