AgentSkillsCN

cost-knowledge

提供真实的云计算、数据库、大语言模型 Token、认证、支付、邮件、托管与监控服务定价数据。在估算基础设施或运营成本时,可优先选用此技能。

SKILL.md
--- frontmatter
name: cost-knowledge
description: Real pricing data for cloud compute, databases, LLM tokens, auth, payments, email, hosting, and monitoring services. Use when estimating infrastructure or operational costs.

Cost Knowledge

Real pricing data for cloud infrastructure, databases, LLM tokens, and third-party services. Use this data to produce grounded cost estimates. When data may be stale, use web search to verify current pricing.

Last verified: February 2026. Prices change — always present as approximate ranges and note that users should verify before committing.

Staleness note: The pricing data in this skill is a snapshot. Cloud providers, LLM vendors, and SaaS tools update pricing regularly. When generating cost estimates, use web search (if available via MCP) to verify current pricing for the key services. If web search is unavailable, state that prices are approximate and recommend the user verify at the provider's pricing page before committing.


Pricing Assumptions (CRITICAL)

All pricing in this skill assumes the following unless explicitly noted otherwise:

  • Region: US East (N. Virginia) for AWS/Azure/GCP, US regions for other services
  • OS: Linux for compute instances
  • Billing: On-demand pricing (not reserved instances, spot instances, or annual contracts)
  • Currency: USD, excludes taxes and VAT
  • Data transfer: Excludes egress costs unless explicitly mentioned (egress can add 20-50% to costs)
  • Pricing date: Snapshot from early 2025

These assumptions can cause 10-30% variance from actual costs.

When presenting pricing to users, ALWAYS:

  1. Label costs as "planning estimates" or "approximate"
  2. Mention region assumptions when relevant (e.g., "~$50/month in us-east-1")
  3. Flag egress costs as additional where significant (S3, CloudFront, etc.)
  4. Recommend verification at provider pricing pages before committing
  5. Note that free tiers may require credit card verification or have time limits

Cloud Compute

AWS

ServiceTierMonthly CostNotes
EC2 t3.micro1 vCPU, 1 GB RAM~$8/moFree tier eligible (750 hrs/mo for 12 months)
EC2 t3.small1 vCPU, 2 GB RAM~$16/moGood for small APIs
EC2 t3.medium2 vCPU, 4 GB RAM~$32/moStandard API server
EC2 t3.large2 vCPU, 8 GB RAM~$63/moMedium workloads
ECS FargatePer vCPU + memory~$30-70/mo per taskPay per use, no server management
LambdaPer request + duration$0 to ~$5/mo typical1M free requests/mo, great for low traffic
Lambda (high traffic)10M+ requests/mo$20-100/moScales well but costs add up

GCP

ServiceTierMonthly CostNotes
Cloud RunPer request + vCPU-sec$0 to ~$10/mo typicalFree tier: 2M requests/mo
Cloud Run (production)Sustained traffic$30-100/moAlways-on min instances add cost
Compute Engine e2-micro0.25 vCPU, 1 GB~$7/moFree tier eligible
Compute Engine e2-small0.5 vCPU, 2 GB~$14/mo
Cloud FunctionsPer invocation$0 to ~$5/mo2M free invocations/mo

Azure

ServiceTierMonthly CostNotes
App Service B11 core, 1.75 GB~$13/moBasic tier
App Service S11 core, 1.75 GB~$70/moStandard with auto-scale
Functions ConsumptionPer execution$0 to ~$5/mo1M free executions/mo
Container AppsPer vCPU + memory~$30-60/moSimilar to Cloud Run

Budget Hosting

ServiceFree TierPaid TierNotes
VercelHobby (free)Pro $20/moBest for Next.js
NetlifyFreePro $19/moBest for static + serverless
Railway$5 trial credit$5/mo + usageSimple deploy from GitHub
RenderFree (sleeps)$7/mo (always on)Good for small APIs
Fly.io3 shared VMs free$2-5/mo per VMEdge deployment

Databases

ServiceFree TierStarterProductionNotes
Supabase (PostgreSQL)500 MB, 2 projectsPro $25/moTeam $599/moIncludes auth, storage, realtime
Neon (PostgreSQL)0.5 GB, 1 projectLaunch $19/moScale $69/moServerless, branching
PlanetScale (MySQL)1 DB, 5 GBScaler $39/moTeam $99/moBranching, no foreign keys
MongoDB AtlasM0 free (512 MB)M10 $57/moM30 $340/moDocument database
AWS RDS (PostgreSQL)db.t3.micro free 12modb.t3.micro ~$14/modb.t3.medium ~$50/moSelf-managed
Upstash Redis10K cmds/day freePay-as-you-goPro $280/moServerless Redis
Redis Cloud30 MB free$7/mo$60/mo+Managed Redis
Pinecone (Vector)Free (100K vectors)Starter $70/moStandard variesVector search
Weaviate CloudFree (sandbox)$25/moCustomVector database
Firestore1 GB freePay-as-you-goReal-time, mobile-first
Turso (SQLite)9 GB, 500 DBsScaler $29/moEdge SQLite

LLM Token Pricing

Prices per million tokens (MTok).

Anthropic (Claude)

ModelInputOutputBest For
Haiku 3.5$0.80$4.00High-volume, simple tasks
Sonnet 4$3.00$15.00Balanced quality and cost
Opus 4$15.00$75.00Complex reasoning, code generation

OpenAI

ModelInputOutputBest For
GPT-4o$2.50$10.00General purpose
GPT-4o-mini$0.15$0.60High-volume, simple tasks
o1$15.00$60.00Complex reasoning
o3-mini$1.10$4.40Reasoning, cost-efficient

Google

ModelInputOutputBest For
Gemini 2.0 Flash$0.10$0.40Fast, cheap, high-volume
Gemini 2.0 Pro$1.25$5.00Balanced quality

Others

Provider/ModelInputOutputNotes
Mistral Large$2.00$6.00Strong multilingual
Mistral Small$0.10$0.30Very cheap
Groq (LLaMA 3 70B)$0.59$0.79Ultra-fast inference
DeepSeek V3$0.27$1.10Competitive quality/price

Token Cost Estimation Method

To estimate monthly LLM costs:

  1. Estimate conversations per month (e.g., 1,000)
  2. Estimate tokens per conversation: input (~500-2,000) + output (~500-2,000)
  3. Calculate: conversations x tokens x price per token
  4. Add overhead: system prompts, tool calls, retries (+20-30%)

Example: 1,000 conversations/mo x 2,000 input + 1,000 output tokens per conversation using Sonnet:

  • Input: 1,000 x 2,000 / 1M x $3.00 = $6.00
  • Output: 1,000 x 1,000 / 1M x $15.00 = $15.00
  • Overhead (25%): $5.25
  • Total: ~$26/mo

Auth Services

ServiceFree TierPaid TierNotes
Auth025K MAUEssentials $35/mo (500 MAU)Enterprise-grade, complex setup
Clerk10K MAUPro $25/moBest DX, fast integration
Supabase AuthIncluded with SupabaseIncludedPostgreSQL row-level security
Firebase Auth50K MAU freePay-as-you-goGoogle ecosystem
NextAuth.js / Auth.jsFree (self-hosted)FreeDIY, more control, more work
Kinde10.5K MAU$25/moModern, growing

Payment Processors

ServiceTransaction FeeMonthly FeeNotes
Stripe2.9% + $0.30$0Industry standard, best API
PayPal2.99% + $0.49$0Consumer familiarity
Paddle5% + $0.50$0Merchant of record (handles tax)
LemonSqueezy5% + $0.50$0Merchant of record, simpler
Gumroad10%$0Simplest, highest fee

Email & SMS

ServiceFree TierPaid TierNotes
SendGrid100 emails/dayEssentials $20/mo (50K/mo)Industry standard
Resend3,000 emails/moPro $20/moModern API, React Email
Postmark100 emails/mo$15/mo (10K/mo)Best deliverability
AWS SES3,000/mo free (from EC2)$0.10/1,000 emailsCheapest at scale
Twilio SMSTrial credits$0.0079/msg (US)Most popular SMS API
Vonage SMSTrial credits$0.0068/msg (US)Twilio alternative

Monitoring & Error Tracking

ServiceFree TierPaid TierNotes
Sentry5K errors/moTeam $26/moError tracking standard
Datadog5 hostsPro $15/host/moFull observability
PostHog1M events/moPay-as-you-goProduct analytics + session replay
LogTail (Better Stack)1 GB/mo$24/moLog management
Grafana Cloud10K metrics, 50 GB logsPro $29/moOpen-source ecosystem

Storage & CDN

ServiceFree TierPaid TierNotes
AWS S35 GB (12 months)~$0.023/GB/moStandard object storage
Cloudflare R210 GB + 10M reads/mo$0.015/GB/moNo egress fees
Google Cloud Storage5 GB~$0.020/GB/mo
Cloudflare CDNFreePro $20/moBest free CDN
CloudFront1 TB/mo (12 months)~$0.085/GBAWS ecosystem
Uploadthing2 GB free$10/moSimple file uploads for Next.js

Cost Presentation Rules

When presenting cost estimates, be thorough and comprehensive:

1. Infrastructure & Service Breakdown (MUST be detailed)

Format as a comprehensive table listing EVERY service:

CategoryServiceLow (Free Tiers)Medium (Starter)High (Production)Notes
HostingVercelHobby $0Pro $20/moPro $20/moUnlimited bandwidth
DatabaseSupabaseFree (500MB)Pro $25/moTeam $599/moIncludes auth+storage
EmailResendFree (3K/mo)Pro $20/mo$20/moBest DX
..................

Requirements:

  • List EVERY service from the architecture (hosting, database, auth, storage, email, monitoring, payment, LLM, third-party APIs)
  • Break down by clear categories (minimum 5-8 categories based on architecture)
  • Show specific tier names (not just prices): "Vercel Hobby $0" not just "$0"
  • Include what's included in each tier in Notes column
  • Show monthly totals for each scenario (Low/Medium/High)
  • Show first-year total for each scenario

2. Development Costs (MANDATORY section)

Always include development cost estimates based on complexity:

Time Estimation Formula:

  • Simple projects (complexity 1-3): 2-6 weeks
  • Moderate projects (complexity 4-6): 6-12 weeks
  • Complex projects (complexity 7-8): 12-20 weeks
  • Very complex projects (complexity 9-10): 20-30+ weeks

Rate Options (provide all three):

OptionHourly RateMinimum (weeks)Typical (weeks)Maximum (weeks)Total Range
Solo Developer$50-150/hr[complexity × 2][complexity × 3][complexity × 4]$X - $Y
Contractor$75-200/hr[complexity × 2][complexity × 3][complexity × 4]$X - $Y
Agency$150-300/hr[complexity × 2][complexity × 3][complexity × 4]$X - $Y

Calculation example for complexity 5 (moderate):

  • Solo: 10-20 weeks × 40 hrs × $50-150 = $20,000 - $120,000
  • Contractor: 10-20 weeks × 40 hrs × $75-200 = $30,000 - $160,000
  • Agency: 10-20 weeks × 40 hrs × $150-300 = $60,000 - $240,000

Factors that increase development time (+20-50% each):

  • Complex real-time features (WebSockets, live collaboration)
  • Multi-tenancy with complex permission models
  • Heavy data migration or integration with legacy systems
  • Custom design system (not using component library)
  • Advanced AI/ML features requiring training or fine-tuning
  • High security/compliance requirements (SOC 2, HIPAA, PCI-DSS)

3. Cost Optimization Tips (minimum 5-7 specific tips)

Each tip MUST:

  • Reference a specific service from the breakdown
  • Include quantified savings where possible
  • Be actionable (not generic advice)
  • Be prioritized by impact (highest savings first)

Template for each tip:

code
✅ [Action to take]
   - Saves: $X/month or Y%
   - Effort: [hours/days]
   - Trade-off: [what you lose, if anything]
   - Example: [concrete implementation detail]

Example tips:

code
✅ Start on free tiers and upgrade only when you hit limits
   - Saves: $45-70/month initially
   - Effort: None (just don't upgrade prematurely)
   - Trade-off: May need to upgrade quickly if growth spikes
   - Example: Supabase free tier supports 50K MAU, Vercel Hobby supports unlimited bandwidth

✅ Batch email notifications instead of real-time
   - Saves: ~60% on email costs ($12-18/mo)
   - Effort: 2-3 hours to implement digest system
   - Trade-off: Notifications delayed by 15-30 minutes
   - Example: Instead of 10K individual emails, send 2K daily digests (500 users × 4 emails/day → 1 digest)

✅ Use Cloudflare R2 instead of AWS S3 for public assets
   - Saves: $50-200/mo on egress fees at 1TB/month traffic
   - Effort: 4-6 hours migration
   - Trade-off: Slightly smaller ecosystem than S3
   - Example: R2 has zero egress fees; S3 charges $90/TB

✅ Implement Redis caching for database queries
   - Saves: $30-100/mo by reducing database tier needed
   - Effort: 1-2 days implementation
   - Trade-off: Added complexity, cache invalidation logic
   - Example: Cache user profile queries (10K/day → 100/day DB hits) allows staying on $25 tier

✅ Use serverless functions instead of always-on containers
   - Saves: $30-70/mo for low-traffic APIs (<1M req/mo)
   - Effort: Depends on existing architecture
   - Trade-off: Cold start latency (100-500ms)
   - Example: Cloud Run with min instances = 0 costs only $5/mo vs $50/mo for always-on

✅ Limit file upload sizes and use compression
   - Saves: $20-50/mo on storage costs
   - Effort: 2 hours to implement limits + compression
   - Trade-off: User experience if limits too strict
   - Example: 10MB limit + image compression reduces 50GB/mo uploads to 20GB/mo

✅ Use cheaper LLM models for simple tasks
   - Saves: 70-90% on LLM costs
   - Effort: 4-8 hours to implement model routing
   - Trade-off: Slightly lower quality for simple tasks
   - Example: Use Haiku ($0.80/MTok) for classification, Sonnet ($3/MTok) for generation

4. Cost Risk Flags (MANDATORY)

Identify and explain services that can spike costs:

Pay-per-use traps (services where costs grow non-linearly):

  • LLM token costs: Can explode with long contexts or infinite loops
  • Email services: Notification storms can send thousands of emails
  • SMS: Verification code spam or loops
  • Database bandwidth: Large table scans or missing indexes
  • Serverless invocations: Retry loops or webhook spam

Tier jump risks (services with large price jumps between tiers):

  • MongoDB Atlas: M0 Free → M10 $57 (+$57)
  • Supabase: Free → Pro $25 (+$25) → Team $599 (+$574!)
  • Auth0: Free 25K MAU → Essentials $35 for 500 MAU (danger if you grow past 500)
  • PlanetScale: Free → Scaler $39 (+$39)

Scale traps (services that get expensive at scale):

  • Datadog: $15/host/mo becomes $1,500/mo at 100 hosts
  • Sentry: Volume pricing above free tier
  • Real-time database subscriptions: Cost grows with concurrent connections
  • Video/image processing: Pay per transcode/operation

For each risk, provide:

  • Why it's risky (specific scenario that triggers high cost)
  • Typical cost at risk ($X/month if it happens)
  • Mitigation strategy (rate limiting, caps, monitoring, alternative)
  • Warning threshold (set alert at $X usage)

Example risk flag:

code
⚠️ LLM Token Cost Risk — High
   Scenario: User creates chatbot with 50K context window and 1M conversations/month
   Cost: Could reach $5,000-15,000/month vs expected $100/month
   Mitigation:
   - Implement context window limits (8K max)
   - Add rate limiting per user (10 requests/minute)
   - Use prompt caching (reduces input token costs by 90%)
   - Set billing alerts at $500, $1000, $2000
   Warning: Monitor token usage daily for first 2 weeks

5. Scale Warnings (REQUIRED if project targets 1K+ users)

Provide specific breakpoints where costs jump:

Format:

code
🚨 Scale Warning: [Service Name]

Current Tier: [Name] ($X/mo)
Limit: [Specific metric]
Expected to hit limit: [Timeline based on growth projection]
Next tier: [Name] ($Y/mo, +$Z)

Migration plan:
1. [First step before hitting limit]
2. [Second step]
3. [Upgrade trigger point]

Cost projection:
- Month 1-3: $X/mo (free/current tier)
- Month 4-6: $Y/mo (upgraded tier)
- Month 7-12: $Z/mo (scale tier)

Example:

code
🚨 Scale Warning: Supabase Database

Current Tier: Free ($0/mo)
Limits: 500MB database, 1GB file storage, 50K MAU
Expected to hit limit: Month 2-3 at 500 active users with file uploads
Next tier: Pro ($25/mo, includes 8GB database, 100GB storage)

Migration plan:
1. Set up database size monitoring (alert at 400MB)
2. Implement file cleanup policy (delete after 90 days)
3. Optimize database indexes and queries
4. Upgrade to Pro when database reaches 450MB or 40K MAU

Cost projection:
- Month 1-2: $0/mo (free tier)
- Month 3-6: $25/mo (Pro tier)
- Month 7-12: $25/mo (Pro tier sufficient for 10K users)
- Year 2+: Consider Team tier ($599/mo) if exceeding 100K MAU

6. Monthly vs Yearly Summary (REQUIRED)

Always provide both:

ScenarioMonthly TotalFirst Year Total3-Year Total
Low (Free tiers)$X$Y$Z
Medium (Starter)$X$Y$Z
High (Production)$X$Y$Z

Include note about:

  • Annual payment discounts (typically 15-20% savings)
  • Which services offer annual plans
  • Reserved instance savings for compute (AWS/GCP/Azure: 30-70% savings)

7. Total Cost of Ownership (TCO) Summary

Combine infrastructure + development + maintenance:

code
Year 1 Total Cost of Ownership

Development (one-time):
- Solo developer: $X - $Y
- Contractor: $X - $Y
- Agency: $X - $Y

Infrastructure (recurring):
- Months 1-12 average: $X/month = $Y/year

Maintenance (ongoing):
- Bug fixes + minor updates: 10-20% of development cost/year = $X - $Y/year
- Major feature additions: Budget $X - $Y/quarter

Year 1 TCO Range:
- Minimum (solo dev + free tiers): $X
- Typical (contractor + starter tiers): $Y
- Maximum (agency + production tiers): $Z