
Sf Flex Estimator
Estimate Salesforce Flex Credit burn for Agentforce prompts, actions, and Data Cloud pipelines before you commit to an AI or CDP rollout.
Overview
sf-flex-estimator is an agent skill for the Validate phase that calculates Agentforce and Data Cloud Flex Credit usage from tiered rate tables and volume inputs.
Install
npx skills add https://github.com/jaganpro/sf-skills --skill sf-flex-estimatorWhat is this skill?
- Python CLI computes Flex costs with FC_COST baseline and optional Private Connect multiplier
- Agentforce prompt tiers: starter/basic (2), standard (4), advanced (16) credits per unit in PROMPT_RATES
- Action rates cover standard, custom, voice, and sandbox Agentforce workloads
- Data Cloud DC_RATES span prep, unification, segmentation, activation, queries, streaming, and real-time pipelines
- Alias map (DC_ALIASES) normalizes shorthand workload names into canonical rate keys
- FC_COST baseline $0.004 per Flex Credit in script constants
- PROMPT_RATES define four Agentforce prompt tiers (starter through advanced)
- DC_RATES includes 11+ distinct Data Cloud operation rate keys
Adoption & trust: 720 installs on skills.sh; 418 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are scoping Agentforce or Data Cloud but cannot translate expected prompts, actions, and pipeline jobs into Flex Credits and run-rate dollars.
Who is it for?
Builders and revops leads modeling Salesforce AI and CDP spend before implementation sprints or executive sign-off.
Skip if: Non-Salesforce stacks, teams that already have signed flex pools with fixed entitlements and no scenario planning, or production monitoring of actual metered usage.
When should I use this skill?
Run when estimating monthly Flex Credit burn for planned Agentforce prompts, actions, or Data Cloud job volumes.
What do I get? / Deliverables
You get structured credit and cost breakdowns from the calculator output (JSON-friendly dataclass fields) suitable for validation decks and go/no-go pricing decisions.
- JSON-serializable cost breakdown from dataclass output
- Scenario totals with Private Connect multiplier applied when relevant
Recommended Skills
Journey fit
Cost modeling belongs on Validate/pricing—the phase where you prove the idea is affordable before full Build on Salesforce. The script maps usage volumes to Flex Credits and dollar equivalents using published rate tables, which is pricing validation, not deployment.
How it compares
Use instead of spreadsheet guesswork when you need rate tables aligned to Salesforce Flex SKUs rather than generic cloud calculator sites.
Common Questions / FAQ
Who is sf-flex-estimator for?
Solo founders and small teams on Salesforce planning Agentforce agents or Data Cloud workloads who need defensible credit math before build.
When should I use sf-flex-estimator?
During Validate pricing when comparing agent tiers, Data Cloud pipeline mixes, or Private Connect scenarios before you lock scope.
Is sf-flex-estimator safe to install?
It is a local Python estimator over your inputs; review the Security Audits panel on this Prism page before adding any third-party skill to your agent.
SKILL.md
READMESKILL.md - Sf Flex Estimator
#!/usr/bin/env python3 """Flex Credit calculator for Agentforce and Data Cloud.""" from __future__ import annotations import argparse import json from dataclasses import asdict, dataclass, field from pathlib import Path from typing import Any, Dict, List, Optional, Tuple FC_COST = 0.004 PRIVATE_CONNECT_MULTIPLIER = 0.20 PROMPT_RATES: Dict[str, float] = { "starter": 2, "basic": 2, "standard": 4, "advanced": 16, } ACTION_RATES: Dict[str, float] = { "standard": 20, "custom": 20, "voice": 30, "sandbox": 16, } DC_RATES: Dict[str, float] = { "data_360_prep": 40, "data_360_unification": 75_000, "data_360_segmentation": 50, "data_360_activation": 60, "data_360_zero_copy_sharing": 60, "data_360_queries": 3, "data_360_unstructured_processing": 150, "data_360_intelligent_processing": 600, "data_360_streaming_pipeline": 3_500, "data_360_real_time_pipeline": 250_000, "data_360_code_extension": 40, } DC_ALIASES: Dict[str, str] = { "batch_internal": "data_360_prep", "batch_external": "data_360_prep", "prep": "data_360_prep", "profile_unification": "data_360_unification", "unification": "data_360_unification", "segmentation": "data_360_segmentation", "activation_batch": "data_360_activation", "activation_streaming": "data_360_activation", "queries": "data_360_queries", "unstructured": "data_360_unstructured_processing", "intelligent_processing": "data_360_intelligent_processing", "streaming": "data_360_streaming_pipeline", "real_time_pipeline": "data_360_real_time_pipeline", "zero_copy_sharing": "data_360_zero_copy_sharing", "code_extension": "data_360_code_extension", } TIER_THRESHOLDS: List[Tuple[float, float, float, str]] = [ (0, 300_000, 1.0, "Tier 1"), (300_000, 1_500_000, 0.8, "Tier 2"), (1_500_000, 12_500_000, 0.4, "Tier 3"), (12_500_000, float("inf"), 0.2, "Tier 4"), ] @dataclass class AgentStructure: prompts: Dict[str, int] = field(default_factory=dict) actions: Dict[str, int] = field(default_factory=dict) token_overages: Dict[str, Any] = field(default_factory=lambda: {"prompts": 0, "actions": 0}) def normalized(self) -> "AgentStructure": prompts = {k.lower(): int(v) for k, v in self.prompts.items() if int(v) != 0} actions = {k.lower(): int(v) for k, v in self.actions.items() if int(v) != 0} token_overages = self.token_overages or {"prompts": 0, "actions": 0} return AgentStructure(prompts=prompts, actions=actions, token_overages=token_overages) @dataclass class DataCloudOperations: operations: Dict[str, float] = field(default_factory=dict) private_connect: bool = False def normalized(self) -> "DataCloudOperations": normalized_ops: Dict[str, float] = {} for meter, volume in self.operations.items(): canonical = normalize_meter_name(meter) normalized_ops[canonical] = normalized_ops.get(canonical, 0.0) + float(volume) return DataCloudOperations(operations=normalized_ops, private_connect=bool(self.private_connect)) @dataclass class ScenarioVolumes: name: str agent_invocations: int dc_operations: Optional[Dict[str, float]] = None @dataclass class CostBreakdown: scenario_name: str agent_invocations: int af_prompt_fc: float af_action_fc: float af_token_overage_fc: float af_total_fc: float dc_base_fc: float dc_tiered_fc: float dc_discount_percent: float dc_private_connect_fc: float dc_total_fc: float total_monthly_fc: float total_monthly_cost: float total_annual_cost: float def normalize_meter_name(meter: str) -> str: key = meter.strip().lower() return DC_ALIASES.get(key, key) def empty_agent_structure() -> AgentStructure: return AgentStructure( prompts={"basic": 0, "standard": 0, "advanced": 0}, actions={"standard": 0, "voice": 0, "sandbox": 0}, token_overages={"