perplexity-advanced-troubleshooting
診断が難しい問題に対して、Perplexityの高度なデバッグ技術を適用します。標準的なトラブルシューティングが失敗した場合、複雑な競合状態の調査、またはPerplexityサポートへのエスカレーション用の証拠バンドルの準備に使用してください。「perplexity hard bug」「perplexity mystery error」「perplexity impossible to debug」「difficult perplexity issue」「perplexity deep debug」などのフレーズでトリガーされます。
description の原文を見る
Apply Perplexity advanced debugging techniques for hard-to-diagnose issues. Use when standard troubleshooting fails, investigating complex race conditions, or preparing evidence bundles for Perplexity support escalation. Trigger with phrases like "perplexity hard bug", "perplexity mystery error", "perplexity impossible to debug", "difficult perplexity issue", "perplexity deep debug".
SKILL.md 本文
Perplexity 高度なトラブルシューティング
概要
標準的なトラブルシューティングに抵抗する複雑なPerplexityの問題に対する深いデバッグ技法です。
前提条件
- 本番ログとメトリクスへのアクセス
- クラスターへのkubectl アクセス
- ネットワークキャプチャツールの利用可能性
- 分散トレーシングの理解
エビデンス収集フレームワーク
包括的なデバッグバンドル
#!/bin/bash
# advanced-perplexity-debug.sh
BUNDLE="perplexity-advanced-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE"/{logs,metrics,network,config,traces}
# 1. Extended logs (1 hour window)
kubectl logs -l app=perplexity-integration --since=1h > "$BUNDLE/logs/pods.log"
journalctl -u perplexity-service --since "1 hour ago" > "$BUNDLE/logs/system.log"
# 2. Metrics dump
curl -s localhost:9090/api/v1/query?query=perplexity_requests_total > "$BUNDLE/metrics/requests.json"
curl -s localhost:9090/api/v1/query?query=perplexity_errors_total > "$BUNDLE/metrics/errors.json"
# 3. Network capture (30 seconds)
timeout 30 tcpdump -i any port 443 -w "$BUNDLE/network/capture.pcap" &
# 4. Distributed traces
curl -s localhost:16686/api/traces?service=perplexity > "$BUNDLE/traces/jaeger.json"
# 5. Configuration state
kubectl get cm perplexity-config -o yaml > "$BUNDLE/config/configmap.yaml"
kubectl get secret perplexity-secrets -o yaml > "$BUNDLE/config/secrets-redacted.yaml"
tar -czf "$BUNDLE.tar.gz" "$BUNDLE"
echo "Advanced debug bundle: $BUNDLE.tar.gz"
システマティックな分離
レイヤー別テスト
// Test each layer independently
async function diagnosePerplexityIssue(): Promise<DiagnosisReport> {
const results: DiagnosisResult[] = [];
// Layer 1: Network connectivity
results.push(await testNetworkConnectivity());
// Layer 2: DNS resolution
results.push(await testDNSResolution('api.perplexity.com'));
// Layer 3: TLS handshake
results.push(await testTLSHandshake('api.perplexity.com'));
// Layer 4: Authentication
results.push(await testAuthentication());
// Layer 5: API response
results.push(await testAPIResponse());
// Layer 6: Response parsing
results.push(await testResponseParsing());
return { results, firstFailure: results.find(r => !r.success) };
}
最小限の再現
// Strip down to absolute minimum
async function minimalRepro(): Promise<void> {
// 1. Fresh client, no customization
const client = new PerplexityClient({
apiKey: process.env.PERPLEXITY_API_KEY!,
});
// 2. Simplest possible call
try {
const result = await client.ping();
console.log('Ping successful:', result);
} catch (error) {
console.error('Ping failed:', {
message: error.message,
code: error.code,
stack: error.stack,
});
}
}
タイミング分析
class TimingAnalyzer {
private timings: Map<string, number[]> = new Map();
async measure<T>(label: string, fn: () => Promise<T>): Promise<T> {
const start = performance.now();
try {
return await fn();
} finally {
const duration = performance.now() - start;
const existing = this.timings.get(label) || [];
existing.push(duration);
this.timings.set(label, existing);
}
}
report(): TimingReport {
const report: TimingReport = {};
for (const [label, times] of this.timings) {
report[label] = {
count: times.length,
min: Math.min(...times),
max: Math.max(...times),
avg: times.reduce((a, b) => a + b, 0) / times.length,
p95: this.percentile(times, 95),
};
}
return report;
}
}
メモリとリソース分析
// Detect memory leaks in Perplexity client usage
const heapUsed: number[] = [];
setInterval(() => {
const usage = process.memoryUsage();
heapUsed.push(usage.heapUsed);
// Alert on sustained growth
if (heapUsed.length > 60) { // 1 hour at 1/min
const trend = heapUsed[59] - heapUsed[0];
if (trend > 100 * 1024 * 1024) { // 100MB growth
console.warn('Potential memory leak in perplexity integration');
}
}
}, 60000);
レースコンディション検出
// Detect concurrent access issues
class PerplexityConcurrencyChecker {
private inProgress: Set<string> = new Set();
async execute<T>(key: string, fn: () => Promise<T>): Promise<T> {
if (this.inProgress.has(key)) {
console.warn(`Concurrent access detected for ${key}`);
}
this.inProgress.add(key);
try {
return await fn();
} finally {
this.inProgress.delete(key);
}
}
}
サポートエスカレーションテンプレート
## Perplexity サポートエスカレーション
**重要度:** P[1-4]
**リクエストID:** [エラーレスポンスから取得]
**タイムスタンプ:** [ISO 8601]
### 問題の概要
[1段落の説明]
### 再現手順
1. [手順1]
2. [手順2]
### 期待動作vs実際の動作
- 期待動作: [動作]
- 実際の動作: [動作]
### 添付エビデンス
- [ ] デバッグバンドル (perplexity-advanced-debug-*.tar.gz)
- [ ] 最小限の再現コード
- [ ] タイミング分析
- [ ] ネットワークキャプチャ(該当する場合)
### 試行済みの回避策
1. [回避策1] - 結果: [結果]
2. [回避策2] - 結果: [結果]
手順
ステップ1: エビデンスバンドルの収集
包括的なデバッグスクリプトを実行して、すべての関連データを収集します。
ステップ2: システマティックな分離
各レイヤーを独立してテストして、障害ポイントを特定します。
ステップ3: 最小限の再現を作成
最もシンプルな失敗ケースまで削減します。
ステップ4: エビデンス付きでエスカレーション
収集したすべてのエビデンスとともにサポートテンプレートを使用します。
出力
- 包括的なデバッグバンドルが収集されました
- 障害レイヤーが特定されました
- 最小限の再現が作成されました
- サポートエスカレーションが送信されました
エラーハンドリング
| 問題 | 原因 | 解決策 |
|---|---|---|
| 再現できない | レースコンディション | タイミング分析を追加 |
| 断続的な障害 | タイミング依存 | サンプルサイズを増加 |
| 有用なログがない | インストルメンテーション不足 | デバッグログを追加 |
| メモリ増加 | リソースリーク | ヒーププロファイリングを使用 |
例
クイックレイヤーテスト
# Test each layer in sequence
curl -v https://api.perplexity.com/health 2>&1 | grep -E "(Connected|TLS|HTTP)"
リソース
次のステップ
ロードテストについては、perplexity-load-scaleを参照してください。
ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ
詳細情報
- 作者
- Brmbobo
- リポジトリ
- Brmbobo/Web2podcast
- ライセンス
- MIT
- 最終更新
- 2026/1/26
Source: https://github.com/Brmbobo/Web2podcast / ライセンス: MIT
関連スキル
doubt-driven-development
重要な判断はすべて、本番環境への展開前に新しい視点から対抗的レビューを実施します。速度より正確性が重要な場合、不慣れなコードを扱う場合、本番環境・セキュリティに関わるロジック・取り消し不可の操作など影響度が高い場合、または後でバグを修正するよりも今検証する方が効率的な場合に活用してください。
apprun-skills
TypeScriptを使用したAppRunアプリケーションのMVU設計に関する総合的なガイダンスが得られます。コンポーネントパターン、イベントハンドリング、状態管理(非同期ジェネレータを含む)、パラメータと保護機能を備えたルーティング・ナビゲーション、vistestを使用したテストに対応しています。AppRunコンポーネントの設計・レビュー、ルートの配線、状態フローの管理、AppRunテストの作成時に活用してください。
desloppify
コードベースのヘルスチェックと技術負債の追跡ツールです。コード品質、技術負債、デッドコード、大規模ファイル、ゴッドクラス、重複関数、コードスメル、命名規則の問題、インポートサイクル、結合度の問題についてユーザーが質問した場合に使用してください。また、ヘルススコアの確認、次の改善項目の提案、クリーンアップ計画の作成をリクエストされた際にも対応します。29言語に対応しています。
debugging-and-error-recovery
テストが失敗したり、ビルドが壊れたり、動作が期待と異なったり、予期しないエラーが発生したりした場合に、体系的な根本原因デバッグをガイドします。推測ではなく、根本原因を見つけて修正するための体系的なアプローチが必要な場合に使用してください。
test-driven-development
テスト駆動開発により実装を進めます。ロジックの実装、バグの修正、動作の変更など、あらゆる場面で活用できます。コードが正常に動作することを証明する必要がある場合、バグ報告を受けた場合、既存機能を修正する予定がある場合に使用してください。
incremental-implementation
変更を段階的に実施します。複数のファイルに影響する機能や変更を実装する場合に使用してください。大量のコードを一度に書こうとしている場合や、タスクが一度では完結できないほど大きい場合に活用します。