/algolia-pack:algolia-debug-bundlefrom algolia-pack
Collects Algolia diagnostic evidence including index stats, API key ACLs, query logs, and network connectivity tests for support tickets or troubleshooting.
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.
Collect all necessary diagnostic information for Algolia support tickets or internal troubleshooting. Uses real Algolia API endpoints to gather index stats, key permissions, and query performance data.
ALGOLIA_APP_ID and ALGOLIA_ADMIN_KEY environment variables setcurl and jq available#!/bin/bash
# algolia-debug-bundle.sh
set -euo pipefail
APP_ID="${ALGOLIA_APP_ID:?Set ALGOLIA_APP_ID}"
API_KEY="${ALGOLIA_ADMIN_KEY:?Set ALGOLIA_ADMIN_KEY}"
BUNDLE_DIR="algolia-debug-$(date +%Y%m%d-%H%M%S)"
BASE_URL="https://${APP_ID}-dsn.algolia.net"
HEADERS=(-H "X-Algolia-Application-Id: ${APP_ID}" -H "X-Algolia-API-Key: ${API_KEY}")
mkdir -p "$BUNDLE_DIR"
echo "=== Algolia Debug Bundle ===" | tee "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" | tee -a "$BUNDLE_DIR/summary.txt"
echo "App ID: $APP_ID" | tee -a "$BUNDLE_DIR/summary.txt"
# 1. List all indices with record counts
echo "--- Indices ---" >> "$BUNDLE_DIR/summary.txt"
curl -s "${BASE_URL}/1/indexes" "${HEADERS[@]}" \
| jq '.items[] | {name, entries, dataSize, lastBuildTimeS}' \
> "$BUNDLE_DIR/indices.json" 2>/dev/null
echo "Indices saved" >> "$BUNDLE_DIR/summary.txt"
# 2. Check API key permissions (redacted key)
echo "--- API Key ACL ---" >> "$BUNDLE_DIR/summary.txt"
curl -s "${BASE_URL}/1/keys" "${HEADERS[@]}" \
| jq '.keys[] | {description, acl, indexes, maxQueriesPerIPPerHour, validity}' \
> "$BUNDLE_DIR/api-keys-acl.json" 2>/dev/null
echo "Key ACLs saved (keys redacted)" >> "$BUNDLE_DIR/summary.txt"
# 3. Get recent query logs (last 1000)
echo "--- Query Logs ---" >> "$BUNDLE_DIR/summary.txt"
curl -s "${BASE_URL}/1/logs?length=100&type=all" "${HEADERS[@]}" \
| jq '.logs[] | {timestamp, method, url, answer_code, processing_time_ms, query_nb_hits}' \
> "$BUNDLE_DIR/query-logs.json" 2>/dev/null
echo "Last 100 log entries saved" >> "$BUNDLE_DIR/summary.txt"
# 4. Network connectivity test
echo "--- Network Diagnostics ---" >> "$BUNDLE_DIR/summary.txt"
for host in "${APP_ID}-dsn.algolia.net" "${APP_ID}-1.algolianet.com" "${APP_ID}-2.algolianet.com"; do
RESULT=$(curl -s -o /dev/null -w "%{http_code},%{time_total}" "https://${host}/1/indexes" "${HEADERS[@]}" 2>/dev/null || echo "FAILED")
echo " ${host}: ${RESULT}" >> "$BUNDLE_DIR/summary.txt"
done
# 5. SDK version
echo "--- Environment ---" >> "$BUNDLE_DIR/summary.txt"
node --version >> "$BUNDLE_DIR/summary.txt" 2>/dev/null || echo "node: not found" >> "$BUNDLE_DIR/summary.txt"
npm list algoliasearch 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "algoliasearch: not installed" >> "$BUNDLE_DIR/summary.txt"
# 6. Algolia service status
echo "--- Algolia Status ---" >> "$BUNDLE_DIR/summary.txt"
curl -s https://status.algolia.com/api/v2/status.json \
| jq -r '.status.description' >> "$BUNDLE_DIR/summary.txt" 2>/dev/null
# Package (API keys already excluded from raw responses)
tar -czf "${BUNDLE_DIR}.tar.gz" "$BUNDLE_DIR"
rm -rf "$BUNDLE_DIR"
echo ""
echo "Bundle created: ${BUNDLE_DIR}.tar.gz"
import { algoliasearch } from 'algoliasearch';
async function collectDebugInfo() {
const client = algoliasearch(
process.env.ALGOLIA_APP_ID!,
process.env.ALGOLIA_ADMIN_KEY!
);
const debug: Record<string, any> = {};
// Index list and stats
const { items } = await client.listIndices();
debug.indices = items.map(i => ({
name: i.name,
entries: i.entries,
dataSize: i.dataSize,
lastBuildTimeS: i.lastBuildTimeS,
}));
// Per-index settings for problematic index
const indexName = 'products'; // Target index
try {
debug.settings = await client.getSettings({ indexName });
} catch (e) {
debug.settings = `Failed: ${e}`;
}
// Recent logs
const { logs } = await client.getLogs({
indexName,
length: 50,
type: 'error', // 'all' | 'query' | 'build' | 'error'
});
debug.recentErrors = logs.map(l => ({
timestamp: l.timestamp,
method: l.method,
answerCode: l.answer_code,
processingTimeMs: l.processing_time_ms,
}));
// API key used (check its ACL)
try {
const keyInfo = await client.getApiKey({
key: process.env.ALGOLIA_ADMIN_KEY!,
});
debug.currentKeyAcl = keyInfo.acl;
} catch (e) {
debug.currentKeyAcl = 'Unable to read key ACL';
}
return debug;
}
ALWAYS REDACT before sharing:
Safe to include:
| Issue | Cause | Solution |
|---|---|---|
getLogs returns empty | Logs retention is 7 days (Grow) or 30 days (Premium) | Run sooner after incident |
getApiKey 403 | Non-admin key can only read its own info | Use Admin key |
curl returns 000 | DNS or firewall blocking | Check outbound HTTPS to *.algolia.net |
No jq available | Not installed | apt install jq or parse JSON differently |
For rate limit issues, see algolia-rate-limits.
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