Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

silk-debug丝绸调试

Agent Skill

silk-debug 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

606

周安装

25

GitHub Stars

78

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:silk-debug(丝绸调试)
来源仓库:https://github.com/letsrevel/revel-backend
仓库路径:skills/silk-debug
安装命令:
npx skills add https://github.com/letsrevel/revel-backend --skill silk-debug
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/letsrevel/revel-backend --skill silk-debug

简介

silk-debug 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它支持基于关键词、任务场景或来源线索进行信息筛选,帮助 Agent 高效获取所需内容。
  • 通过 npx skills add 命令从 GitHub 仓库安装,具体用法可参考原始 README 文档。
  • 安装前需确认权限范围和维护状态,注意是否涉及联网、命令执行或文件读写操作。
  • silk-debug 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Silk Debug Tool

A CLI tool for analyzing Django Silk profiling data to debug slow requests, detect N+1 queries, and optimize database performance.

Tool Location

.venv/bin/python scripts/silk_debug.py

Quick Reference

Analyze a Specific Request

When given a Silk request ID (UUID), use --full for comprehensive analysis:

.venv/bin/python scripts/silk_debug.py <request_id> --full

This shows:

  • Request info (path, method, status, time, query count)
  • Duplicate/similar queries (N+1 detection)
  • Slow queries (>5ms by default)
  • Queries grouped by table
  • Query execution timeline
  • Python cProfile data (if enabled)

List and Filter Requests

# List recent requests
.venv/bin/python scripts/silk_debug.py --list

# Sort by different criteria
.venv/bin/python scripts/silk_debug.py --list --sort queries     # Most queries
.venv/bin/python scripts/silk_debug.py --list --sort duration    # Slowest total time
.venv/bin/python scripts/silk_debug.py --list --sort db_time     # Most DB time

# Filter requests
.venv/bin/python scripts/silk_debug.py --list --path /api/events --min-queries 20
.venv/bin/python scripts/silk_debug.py --list --method POST --min-time 100

Aggregate Analysis

# Overall statistics
.venv/bin/python scripts/silk_debug.py --stats

# Endpoint summary (grouped by path pattern, shows P95)
.venv/bin/python scripts/silk_debug.py --endpoints

# Find slow endpoints
.venv/bin/python scripts/silk_debug.py --slow-endpoints --slow-endpoint-threshold 100

Interpreting Results

N+1 Query Detection

When you see duplicate queries like:

🔴 15x similar queries:
SELECT "events_ticket"."id" FROM "events_ticket" WHERE "events_ticket"."event_id" = '<UUID>'

This indicates an N+1 problem. Fix with:

  • select_related() for ForeignKey fields
  • prefetch_related() for reverse relations or M2M fields

Slow Queries

Common causes of slow queries:

  1. COUNT on complex DISTINCT: Pagination wrapping complex visibility subqueries

- Fix: Materialize IDs in Python first, then filter with simple IN clause

  1. Missing indexes: Full table scans

- Fix: Add database indexes on filtered/joined columns

  1. Complex JOINs: Multiple related tables

- Fix: Optimize query structure or denormalize if appropriate

Timeline Analysis

The timeline shows query execution order with visual bars:

  1. +    0.0ms [  2.5ms] █ "accounts_reveluser"
  7. +   60.2ms [  2.8ms] █ "__count"

Look for:

  • Large gaps between queries (indicates Python processing time)
  • Queries that could run in parallel but are sequential
  • Expensive queries that block subsequent operations

Common Optimization Patterns

Expensive COUNT with DISTINCT

When you see:

SELECT COUNT(*) FROM (SELECT DISTINCT ... complex subquery ...)

Fix by materializing IDs:

# Before (slow COUNT)
qs = Event.objects.for_user(user).filter(...).distinct()

# After (fast COUNT)
event_ids = list(Event.objects.for_user(user).values_list("id", flat=True).distinct())
qs = Event.objects.full().filter(id__in=event_ids)

Redundant Visibility Checks

When the same for_user() query appears multiple times:

  • Create a method that accepts already-checked objects
  • Cache visibility results within the request

Batch Operations

When creating multiple objects:

  • Use bulk_create() instead of individual .save() calls
  • Fetch shared data (settings, related objects) once before the loop
  • Send notifications in batches, not per-item

CLI Options Reference

Single Request Analysis

  • --full, -f: Run all analyses
  • --duplicates, -d: Show N+1 candidates
  • --slow, -s: Show slow queries
  • --slow-threshold N: Slow query threshold in ms (default: 5)
  • --tables, -t: Group queries by table
  • --timeline: Show execution timeline
  • --traceback, -tb: Show code locations for duplicates
  • --profile, -prof: Show Python cProfile data

Listing and Filtering

  • --list, -l: List requests
  • --limit N: Number of results (default: 20)
  • --sort {recent,queries,duration,db_time}: Sort order
  • --path, -p: Filter by path (contains)
  • --method, -m: Filter by HTTP method
  • --status: Filter by status code
  • --min-queries N: Minimum query count
  • --min-time N: Minimum response time (ms)
  • --min-db-time N: Minimum DB time (ms)

Aggregate Views

  • --stats: Show aggregate statistics
  • --endpoints: Show endpoint summary with P95
  • --slow-endpoints: Group slow requests by endpoint
  • --slow-endpoint-threshold N: Threshold in ms (default: 200)
  • --min-count N: Minimum requests for endpoint summary

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.54%
按下载量换算72

Claude

31.99%
按下载量换算63

Cursor

18.05%
按下载量换算36

Gemini CLI

8.94%
按下载量换算18

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills