navan-debug-bundle
Use when collecting diagnostic data from a Navan API integration — OAuth token inspection, API response capture, connectivity testing, and request/response logging. Trigger with "navan debug bundle" or "debug navan api".
Best use case
navan-debug-bundle is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when collecting diagnostic data from a Navan API integration — OAuth token inspection, API response capture, connectivity testing, and request/response logging. Trigger with "navan debug bundle" or "debug navan api".
Teams using navan-debug-bundle 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/navan-debug-bundle/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How navan-debug-bundle Compares
| Feature / Agent | navan-debug-bundle | 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?
Use when collecting diagnostic data from a Navan API integration — OAuth token inspection, API response capture, connectivity testing, and request/response logging. Trigger with "navan debug bundle" or "debug navan api".
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.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# Navan Debug Bundle
## Overview
Collect diagnostic data from Navan REST API integrations into a structured, shareable debug bundle. Navan has no SDK — all debugging uses raw HTTP requests against their OAuth 2.0 REST endpoints.
## Prerequisites
- Navan API credentials: `client_id` and `client_secret` from Admin > Travel admin > Settings > Integrations
- `curl` and `jq` installed locally
- Credentials are viewable **only once** at creation — store them in a secret manager immediately
- No sandbox environment exists; all API calls hit production
## Instructions
### Step 1 — Create Bundle Directory
```bash
BUNDLE_DIR="navan-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"/{auth,api,connectivity,env}
echo "Bundle initialized: $BUNDLE_DIR"
```
### Step 2 — Capture Environment State
```bash
cat > "$BUNDLE_DIR/env/config.txt" <<ENVEOF
Timestamp: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
NAVAN_CLIENT_ID: ${NAVAN_CLIENT_ID:+SET (not empty)}${NAVAN_CLIENT_ID:-UNSET}
NAVAN_CLIENT_SECRET: ${NAVAN_CLIENT_SECRET:+SET (not empty)}${NAVAN_CLIENT_SECRET:-UNSET}
NAVAN_TOKEN_URL: ${NAVAN_TOKEN_URL:-https://api.navan.com/ta-auth/oauth/token}
curl version: $(curl --version | head -1)
jq version: $(jq --version 2>/dev/null || echo "not installed")
ENVEOF
```
### Step 3 — Test OAuth Token Acquisition
```bash
curl -s -w "\n---HTTP_CODE:%{http_code}---\n" \
-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" \
| tee "$BUNDLE_DIR/auth/token-response.json" \
| jq '{has_token: (.access_token != null), error: .error}'
```
If the token response returns HTTP 401, the credentials are invalid or expired. If HTTP 403, the API integration may not be enabled for your organization.
### Step 4 — Probe API Endpoints
Test each core endpoint and capture full response headers:
```bash
TOKEN=$(jq -r '.access_token' "$BUNDLE_DIR/auth/token-response.json")
# Test the primary bookings endpoint
ENDPOINT="v1/bookings"
curl -s -D "$BUNDLE_DIR/api/bookings-headers.txt" \
-w "\n---HTTP_CODE:%{http_code}---\n" \
-H "Authorization: Bearer $TOKEN" \
"https://api.navan.com/${ENDPOINT}?page=0&size=1" \
> "$BUNDLE_DIR/api/bookings-body.json" 2>&1
echo "bookings: $(grep 'HTTP_CODE' "$BUNDLE_DIR/api/bookings-body.json")"
```
### Step 5 — Connectivity and DNS Tests
```bash
curl -s -o /dev/null -w "connect_time: %{time_connect}\nttfb: %{time_starttransfer}\ntotal: %{time_total}\nhttp_code: %{http_code}\n" \
"https://api.navan.com/ta-auth/oauth/token" \
> "$BUNDLE_DIR/connectivity/timing.txt"
nslookup api.navan.com > "$BUNDLE_DIR/connectivity/dns.txt" 2>&1
```
### Step 6 — Sanitize and Package
Strip any raw credentials before sharing:
```bash
# Remove raw secrets from bundle files
find "$BUNDLE_DIR" -type f -exec sed -i \
-e "s/$NAVAN_CLIENT_SECRET/[REDACTED]/g" \
-e "s/$NAVAN_CLIENT_ID/[CLIENT_ID_REDACTED]/g" {} +
tar -czf "${BUNDLE_DIR}.tar.gz" "$BUNDLE_DIR"
echo "Debug bundle ready: ${BUNDLE_DIR}.tar.gz ($(du -h "${BUNDLE_DIR}.tar.gz" | cut -f1))"
```
## Output
A compressed tarball containing:
| File | Contents |
|------|----------|
| `auth/token-response.json` | OAuth response (token redacted) |
| `api/*-headers.txt` | HTTP response headers per endpoint |
| `api/*-body.json` | API response bodies |
| `connectivity/timing.txt` | Connection timing metrics |
| `connectivity/dns.txt` | DNS resolution results |
| `env/config.txt` | Environment variable state |
## Error Handling
| HTTP Code | Meaning | Action |
|-----------|---------|--------|
| 401 | Invalid or expired credentials | Regenerate credentials in Admin > Integrations |
| 403 | API not enabled for organization | Contact Navan admin to enable API access |
| 429 | Rate limit exceeded | Wait and retry; check `Retry-After` header |
| 500 | Navan server error | Retry after 60s; check Navan status |
| `ECONNREFUSED` | Cannot reach Navan | Check DNS, firewall, and proxy settings |
## Examples
Parse a specific error from the bundle:
```bash
# Extract error details from a failed endpoint
jq '.error, .message, .status' "$BUNDLE_DIR/api/bookings-body.json"
# Check if token is expired
jq '.expires_at' "$BUNDLE_DIR/auth/token-response.json"
# Review response times
cat "$BUNDLE_DIR/connectivity/timing.txt"
```
## Resources
- [Navan Help Center](https://app.navan.com/app/helpcenter) — Support documentation and troubleshooting
- [Navan Security](https://navan.com/security) — SOC 2 Type II, ISO 27001 compliance details
- [Navan Integrations](https://navan.com/integrations) — Available third-party connectors
## Next Steps
- Use `navan-incident-runbook` if the debug bundle reveals a production incident
- Use `navan-rate-limits` if 429 errors appear in the bundle
- Use `navan-common-errors` for guidance on specific HTTP error codesRelated Skills
workhuman-debug-bundle
Workhuman debug bundle for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman debug bundle".
wispr-debug-bundle
Wispr Flow debug bundle for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr debug bundle".
webflow-debug-bundle
Collect Webflow debug evidence for support tickets and troubleshooting. Gathers SDK version, token validation, rate limit status, site connectivity, CMS health, and error logs into a single diagnostic bundle. Trigger with phrases like "webflow debug", "webflow support bundle", "collect webflow logs", "webflow diagnostic", "webflow troubleshoot".
vercel-debug-bundle
Collect Vercel debug evidence for support tickets and troubleshooting. Use when encountering persistent issues, preparing support tickets, or collecting diagnostic information for Vercel problems. Trigger with phrases like "vercel debug", "vercel support bundle", "collect vercel logs", "vercel diagnostic".
veeva-debug-bundle
Veeva Vault debug bundle for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva debug bundle".
vastai-debug-bundle
Collect Vast.ai debug evidence for support tickets and troubleshooting. Use when encountering persistent issues, preparing support tickets, or collecting diagnostic information for Vast.ai problems. Trigger with phrases like "vastai debug", "vastai support bundle", "collect vastai logs", "vastai diagnostic".
twinmind-debug-bundle
Collect comprehensive diagnostic information for TwinMind issues. Use when preparing support requests, investigating complex problems, or gathering evidence for bug reports. Trigger with phrases like "twinmind debug", "twinmind diagnostics", "collect twinmind info", "twinmind support bundle".
together-debug-bundle
Together AI debug bundle for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together debug bundle".
techsmith-debug-bundle
TechSmith debug bundle for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith debug bundle".
supabase-debug-bundle
Collect Supabase diagnostic info for troubleshooting and support tickets. Use when debugging connection failures, auth issues, Realtime drops, Storage errors, RLS misconfigurations, or preparing a support escalation. Trigger: "supabase debug", "supabase diagnostics", "supabase support bundle", "collect supabase logs", "debug supabase connection".
stackblitz-debug-bundle
Collect WebContainer diagnostic info: boot state, file system, process list. Use when working with WebContainers or StackBlitz SDK. Trigger: "stackblitz debug".
speak-debug-bundle
Collect diagnostic information for Speak API issues: auth verification, audio format validation, session inspection, and network testing. Use when implementing debug bundle features, or troubleshooting Speak language learning integration issues. Trigger with phrases like "speak debug bundle", "speak debug bundle".