ahp-calculator
Analytic Hierarchy Process (AHP) calculation skill for pairwise comparison matrices, consistency checking, and weight derivation
What this skill does
# AHP Calculator
## Overview
The AHP Calculator skill implements the Analytic Hierarchy Process methodology for multi-criteria decision analysis. It enables systematic evaluation of alternatives through pairwise comparisons, consistency validation, and weight derivation, supporting both individual and group decision-making scenarios.
## Capabilities
- Pairwise comparison matrix creation
- Eigenvalue-based weight calculation
- Consistency ratio computation
- Inconsistency identification and correction guidance
- Group AHP aggregation (AIJ/AIP methods)
- Sensitivity analysis on weights
- AHP hierarchy visualization
- Report generation
## Used By Processes
- Multi-Criteria Decision Analysis (MCDA)
- Structured Decision Making Process
- Decision Quality Assessment
## Usage
### AHP Scale
The standard Saaty scale for pairwise comparisons:
- 1: Equal importance
- 3: Moderate importance
- 5: Strong importance
- 7: Very strong importance
- 9: Extreme importance
- 2, 4, 6, 8: Intermediate values
### Hierarchy Definition
```python
# Define AHP hierarchy
hierarchy = {
"goal": "Select Best Vendor",
"criteria": [
{
"name": "Cost",
"sub_criteria": ["Initial Cost", "Maintenance Cost"]
},
{
"name": "Quality",
"sub_criteria": ["Product Quality", "Service Quality"]
},
{
"name": "Delivery",
"sub_criteria": ["Lead Time", "Reliability"]
}
],
"alternatives": ["Vendor A", "Vendor B", "Vendor C"]
}
```
### Pairwise Comparison Matrix
```python
# Criteria comparison matrix
criteria_comparison = {
"Cost": {"Cost": 1, "Quality": 3, "Delivery": 5},
"Quality": {"Cost": 1/3, "Quality": 1, "Delivery": 3},
"Delivery": {"Cost": 1/5, "Quality": 1/3, "Delivery": 1}
}
```
### Consistency Analysis
The skill calculates:
- **Consistency Index (CI)**: (lambda_max - n) / (n - 1)
- **Consistency Ratio (CR)**: CI / RI (Random Index)
- **Acceptable threshold**: CR < 0.10
### Group Decision Making
Aggregation methods supported:
- **AIJ (Aggregation of Individual Judgments)**: Geometric mean of individual comparisons
- **AIP (Aggregation of Individual Priorities)**: Geometric mean of derived weights
## Input Schema
```json
{
"hierarchy": {
"goal": "string",
"criteria": ["object"],
"alternatives": ["string"]
},
"comparisons": {
"criteria": "matrix",
"sub_criteria": "object of matrices",
"alternatives": "object of matrices"
},
"options": {
"aggregation_method": "AIJ|AIP",
"consistency_threshold": "number",
"sensitivity_analysis": "boolean"
}
}
```
## Output Schema
```json
{
"weights": {
"criteria": "object",
"sub_criteria": "object",
"alternatives": "object"
},
"global_weights": "object",
"ranking": ["string"],
"consistency": {
"CR": "number",
"is_consistent": "boolean",
"inconsistent_comparisons": ["object"]
},
"sensitivity": {
"critical_criteria": ["string"],
"stability_intervals": "object"
}
}
```
## Best Practices
1. Limit criteria to 7-9 items per level (cognitive limit)
2. Always check consistency ratio before proceeding
3. Revisit inconsistent comparisons with stakeholders
4. Use geometric mean for group aggregation
5. Perform sensitivity analysis on close rankings
6. Document rationale for each pairwise comparison
## Correction Guidance
When CR > 0.10, the skill identifies:
- Most inconsistent judgments
- Suggested adjustment directions
- Impact of corrections on final weights
## Integration Points
- Connects with Stakeholder Preference Elicitor for data collection
- Feeds into TOPSIS Ranker for hybrid analysis
- Supports Decision Visualization for hierarchy diagrams
- Integrates with Consistency Validator for quality assurance
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.