ahp-calculator
Analytic Hierarchy Process (AHP) calculation skill for pairwise comparison matrices, consistency checking, and weight derivation
Best use case
ahp-calculator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analytic Hierarchy Process (AHP) calculation skill for pairwise comparison matrices, consistency checking, and weight derivation
Teams using ahp-calculator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ahp-calculator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ahp-calculator Compares
| Feature / Agent | ahp-calculator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analytic Hierarchy Process (AHP) calculation skill for pairwise comparison matrices, consistency checking, and weight derivation
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 assuranceRelated Skills
typography-calculator
Calculate typography scales, metrics, and responsive font sizing
prioritization-calculator
Automated calculation and scoring for product prioritization frameworks including RICE, ICE, MoSCoW, and custom weighted scoring. Normalizes scores, validates inputs, and generates priority rankings with confidence intervals.
power-analysis-calculator
Skill for statistical power analysis and sample size calculation
vasp-dft-calculator
VASP DFT calculation skill for electronic structure, band structures, and materials property predictions
madgraph-amplitude-calculator
MadGraph matrix element calculation skill for BSM physics, cross-section computation, and event generation
camb-cosmology-calculator
CAMB cosmological perturbation skill for CMB power spectra, matter power spectra, and cosmological parameter estimation
power-sample-size-calculator
Statistical power analysis and sample size determination
takt-time-calculator
Takt time and cycle time analysis skill for production line balancing and capacity planning.
niosh-lifting-calculator
NIOSH Lifting Equation calculator for manual material handling risk assessment.
asymptotic-notation-calculator
Automated derivation and simplification of Big-O, Big-Omega, and Big-Theta expressions for algorithm analysis
approximation-ratio-calculator
Analyze and prove approximation ratios for optimization algorithms
wind-load-calculator
Wind load calculation skill per ASCE 7 for MWFRS and components and cladding