xiaohongshu
xiaohongshu
ai-prompt-manager
Expert assistant for managing AI prompts, features, and configuration in the KR92 Bible Voice AI system. Use when creating AI prompts, configuring AI features, managing prompt versions, setting up AI bindings, or working with AI pricing and models.
Full skill instructions
ai_prompt_templates (task, name, description)
ai_prompt_versions (template_id, version, system_prompt, user_prompt_template, output_schema, model_hints, status)
ai_prompt_bindings (task, env, prompt_version_id, enabled)
ai_features (key, description)
ai_feature_bindings (feature_key, env, ai_vendor, ai_model, param_overrides, is_active)
ai_pricing (ai_vendor, ai_model, input_usd_per_1k, output_usd_per_1k)
ai_usage_logs (user_id, feature, ai_vendor, ai_model, tokens, cost_usd, status)
User: "Add a new AI feature for verse comparison"
Assistant:
-- 1. Create feature
INSERT INTO bible_schema.ai_features (key, description)
VALUES ('compare_verses', 'Compare and analyze differences between Bible verses');
-- 2. Create prompt template
INSERT INTO bible_schema.ai_prompt_templates (task, name, description)
VALUES (
'compare_verses',
'Verse Comparison',
'Analyzes theological and textual differences between verses'
);
-- 3. Create prompt version
INSERT INTO bible_schema.ai_prompt_versions (
template_id,
version,
system_prompt,
user_prompt_template,
output_schema,
model_hints,
status
) VALUES (
(SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'compare_verses'),
1,
'You are a Bible scholar assistant. Compare verses and explain their theological significance.',
'Compare these verses: {{verse1}} and {{verse2}}. Explain the key differences and similarities.',
'{"type": "object", "properties": {"differences": {"type": "array"}, "similarities": {"type": "array"}, "theological_significance": {"type": "string"}}}',
'{"model": "google/gemini-2.5-flash"}',
'published'
);
-- 4. Bind to environment
INSERT INTO bible_schema.ai_prompt_bindings (task, env, prompt_version_id, enabled)
VALUES (
'compare_verses',
'prod',
(SELECT id FROM bible_schema.ai_prompt_versions WHERE template_id = (SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'compare_verses') AND version = 1),
true
);
-- 5. Configure feature binding
INSERT INTO bible_schema.ai_feature_bindings (
feature_key,
env,
ai_vendor,
ai_model,
param_overrides,
is_active
) VALUES (
'compare_verses',
'prod',
'lovable',
'google/gemini-2.5-flash',
'{"temperature": 0.7, "max_tokens": 1000}',
true
);
User: "Create a new version of the translate_search_term prompt"
Assistant:
-- Create new version (version 2)
INSERT INTO bible_schema.ai_prompt_versions (
template_id,
version,
system_prompt,
user_prompt_template,
output_schema,
status
) VALUES (
(SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'translate_search_term'),
2,
'You are a Finnish-English Bible translation expert. Provide accurate theological term translations.',
'Translate the term "{{term}}" from {{source_language}} to {{target_language}}. Focus on Biblical context. Return JSON: {"main": "primary translation", "synonyms": ["alt1", "alt2"]}',
'{"type": "object", "properties": {"main": {"type": "string"}, "synonyms": {"type": "array", "items": {"type": "string"}}}}',
'draft'
);
-- Test the new version in dev environment
UPDATE bible_schema.ai_prompt_bindings
SET prompt_version_id = (
SELECT id FROM bible_schema.ai_prompt_versions
WHERE template_id = (SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'translate_search_term')
AND version = 2
)
WHERE task = 'translate_search_term' AND env = 'dev';
-- After testing, publish and promote to prod
UPDATE bible_schema.ai_prompt_versions
SET status = 'published'
WHERE template_id = (SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'translate_search_term')
AND version = 2;
UPDATE bible_schema.ai_prompt_bindings
SET prompt_version_id = (SELECT id FROM bible_schema.ai_prompt_versions WHERE template_id = (SELECT id FROM bible_schema.ai_prompt_templates WHERE task = 'translate_search_term') AND version = 2)
WHERE task = 'translate_search_term' AND env = 'prod';
User: "Switch to Anthropic Claude for summaries in production"
Assistant:
-- Update feature binding
UPDATE bible_schema.ai_feature_bindings
SET
ai_vendor = 'anthropic',
ai_model = 'claude-3-5-sonnet-20241022',
param_overrides = '{"max_tokens": 2048, "temperature": 0.7}'
WHERE feature_key = 'ai_summary' AND env = 'prod';
-- Ensure pricing is set
INSERT INTO bible_schema.ai_pricing (ai_vendor, ai_model, input_usd_per_1k, output_usd_per_1k)
VALUES ('anthropic', 'claude-3-5-sonnet-20241022', 0.003, 0.015)
ON CONFLICT (ai_vendor, ai_model) DO UPDATE
SET input_usd_per_1k = 0.003, output_usd_per_1k = 0.015;
Use {{variable}} syntax in prompts:
// System prompt
"You are a {{role}} assistant. Translate from {{source_language}} to {{target_language}}."
// User prompt template
"Translate: {{term}}"
// Edge Function usage
const prompt = await getPrompt('translate_search_term', {
role: 'theological translation',
term: 'armo',
source_language: 'Finnish',
target_language: 'English'
}, 'prod');
| Vendor | Endpoint | Models |
|---|---|---|
lovable | ai.gateway.lovable.dev | google/gemini-2.5-flash, openai/gpt-4o |
openai | api.openai.com | gpt-4o, gpt-4o-mini, o1, o3 |
anthropic | api.anthropic.com | claude-3-5-sonnet, claude-3-5-haiku |
openrouter | openrouter.ai | Various models |
max_completion_tokens (not max_tokens)temperature parameter{"max_completion_tokens": 1000}max_tokenstemperature{"max_tokens": 1000, "temperature": 0.7}Always test in dev → stage → prod progression.
{{variable}} namesmax_tokens for the taskterm_translations tablemax_tokens limitsai_usage_logsUse the Admin AI page → Testaus tab:
Docs/06-AI-ARCHITECTURE.md for AI system detailsDocs/07-ADMIN-GUIDE.md for Admin AI page usagexiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience