Synthèse automatique
Ce skill guide l'optimisation des dépenses de voyage dans Navan : analyse des réservations via l'API REST, configuration du moteur de règles, application des tarifs négociés, récupération des billets non utilisés et paramétrage de Navan Rewards.
Points forts
- Couvre tout le cycle d'optimisation, de l'analyse de données à la configuration des incentives
- Fournit des commandes curl/jq et un exemple TypeScript directement réutilisables pour calculer le délai moyen de réservation et les trajets les plus coûteux
- Donne des repères chiffrés concrets, comme viser 14 jours ou plus de délai moyen avant départ
- Inclut la gestion des billets non utilisés et du programme Navan Rewards, souvent oubliés dans les audits de dépenses
Limites
- Nécessite un compte Navan Admin avec identifiants OAuth 2.0 et au moins trois mois d'historique de réservations pour une analyse pertinente
- Aucun SDK n'existe : tous les appels sont écrits à la main contre https://api.navan.com/v1 et peuvent casser si l'API évolue
- Le document s'interrompt au début de la configuration du moteur de règles, donc les règles avancées demandent de compléter via l'interface Navan
À utiliser lorsqu'une équipe finance ou travel manager veut auditer les dépenses de voyage Navan et mettre en place des règles et incentives pour les réduire.
À éviter si vous n'avez pas d'accès administrateur à Navan ni de données de réservation historiques, ou si vous cherchez simplement à réserver un voyage.
Analyse de sécurité
PrudenceThe skill performs legitimate configuration and analysis against Navan's official API. It does not instruct destructive actions, exfiltration to arbitrary endpoints, or obfuscation. However, it uses network access and handles sensitive credentials, so caution is warranted.
- •Uses Bash with curl to make network requests to api.navan.com, handling OAuth credentials via environment variables.
- •Passes bearer tokens in command-line arguments, which may be exposed in shell history or process listings.
- •Includes inline TypeScript code that fetches and processes booking data, requiring careful review of API responses.
Exemples
Run a navan cost tuning analysis on our last 90 days of bookings: average lead time, out-of-policy percentage, unused tickets, and the top 5 routes by spend.Help me configure Navan's policy engine with a hard cap of $600 for domestic economy flights and a soft cap warning for business class on flights over 6 hours.Our out-of-policy rate is too high — design a Navan Rewards configuration that incentivizes employees to book at least 14 days in advance and pick cheaper fares.name: navan-cost-tuning description: 'Use when optimizing travel spend with Navan''s policy engine, analyzing booking patterns for savings, and configuring the Navan Rewards program.
Trigger with "navan cost tuning" or "navan travel savings" or "navan spend optimization".
' allowed-tools: Read, Write, Edit, Bash(curl:*), Grep, Glob version: 1.7.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- navan
- travel compatibility: Designed for Claude Code
Navan Cost Tuning
Overview
Navan's platform includes a built-in policy engine, negotiated rate management, unused ticket tracking, and the Navan Rewards program — but these features require deliberate configuration to deliver savings. This skill covers the full cost optimization lifecycle: setting up travel policies with hard and soft caps, analyzing booking data via the REST API to find savings opportunities, enforcing negotiated corporate rates, recovering value from unused tickets, and incentivizing employees to choose cheaper options through Navan Rewards. No SDK exists — all analytics use direct REST API calls against https://api.navan.com/v1.
Prerequisites
- Navan Admin account with policy management permissions
- OAuth 2.0 credentials from Admin > API Settings (client_id, client_secret)
- Historical booking data — at least 3 months for meaningful analysis
- Navan plan — Business (free for up to 300 employees), Expense ($15/user/month after 5 free), or Enterprise (custom)
- Pricing details: https://navan.com/pricing
Instructions
Step 1 — Analyze Current Spend via API
Pull booking data to identify where money is being lost:
# Authenticate
ACCESS_TOKEN=$(curl -sf -X POST https://api.navan.com/ta-auth/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${NAVAN_CLIENT_ID}&client_secret=${NAVAN_CLIENT_SECRET}" \
| jq -r '.access_token')
# Fetch last 90 days of bookings for analysis (page + size pagination)
curl -s "https://api.navan.com/v1/bookings?createdFrom=2026-01-01&page=0&size=50" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-o bookings.json
# Analyze: average booking lead time (days before travel)
# Response structure: records in .data array
jq '[.data[] | ((.departure_date | fromdate) - (.created_at | fromdate)) / 86400] | add / length' \
bookings.json
# Target: 14+ days average lead time for maximum savings
// Identify top savings opportunities by category
interface BookingAnalysis {
total_spend: number;
avg_lead_time_days: number;
out_of_policy_pct: number;
unused_tickets: number;
top_routes: { route: string; spend: number; trips: number }[];
}
async function analyzeSpend(token: string): Promise<BookingAnalysis> {
const response = await fetch(
'https://api.navan.com/v1/bookings?page=0&size=50',
{ headers: { 'Authorization': `Bearer ${token}` } }
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data: bookings } = await response.json();
const routeMap = new Map<string, { spend: number; trips: number }>();
let totalSpend = 0;
let outOfPolicy = 0;
for (const b of bookings) {
totalSpend += b.total_amount;
if (b.out_of_policy) outOfPolicy++;
const route = `${b.origin}-${b.destination}`;
const existing = routeMap.get(route) ?? { spend: 0, trips: 0 };
routeMap.set(route, {
spend: existing.spend + b.total_amount,
trips: existing.trips + 1,
});
}
return {
total_spend: totalSpend,
avg_lead_time_days: calculateAvgLeadTime(bookings),
out_of_policy_pct: (outOfPolicy / bookings.length) * 100,
unused_tickets: await countUnusedTickets(token),
top_routes: [...routeMap.entries()]
.map(([route, data]) => ({ route, ...data }))
.sort((a, b) => b.spend - a.spend)
.slice(0, 10),
};
}
Step 2 — Configure the Policy Engine
Set up travel policies in Navan Admin > Policies with these recommended tiers:
| Policy Rule | Configuration | Savings Impact | |------------|---------------|----------------| | Flight cap | Soft cap at lowest logical fare + 20% | 10-15% on airfare | | Hotel cap | Per-city nightly rate (e.g., NYC $250, Austin $180) | 15-25% on lodging | | Advance booking | Flag bookings made < 7 days before travel | 20-30% on last-minute trips | | Cabin class | Economy for flights < 6 hours, Business for 6+ | Varies by route mix | | Approval workflow | Manager approval for out-of-policy bookings | Reduces out-of-policy by 40-60% |
Step 3 — Enforce Negotiated Corporate Rates
# Check if negotiated rates are being utilized
curl -s "https://api.navan.com/v1/bookings?page=0&size=50" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" | \
jq '{
total_bookings: (.data | length),
bookings_with_negotiated: [.data[] | select(.negotiated_savings != null)] | length,
total_savings: [.data[].negotiated_savings // 0] | add
}'
Upload negotiated rates in Navan Admin > Rates. Navan automatically surfaces these as preferred options during booking.
Step 4 — Track Unused Tickets
# Identify unused or partially used tickets
curl -s "https://api.navan.com/v1/bookings?page=0&size=50" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" | \
jq '{
cancelled: [.data[] | select(.status == "cancelled")] | length,
total_credit_value: [.data[] | select(.status == "cancelled") | .credit_amount // 0] | add
}'
# Credits expiring within 30 days should be rebooked or refunded
Step 5 — Enable Navan Rewards
Navan Rewards gives employees personal travel credit when they book below policy limits. Configure in Admin > Rewards:
- Activation: Enable Navan Rewards for all employees or specific departments
- Credit calculation: Employee earns a percentage of the difference between policy cap and actual booking
- Redemption: Credits apply to personal travel booked through Navan
- Reporting: Track rewards earned and redeemed via the admin dashboard
This creates a direct incentive for employees to choose cheaper options — Navan reports typical 5-15% additional savings from Rewards adoption.
Output
A cost optimization implementation delivering:
- Spend analysis report identifying top savings opportunities by department and route
- Configured policy engine with hard/soft caps and approval workflows
- Negotiated rate enforcement surfacing corporate rates during booking
- Unused ticket recovery preventing credit expiration
- Navan Rewards activation incentivizing employee cost-conscious booking behavior
Error Handling
| HTTP Code | Meaning | Resolution |
|-----------|---------|------------|
| 200 | Success | Process response data |
| 401 | Token expired | Refresh OAuth token and retry |
| 403 | Plan does not include this feature | Check Navan plan tier at https://navan.com/pricing |
| 404 | Endpoint not available for your region | Contact Navan support for regional API availability |
| 422 | Invalid policy configuration | Verify cap amounts and currency codes |
| 429 | Rate limited | Reduce analytics query frequency |
Examples
Monthly savings dashboard query:
# Generate a monthly savings summary
curl -s "https://api.navan.com/v1/reports/savings-summary?period=2026-02" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" | \
jq '{
period: .period,
total_spend: .total_spend,
policy_savings: .in_policy_savings,
negotiated_rate_savings: .negotiated_savings,
rewards_credits_earned: .rewards_earned,
unused_tickets_recovered: .credits_rebooked,
total_savings: (.in_policy_savings + .negotiated_savings + .credits_rebooked)
}'
Resources
- Navan Help Center — Policy setup guides and API docs
- Navan Pricing — Plan comparison (Business free up to 300 employees)
- Navan Integrations — ERP connectors for automated expense reporting
Next Steps
- Add
navan-reference-architecturefor end-to-end integration design - Add
navan-performance-tuningto optimize the API calls powering cost analytics - See
navan-observabilityto monitor policy compliance rates over time
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/navan-cost-tuning-msfn19a4' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/navan-cost-tuning-msfn19a4/download' --output '.skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md.part' && mv '.skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md.part' '.skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Environnement déclaré par l’auteur : Designed for Claude Code
Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Write, Edit, Bash(curl:*), Grep, Glob
Extrait original : Prerequisites
- Navan Admin account with policy management permissions
- OAuth 2.0 credentials from Admin > API Settings (client_id, client_secret)
- Historical booking data — at least 3 months for meaningful analysis
- Navan plan — Business (free for up to 300 employees), Expense ($15/user/month after 5 free), or Enterprise (custom)
- Pricing details: https://navan.com/pricing
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md' && test -s '.skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/navan-cost-tuning' && cp -R '.skill-downloads/navan-cost-tuning-msfn19a4' '.claude/skills/navan-cost-tuning'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/navan-cost-tuning-msfn19a4'openskills read 'navan-cost-tuning-msfn19a4'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/navan-cost-tuning-msfn19a4/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Lecteur PDF
Productivite
Lit et extrait le texte de fichiers PDF (rapports, contrats, tableurs). Gère les fichiers locaux, les URL et les pièces jointes WhatsApp. Utilisez-le dès qu'un contenu PDF est nécessaire, même sans demande explicite.
Workflows de messagerie Discord
Productivite
Utilisez l'outil message pour envoyer, modifier et modérer des messages Discord avec des composants interactifs.
Aperçu interactif des verdicts
Productivite
Générer un aperçu HTML interactif des verdicts (garder/supprimer) pour la revue par le mainteneur, puis traiter le JSON de retour.