Civitai Analyst
by feed-mob
Generate and execute SQL queries against the civitai_records PostgreSQL database to analyze video performance on Civitai. Use when users ask about: video engagement metrics (likes, hearts, comments), content performance analysis, tag/theme analysis, quality scores, weekly reports, comparing videos, content recommendations, trend analysis, or any Civitai data queries. Triggers: Civitai, video stats, engagement, likes, hearts, comments, weekly report, tag analysis, quality score, content strategy,
Skill Details
Repository Files
13 files in this skill directory
name: civitai-analyst description: "Generate and execute SQL queries against the civitai_records PostgreSQL database to analyze video performance on Civitai. Use when users ask about: video engagement metrics (likes, hearts, comments), content performance analysis, tag/theme analysis, quality scores, weekly reports, comparing videos, content recommendations, trend analysis, or any Civitai data queries. Triggers: Civitai, video stats, engagement, likes, hearts, comments, weekly report, tag analysis, quality score, content strategy, top performers, SQL query, video comparison, WoW analysis, 数据分析, 视频表现, 周报, 内容分析."
Civitai Analyst
Analyze video performance data on Civitai through natural language queries. Generate SQL, execute against the database, and provide actionable insights.
Capabilities
- SQL Generation - Convert natural language to optimized PostgreSQL queries
- Query Execution - Run queries via
query_civitai_db - Data Analysis - Interpret engagement metrics and find patterns
- Content Insights - Analyze tags, themes, quality scores from video_analysis
- Recommendations - Suggest content strategies based on performance data
- Weekly Reports - Generate JSON/HTML performance summaries
Tool Usage
Execute SQL using the MCP tool:
query_civitai_db(sql="SELECT ...")
Error Handling: If query is rejected, response contains:
{
"allowed": false,
"reason": "...",
"violation_type": "...",
"suggestions": "..."
}
Fix the SQL based on the error and retry.
Workflow
- Understand - Parse user's question, identify metrics/filters needed
- Generate SQL - Use schema.md for tables, query-index.md for templates
- Execute - Call the SQL tool, handle errors
- Analyze - Interpret results, find patterns, compare data points
- Present - Format with links, provide insights and recommendations
Key Parameters
civitai_account
- User-provided account identifier
- Default fallback:
'c29'if not specified
on_behalf_of
- User's first name, inferred from session context
- Used to filter assets/stats by uploader
Date Ranges
- Use calendar weeks (Monday 00:00 to Sunday 23:59 UTC)
- Format: PostgreSQL timestamptz
'2025-01-06T00:00:00Z'
Date Calculations:
- "This week" = Current Monday to next Monday
- "Last week" = Previous Monday to current Monday
- "Past 2 weeks" = Monday 2 weeks ago to next Monday
Link Formatting
Assets (videos/images):
https://civitai.com/images/{assets.civitai_id}
Posts:
https://civitai.com/posts/{civitai_posts.civitai_id}
Always include clickable links in results for easy navigation.
Analysis Guidelines
Engagement Metrics
- Positive engagement: likes + hearts + laughs
- Total engagement: all reactions + comments
- Engagement rate: total_engagement / asset_count
Pattern Recognition
- Compare top performers vs average
- Identify common tags in high-engagement videos
- Correlate quality_score with engagement
- Analyze motion_intensity impact
Comparative Analysis
When comparing videos (e.g., "rank 2 vs rank 9"):
- Extract shared tags
- Compare quality scores
- Analyze description/prompt similarities
- Identify differentiating factors
Recommendation Framework
Based on analysis, provide actionable suggestions:
- Content themes - Which topics/tags drive engagement
- Quality factors - Optimal quality_score ranges
- Timing patterns - Best posting times if data shows trends
- Improvement areas - Underperforming high-quality content
Example insights:
- "Anime + high-motion videos get 2x engagement"
- "Videos with quality_score > 0.85 need better tags for visibility"
- "Comments spike on 'cinematic' tagged content"
Report Generation
For weekly reports, use templates from references/report-templates.md:
- JSON format - Structured data for programmatic use
- HTML format - Visual report with Tailwind CSS styling
Generate reports by:
- Run weekly-feedback-stats.sql for summary
- Run top-performing-assets.sql for highlights
- Run tag-performance.sql for content insights
- Combine into report template
Language
Respond in the same language as the user's query.
- English query → English response
- Chinese query → Chinese response (中文提问 → 中文回答)
Reference Files
| File | When to Read |
|---|---|
references/schema.md |
Understanding table structures, columns, relationships |
references/query-index.md |
Finding the right query template for user's request |
references/queries/*.sql |
Loading specific query when needed |
references/report-templates.md |
Generating weekly reports |
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Team Composition Analysis
This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.
Startup Financial Modeling
This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Startup Metrics Framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
