mcpbeat Sign in

Algo Price Elasticity Agent Skill

Calculate price elasticity of demand to quantify how price changes affect sales volume. Use this skill when the user needs to estimate demand sensitivity, set optimal prices, or evaluate the revenue impact of price changes — even if they say 'how sensitive are customers to price', 'will a price increase hurt sales', or 'elasticity calculation'.

7k tokens
context cost
the whole folder, loaded on every use
5
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
223
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-price-elasticity

What comes with it

24 864 bytes besides the instruction
examples/sample_input.json
references/cross-price.md
references/regression-estimation.md
scripts/arc_elasticity.py

The instruction itself

15 sections, as written by the author

Price Elasticity of Demand

Overview

Price elasticity measures the percentage change in quantity demanded for a 1% change in price. Ed = %ΔQ / %ΔP. |Ed| > 1 = elastic (price-sensitive), |Ed| < 1 = inelastic (price-insensitive). Critical for pricing decisions and revenue optimization.

When to Use

Trigger conditions:

  • Estimating how a price change will affect unit sales and revenue
  • Determining if demand is elastic or inelastic for a product
  • Optimizing price for maximum revenue or profit

When NOT to use:

  • When you need consumer willingness-to-pay distribution (use Van Westendorp or conjoint)
  • When pricing multiple products together (use bundle pricing)

Algorithm

IRON LAW: Elasticity Is NOT Constant Along a Linear Demand Curve
It varies at every price point. At high prices, demand is elastic
(small price increase → big volume drop). At low prices, demand is
inelastic. Always calculate at the SPECIFIC price point of interest.
Revenue-maximizing price is where Ed = -1 (unit elastic).

Phase 1: Input Validation

Collect: price-quantity pairs over time (or across markets). Control for: seasonality, promotions, competitor actions, other confounders.

Gate: Minimum 10 price-quantity observations, confounders identified.

Phase 2: Core Algorithm

Point elasticity: Ed = (dQ/dP) × (P/Q) at a specific price point

Arc elasticity: Ed = ((Q₂-Q₁)/((Q₂+Q₁)/2)) / ((P₂-P₁)/((P₂+P₁)/2)) between two points

Regression method: log(Q) = α + β×log(P) + controls → β is the elasticity (constant elasticity model)

Phase 3: Verification

Check: sign should be negative (price up → quantity down). Cross-validate with holdout periods.

Gate: Elasticity is negative, confidence interval is reasonable.

Phase 4: Output

Return elasticity estimate with revenue impact projection.

Output Format

{
  "elasticity": -1.5,
  "interpretation": "elastic — 1% price increase → 1.5% quantity decrease",
  "revenue_impact": {"price_change_pct": 10, "quantity_change_pct": -15, "revenue_change_pct": -6.5},
  "metadata": {"method": "log-log regression", "r_squared": 0.82, "observations": 52}
}

Examples

Sample I/O

Input: Price increased 10% from $100 to $110, quantity dropped from 1000 to 850

Expected: Arc elasticity = ((-150/925) / (10/105)) = -1.70 (elastic)

Edge Cases

| Input | Expected | Why |

|-------|----------|-----|

| Luxury good | May be positive (Veblen) | Higher price → higher perceived value |

| Necessity (insulin) | Near zero | Demand barely responds to price |

| Perfect substitute available | Very elastic (< -3) | Customers switch immediately |

Gotchas

  • Omitted variable bias: Without controlling for advertising, seasonality, and competitor prices, elasticity estimates are biased.
  • Short-run vs long-run: Short-run elasticity is typically lower (customers are locked in). Long-run gives them time to find substitutes.
  • Cross-price elasticity: Demand for product A may depend on product B's price. Ignoring this in a portfolio context leads to suboptimal pricing.
  • Asymmetric elasticity: Consumers may react differently to price increases vs decreases. Don't assume symmetry.
  • Small sample noise: With few observations, elasticity estimates have wide confidence intervals. Report intervals, not just point estimates.

Scripts

| Script | Description | Usage |

|--------|-------------|-------|

| scripts/arc_elasticity.py | Compute arc elasticity and revenue impact | python scripts/arc_elasticity.py --help |

Run python scripts/arc_elasticity.py --verify to execute built-in sanity tests.

References

  • For regression-based elasticity estimation, see references/regression-estimation.md
  • For cross-price elasticity analysis, see references/cross-price.md

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take asgard-ai-platform/algo-price-elasticity from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.