/algolia-pack:algolia-incident-runbookfrom algolia-pack
Execute Algolia incident response: triage search failures, distinguish Algolia-side vs your-side issues, apply fallbacks, and run postmortems.
Ships in algolia-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rapid incident response procedures for Algolia search failures. Algolia's infrastructure is distributed across multiple data centers with automatic failover, so true Algolia outages are rare. Most incidents are caused by API key issues, settings drift, or indexing pipeline failures on your side.
| Level | Definition | Response | Examples |
|---|---|---|---|
| P1 | Search completely down | < 15 min | 403/500 on all queries, Algolia unreachable |
| P2 | Degraded search | < 1 hour | High latency, partial results, stale data |
| P3 | Minor issue | < 4 hours | Analytics not updating, synonyms wrong |
| P4 | No user impact | Next day | Monitoring gap, test failures |
#!/bin/bash
echo "=== ALGOLIA TRIAGE ==="
# 1. Is Algolia's infrastructure up?
echo -n "Algolia Status: "
curl -s https://status.algolia.com/api/v2/status.json | jq -r '.status.description'
# 2. Can we reach our Algolia app?
echo -n "API Connectivity: "
curl -s -o /dev/null -w "HTTP %{http_code} (%{time_total}s)" \
"https://${ALGOLIA_APP_ID}-dsn.algolia.net/1/indexes" \
-H "X-Algolia-Application-Id: ${ALGOLIA_APP_ID}" \
-H "X-Algolia-API-Key: ${ALGOLIA_ADMIN_KEY}"
echo ""
# 3. Can we actually search?
echo -n "Search test: "
curl -s "https://${ALGOLIA_APP_ID}-dsn.algolia.net/1/indexes/products/query" \
-H "X-Algolia-Application-Id: ${ALGOLIA_APP_ID}" \
-H "X-Algolia-API-Key: ${ALGOLIA_SEARCH_KEY}" \
-d '{"query":"test","hitsPerPage":1}' | jq '{nbHits, processingTimeMS}'
# 4. Check index health
echo "Index stats:"
curl -s "https://${ALGOLIA_APP_ID}-dsn.algolia.net/1/indexes" \
-H "X-Algolia-Application-Id: ${ALGOLIA_APP_ID}" \
-H "X-Algolia-API-Key: ${ALGOLIA_ADMIN_KEY}" \
| jq '.items[] | {name, entries, lastBuildTimeS}'
Search returning errors?
├── YES: What HTTP status?
│ ├── 403: API key issue
│ │ ├── Key expired/deleted → Rotate key (see below)
│ │ └── Wrong key type → Use admin key for writes, search key for reads
│ ├── 404: Index doesn't exist
│ │ ├── Typo in index name → Check INDICES config
│ │ └── Index accidentally deleted → Trigger full reindex
│ ├── 429: Rate limited
│ │ ├── Per-key limit → Increase maxQueriesPerIPPerHour
│ │ └── Server limit → Reduce indexing batch frequency
│ └── 5xx: Algolia-side error
│ ├── status.algolia.com shows incident → Wait + enable fallback
│ └── No incident shown → Contact Algolia support with request IDs
└── NO: Search returning wrong/stale results?
├── 0 results unexpectedly → Check searchableAttributes, synonyms
├── Stale data → Check indexing pipeline, look at last sync timestamp
└── Wrong ranking → Review customRanking, check for conflicting rules
import { algoliasearch } from 'algoliasearch';
// Emergency: create a new key with same permissions
const adminClient = algoliasearch(process.env.ALGOLIA_APP_ID!, process.env.ALGOLIA_ADMIN_KEY!);
const { key: emergencyKey } = await adminClient.addApiKey({
apiKey: {
acl: ['search'],
description: `Emergency search key — ${new Date().toISOString()}`,
indexes: ['products', 'articles'],
maxQueriesPerIPPerHour: 50000,
},
});
console.log(`Emergency key created: ...${emergencyKey.slice(-8)}`);
console.log('Update ALGOLIA_SEARCH_KEY and redeploy');
// Check if index is empty
const { items } = await client.listIndices();
const target = items.find(i => i.name === 'products');
console.log(`products: ${target?.entries ?? 'NOT FOUND'} records`);
// If empty, trigger emergency reindex
if (!target || target.entries === 0) {
console.log('Index is empty — triggering emergency reindex');
// Import your reindex function
await fullReindex();
}
// Circuit breaker: switch to DB search if Algolia is slow
const TIMEOUT_MS = 2000;
const FAILURE_THRESHOLD = 5;
let failures = 0;
async function searchWithCircuitBreaker(query: string) {
if (failures >= FAILURE_THRESHOLD) {
console.warn('Circuit open: using database fallback');
return databaseSearch(query);
}
try {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), TIMEOUT_MS);
const result = await client.searchSingleIndex({
indexName: 'products',
searchParams: { query, hitsPerPage: 20 },
});
clearTimeout(timeout);
failures = 0; // Reset on success
return result;
} catch (error) {
failures++;
console.error(`Algolia failure ${failures}/${FAILURE_THRESHOLD}:`, error);
return databaseSearch(query);
}
}
P[1-4] INCIDENT: Algolia Search
Status: INVESTIGATING | IDENTIFIED | MONITORING | RESOLVED
Impact: [Users cannot search / Search is slow / Results are stale]
Root cause: [API key expired / Index empty / Algolia incident]
Mitigation: [Fallback enabled / Key rotated / Waiting for Algolia]
Next update: [Time]
Owner: @[name]
## Incident: Search [Outage/Degradation]
**Date:** YYYY-MM-DD HH:MM–HH:MM UTC
**Duration:** X hours Y minutes
**Severity:** P[1-4]
**Detection:** [Alert name / User report / Status page]
### Timeline
- HH:MM — First alert fired
- HH:MM — Triage started, identified [root cause]
- HH:MM — Mitigation applied: [action]
- HH:MM — Resolved, monitoring
### Root Cause
[Technical explanation: what broke and why]
### Impact
- Search availability: X% during incident
- Users affected: ~N
### Action Items
- [ ] [Fix] — Owner — Due date
- [ ] [Prevent] — Owner — Due date
- [ ] [Detect faster] — Owner — Due date
| Issue | Cause | Solution |
|---|---|---|
| Can't reach status.algolia.com | Your network issue | Use mobile, VPN, or check @algloiastatus on Twitter |
| Triage script fails | Missing env vars | Set ALGOLIA_APP_ID, ALGOLIA_ADMIN_KEY, ALGOLIA_SEARCH_KEY |
| Fallback search slow | No DB index | Add database full-text index as backup |
| Key rotation breaks frontend | CDN cache | Purge CDN cache or wait for TTL |
For data handling and privacy, see algolia-data-handling.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/algolia-ci-integrationConfigure Algolia CI/CD: GitHub Actions for index validation, automated reindexing
on deploy, and integration testing against real Algolia indices.
Trigger: "algolia CI", "algolia GitHub Actions", "algolia automated tests",
"CI algolia", "algolia deploy pipeline".
/algolia-common-errorsDiagnose and fix the top Algolia API errors: 400, 403, 404, 429, ApiError,
RetryError, and indexing failures.
Trigger: "algolia error", "fix algolia", "algolia not working",
"debug algolia", "algolia 429", "algolia 403".
/algolia-core-workflow-aImplement Algolia search with filters, facets, highlighting, and pagination.
The primary money-path workflow: search records, apply filters, display results.
Trigger: "algolia search", "search with algolia", "algolia filters",
"algolia facets", "algolia search implementation".
/algolia-core-workflow-bImplement Algolia indexing pipeline: data sync, partial updates, synonyms, and rules.
The secondary money-path workflow: keep your index in sync with source data.
Trigger: "algolia indexing", "sync data to algolia", "algolia synonyms",
"algolia rules", "algolia partial update", "algolia reindex".
/algolia-cost-tuningOptimize Algolia costs: understand search request vs record pricing,
reduce operations with batching and caching, monitor usage via Analytics API.
Trigger: "algolia cost", "algolia billing", "reduce algolia costs",
"algolia pricing", "algolia expensive", "algolia budget".
/algolia-data-handlingImplement Algolia data handling: record transforms, PII filtering before indexing,
data retention, GDPR/CCPA compliance with Algolia's deleteByQuery and Insights deletion.
Trigger: "algolia data", "algolia PII", "algolia GDPR", "algolia data retention",
"algolia privacy", "algolia CCPA", "algolia data sync".
npx claudepluginhub flight505/skill-forge --plugin algolia-packOther plugins' skills for the same job