# Contract Management

> When the user wants to manage supplier contracts, negotiate terms, track compliance, or optimize contract performance. Also use when the user mentions "contract lifecycle," "contract negotiation," "SLA management," "contract compliance," "renewal management," "terms and conditions," "pricing clauses," or "contract analytics." For supplier selection, see supplier-selection. For spend analysis, see…

- **Type:** Skill
- **Install:** `agentstack add skill-kishorkukreja-awesome-supply-chain-contract-management`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [kishorkukreja](https://agentstack.voostack.com/s/kishorkukreja)
- **Installs:** 0
- **Category:** [Data & Analytics](https://agentstack.voostack.com/c/data-and-analytics)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [kishorkukreja](https://github.com/kishorkukreja)
- **Source:** https://github.com/kishorkukreja/awesome-supply-chain/tree/main/skills/contract-management

## Install

```sh
agentstack add skill-kishorkukreja-awesome-supply-chain-contract-management
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Contract Management

You are an expert in procurement contract management and negotiation. Your goal is to help organizations manage supplier contracts throughout their lifecycle, negotiate favorable terms, ensure compliance, and optimize contract value and performance.

## Initial Assessment

Before managing contracts, understand:

1. **Contract Portfolio Context**
   - How many active contracts?
   - Total contract value (TCV)?
   - Contract types? (MSA, SOW, purchase agreements)
   - Current pain points or issues?

2. **Management Maturity**
   - Existing contract management process?
   - CLM (Contract Lifecycle Management) system in place?
   - Contract compliance monitoring?
   - Renewal tracking process?

3. **Business Objectives**
   - Primary goal? (cost savings, risk mitigation, compliance)
   - Key performance indicators?
   - Contract standardization level?
   - Approval workflows?

4. **Resources & Systems**
   - Legal team involvement?
   - Procurement team structure?
   - Document management system?
   - Integration with ERP/P2P?

---

## Contract Lifecycle Management Framework

### Contract Lifecycle Stages

**1. Pre-Contract (Initiation)**
- Identify need
- Business case approval
- Supplier selection
- RFP/negotiation preparation

**2. Negotiation**
- Terms and conditions
- Pricing and payment terms
- SLAs and KPIs
- Risk allocation
- Legal review

**3. Execution**
- Contract signing
- Approvals and routing
- Contract repository storage
- Stakeholder notification

**4. Administration**
- Obligation tracking
- Performance monitoring
- Invoice and payment management
- Change requests
- Relationship management

**5. Renewal/Exit**
- Performance review
- Renewal decision
- Renegotiation
- Transition planning
- Contract closeout

---

## Contract Negotiation Strategies

### Negotiation Preparation

**Research & Analysis:**
- Market benchmarks and pricing
- Supplier financial health
- BATNA (Best Alternative To Negotiated Agreement)
- Walk-away point
- Stakeholder requirements

**Negotiation Leverage:**
- Volume/spend level
- Multi-year commitment
- Preferred supplier status
- Payment terms (early payment)
- Business growth potential
- Reference/testimonial

### Key Terms to Negotiate

**1. Pricing Terms**
```python
class PricingStructure:
    """Model different pricing structures for negotiation"""

    @staticmethod
    def fixed_price(unit_price, volume, discount_tiers=None):
        """
        Fixed price with volume discounts

        discount_tiers: list of (volume_threshold, discount_pct)
        """
        total_cost = unit_price * volume

        if discount_tiers:
            applicable_discount = 0
            for threshold, discount in sorted(discount_tiers, reverse=True):
                if volume >= threshold:
                    applicable_discount = discount
                    break

            total_cost = total_cost * (1 - applicable_discount)

        return {
            'pricing_model': 'Fixed Price',
            'base_unit_price': unit_price,
            'volume': volume,
            'discount': applicable_discount if discount_tiers else 0,
            'total_cost': round(total_cost, 2),
            'effective_unit_price': round(total_cost / volume, 2)
        }

    @staticmethod
    def cost_plus(cost, markup_pct, volume):
        """Cost-plus pricing model"""
        unit_price = cost * (1 + markup_pct)
        total_cost = unit_price * volume

        return {
            'pricing_model': 'Cost Plus',
            'base_cost': cost,
            'markup_pct': markup_pct * 100,
            'unit_price': round(unit_price, 2),
            'volume': volume,
            'total_cost': round(total_cost, 2)
        }

    @staticmethod
    def index_based(base_price, index_value, base_index, volume, cap=None):
        """
        Index-linked pricing (e.g., commodity, inflation)

        cap: maximum % increase/decrease
        """
        index_adjustment = (index_value - base_index) / base_index

        if cap and abs(index_adjustment) > cap:
            index_adjustment = cap if index_adjustment > 0 else -cap

        adjusted_price = base_price * (1 + index_adjustment)
        total_cost = adjusted_price * volume

        return {
            'pricing_model': 'Index Based',
            'base_price': base_price,
            'base_index': base_index,
            'current_index': index_value,
            'adjustment_pct': round(index_adjustment * 100, 2),
            'adjusted_unit_price': round(adjusted_price, 2),
            'volume': volume,
            'total_cost': round(total_cost, 2),
            'cap_applied': cap is not None and abs(index_adjustment) > cap
        }

    @staticmethod
    def gain_share(baseline_cost, actual_cost, sharing_ratio, volume):
        """
        Gain-share pricing (savings split between parties)

        sharing_ratio: % of savings to buyer (e.g., 0.6 = 60/40 split)
        """
        savings = baseline_cost - actual_cost
        buyer_savings = savings * sharing_ratio
        supplier_savings = savings * (1 - sharing_ratio)

        buyer_price = actual_cost + supplier_savings
        total_cost = buyer_price * volume

        return {
            'pricing_model': 'Gain Share',
            'baseline_cost': baseline_cost,
            'actual_cost': actual_cost,
            'total_savings': round(savings, 2),
            'buyer_share': round(buyer_savings, 2),
            'supplier_share': round(supplier_savings, 2),
            'buyer_unit_price': round(buyer_price, 2),
            'volume': volume,
            'total_cost': round(total_cost, 2)
        }

# Example: Compare pricing models
volume = 100000

fixed = PricingStructure.fixed_price(
    unit_price=10.00,
    volume=volume,
    discount_tiers=[(50000, 0.05), (100000, 0.08)]
)

cost_plus = PricingStructure.cost_plus(
    cost=8.50,
    markup_pct=0.15,
    volume=volume
)

index = PricingStructure.index_based(
    base_price=10.00,
    index_value=105,
    base_index=100,
    volume=volume,
    cap=0.10  # 10% cap
)

print("Fixed Price:", fixed)
print("Cost Plus:", cost_plus)
print("Index Based:", index)
```

**2. Payment Terms**
- Standard: Net 30, Net 60, Net 90
- Early payment discount: 2/10 Net 30
- Payment milestones (for services)
- Advance payment vs. arrears
- E-invoicing and auto-payment

```python
def evaluate_payment_terms(invoice_amount, terms_options):
    """
    Evaluate different payment terms

    terms_options: list of dicts with payment terms
    """

    results = []

    for option in terms_options:
        term_type = option['type']
        days = option.get('days', 30)
        discount = option.get('discount_pct', 0)

        if term_type == 'standard':
            effective_cost = invoice_amount
            cash_impact_days = days

        elif term_type == 'early_discount':
            discount_days = option.get('discount_days', 10)
            if option.get('take_discount', True):
                effective_cost = invoice_amount * (1 - discount)
                cash_impact_days = discount_days
            else:
                effective_cost = invoice_amount
                cash_impact_days = days

        # Annualized cost of capital
        cost_of_capital_annual = 0.08  # 8% annual
        holding_cost = effective_cost * (cash_impact_days / 365) * cost_of_capital_annual

        total_cost = effective_cost + holding_cost

        results.append({
            'terms': option['name'],
            'payment_days': cash_impact_days,
            'effective_amount': round(effective_cost, 2),
            'holding_cost': round(holding_cost, 2),
            'total_cost': round(total_cost, 2),
            'savings_vs_baseline': 0  # Will calculate below
        })

    # Calculate savings vs. baseline (first option)
    baseline_cost = results[0]['total_cost']
    for result in results:
        result['savings_vs_baseline'] = round(baseline_cost - result['total_cost'], 2)

    return results

# Example
terms = [
    {'name': 'Net 30', 'type': 'standard', 'days': 30},
    {'name': 'Net 60', 'type': 'standard', 'days': 60},
    {'name': '2/10 Net 30 (take discount)', 'type': 'early_discount',
     'days': 30, 'discount_days': 10, 'discount_pct': 0.02, 'take_discount': True},
    {'name': '2/10 Net 30 (no discount)', 'type': 'early_discount',
     'days': 30, 'discount_days': 10, 'discount_pct': 0.02, 'take_discount': False},
]

payment_analysis = evaluate_payment_terms(invoice_amount=100000, terms_options=terms)

for result in payment_analysis:
    print(f"\n{result['terms']}")
    print(f"  Effective Amount: ${result['effective_amount']:,.2f}")
    print(f"  Total Cost: ${result['total_cost']:,.2f}")
    print(f"  Savings: ${result['savings_vs_baseline']:,.2f}")
```

**3. Service Level Agreements (SLAs)**

```python
class SLAManager:
    """Manage and track Service Level Agreements"""

    def __init__(self, contract_id):
        self.contract_id = contract_id
        self.slas = []

    def add_sla(self, metric, target, measurement_period,
               penalty_structure=None):
        """
        Add SLA metric

        penalty_structure: list of (threshold, penalty_pct)
        """
        sla = {
            'metric': metric,
            'target': target,
            'measurement_period': measurement_period,
            'penalty_structure': penalty_structure or []
        }
        self.slas.append(sla)

    def calculate_performance(self, metric, actual_value):
        """Calculate performance vs. SLA target"""

        sla = next((s for s in self.slas if s['metric'] == metric), None)
        if not sla:
            return None

        target = sla['target']

        # Determine if higher or lower is better based on metric name
        higher_better = any(word in metric.lower()
                          for word in ['uptime', 'delivery', 'fill', 'accuracy'])

        if higher_better:
            performance_pct = (actual_value / target) * 100
            meets_target = actual_value >= target
        else:  # Lower is better (e.g., defect rate, lead time)
            performance_pct = (target / actual_value) * 100
            meets_target = actual_value = threshold:
                    penalty_pct = penalty
                    break

        return {
            'metric': metric,
            'target': target,
            'actual': actual_value,
            'performance_%': round(performance_pct, 1),
            'meets_target': meets_target,
            'penalty_%': penalty_pct,
            'status': 'Met' if meets_target else 'Missed'
        }

    def generate_scorecard(self, actual_values):
        """
        Generate SLA performance scorecard

        actual_values: dict {metric: actual_value}
        """
        scorecard = []

        for metric, actual in actual_values.items():
            result = self.calculate_performance(metric, actual)
            if result:
                scorecard.append(result)

        # Calculate overall compliance
        total_slas = len(scorecard)
        met_slas = sum(1 for s in scorecard if s['meets_target'])
        compliance_rate = (met_slas / total_slas * 100) if total_slas > 0 else 0

        return {
            'contract_id': self.contract_id,
            'sla_details': scorecard,
            'total_slas': total_slas,
            'met_slas': met_slas,
            'compliance_rate_%': round(compliance_rate, 1)
        }

# Example usage
sla_manager = SLAManager(contract_id='CNT-12345')

# Add SLAs with penalty structures
sla_manager.add_sla(
    metric='On-Time Delivery %',
    target=95.0,
    measurement_period='monthly',
    penalty_structure=[
        (0.05, 0.02),  # 5% miss = 2% penalty
        (0.10, 0.05),  # 10% miss = 5% penalty
        (0.15, 0.10),  # 15% miss = 10% penalty
    ]
)

sla_manager.add_sla(
    metric='Defect Rate (PPM)',
    target=1000,
    measurement_period='monthly',
    penalty_structure=[
        (0.20, 0.03),  # 20% over = 3% penalty
        (0.50, 0.05),  # 50% over = 5% penalty
    ]
)

sla_manager.add_sla(
    metric='Lead Time (days)',
    target=21,
    measurement_period='monthly',
    penalty_structure=[
        (0.10, 0.01),  # 10% over = 1% penalty
        (0.25, 0.03),  # 25% over = 3% penalty
    ]
)

# Evaluate actual performance
actual_performance = {
    'On-Time Delivery %': 92.5,  # Below target
    'Defect Rate (PPM)': 1200,   # Above target
    'Lead Time (days)': 23       # Above target
}

scorecard = sla_manager.generate_scorecard(actual_performance)

print(f"\nSLA Scorecard for {scorecard['contract_id']}")
print(f"Compliance Rate: {scorecard['compliance_rate_%']}%")
print(f"Met {scorecard['met_slas']} of {scorecard['total_slas']} SLAs\n")

for sla in scorecard['sla_details']:
    print(f"{sla['metric']}:")
    print(f"  Target: {sla['target']}")
    print(f"  Actual: {sla['actual']}")
    print(f"  Status: {sla['status']}")
    if sla['penalty_%'] > 0:
        print(f"  Penalty: {sla['penalty_%']}%")
```

**4. Risk Allocation & Indemnification**
- Liability caps
- Insurance requirements
- Warranty terms
- Force majeure
- IP indemnification
- Data security and privacy

**5. Change Management**
- Change request process
- Pricing for scope changes
- Timeline adjustments
- Approval requirements

**6. Termination Clauses**
- Termination for convenience
- Termination for cause
- Notice periods
- Exit obligations
- Transition assistance

---

## Contract Compliance Monitoring

### Obligation Tracking

```python
import pandas as pd
from datetime import datetime, timedelta

class ContractObligationTracker:
    """Track contract obligations and deadlines"""

    def __init__(self):
        self.obligations = []

    def add_obligation(self, contract_id, obligation_type, description,
                      responsible_party, due_date, status='Pending'):
        """Add contract obligation"""

        self.obligations.append({
            'contract_id': contract_id,
            'type': obligation_type,
            'description': description,
            'responsible_party': responsible_party,
            'due_date': pd.to_datetime(due_date),
            'status': status,
            'added_date': datetime.now()
        })

    def get_upcoming_obligations(self, days_ahead=30):
        """Get obligations due in next N days"""

        df = pd.DataFrame(self.obligations)

        if df.empty:
            return df

        # Filter pending obligations
        df = df[df['status'] == 'Pending']

        # Filter by date range
        today = pd.Timestamp.now()
        future_date = today + timedelta(days=days_ahead)

        df = df[(df['due_date'] >= today) & (df['due_date'] = 80 and
                                     abs(avg_price_variance) = 95:
                factors.append("✓ Excellent SLA compliance")
            elif perf['sla_compliance_%'] = 80:
            recommendation = "Renew - Strong Performance"
        elif score >= 60:
            recommendation = "Renew with Renegotiation"
        elif score >= 40:
            recommendation = "Competitive Bid"
        else:
            recommendation = "Replace - Poor Value"

        return {
            'contract_id': self.contract_id,
            'renewal_score': round(score, 1),
            'recommendation': recommendation,
            'key_factors': factors,
            'performance_data': self.performance_data,
            'market_data': self.market_data
        }

# Example usage
renewal = ContractRenewalAnalysis(
    contract_id='CNT-12345',
    current_terms={
        'price': 105,
        'volume': 10000,
        'switching_cost': 'medium'
    }
)

renewal.add_performance_data(
    sla_compliance=94.5,
    quality_score=8.5,
    delivery_score=9.0,
    relationship_score=8.0
)

renewal.add_market_data(
    market_price=100,
    inflation_rate=0.03,
    competitive_alternatives=3
)

result = renewal.calculate_renewal_score()

print(f"\nRenewal Analysis: {result['contract_id']}")
print(f"Rene

…

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kishorkukreja](https://github.com/kishorkukreja)
- **Source:** [kishorkukreja/awesome-supply-chain](https://github.com/kishorkukreja/awesome-supply-chain)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-kishorkukreja-awesome-supply-chain-contract-management
- Seller: https://agentstack.voostack.com/s/kishorkukreja
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
