fix-slow-queries 是什么?
Diagnose and fix slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local reproduction, performance and result comparisons, regression tests, and a PR with passing checks. Use for costly queries, repeated database work, or slow requests with a suspected database cause.
以上为来源原文,中文用途说明尚待整理。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
fix-slow-queries,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。
展开并复制给 Codex 的安装指令
安装并检查 fix-slow-queries
请在 Codex 的当前工作环境中安装并检查 fix-slow-queries 这个 Skill。
项目身份:paperclipai/paperclip / fix-slow-queries
来源:https://github.com/paperclipai/paperclip/blob/558dbb01320987eb9aba80d5d1a8e66604456f72/.agents/skills/fix-slow-queries/SKILL.md
已定位的源文件:.agents/skills/fix-slow-queries/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 fix-slow-queries
请在 Claude Code 的当前工作环境中安装并检查 fix-slow-queries 这个 Skill。
项目身份:paperclipai/paperclip / fix-slow-queries
来源:https://github.com/paperclipai/paperclip/blob/558dbb01320987eb9aba80d5d1a8e66604456f72/.agents/skills/fix-slow-queries/SKILL.md
已定位的源文件:.agents/skills/fix-slow-queries/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 fix-slow-queries
请在 Cursor Agent 的当前工作环境中安装并检查 fix-slow-queries 这个 Skill。
项目身份:paperclipai/paperclip / fix-slow-queries
来源:https://github.com/paperclipai/paperclip/blob/558dbb01320987eb9aba80d5d1a8e66604456f72/.agents/skills/fix-slow-queries/SKILL.md
已定位的源文件:.agents/skills/fix-slow-queries/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 fix-slow-queries
请在 当前 Agent 的当前工作环境中安装并检查 fix-slow-queries 这个 Skill。
项目身份:paperclipai/paperclip / fix-slow-queries
来源:https://github.com/paperclipai/paperclip/blob/558dbb01320987eb9aba80d5d1a8e66604456f72/.agents/skills/fix-slow-queries/SKILL.md
已定位的源文件:.agents/skills/fix-slow-queries/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-21T19:32:09.269Z
- 中文使用说明
- 尚待整理,保留英文来源内容
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料
.agents/skills/fix-slow-queries/SKILL.md · 抓取时间 2026-11-21T19:32:09.269Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Diagnose and fix slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local reproduction, performance and result comparisons, regression tests, and a PR with passing checks. Use for costly queries, repeated database work, or slow requests with a suspected database cause.
查看源文件章节 / Source sections
- 原文:Fix Slow Queries
- 原文:1. Establish the target and finish line
- 原文:2. Find the actual database and rank the work
- 原文:3. Trace each candidate to its behavior
- 原文:4. Reproduce the baseline locally
- 原文:5. Implement and prove both kinds of green
- 原文:6. Verify the blast radius
- 原文:7. Create the PR and carry it through checks
- 原文:Constraints
- 原文:8. Hand off the evidence
原文:Fix Slow Queries
Deliver a measured improvement with preserved behavior and a reviewable PR whose latest commit passes checks. A list of suspicious SQL or an unverified rewrite is an intermediate result. Respect a narrower request for diagnosis only.
原文:1. Establish the target and finish line
- Resolve the reported URL, environment, company/workspace, deployed revision, owning repository, and local checkout. Read its `AGENTS.md` and scoped rules. Paperclip and the private `paperclip-cloud` control plane have different rules. - Work in a dedicated branch/worktree. Reuse suitable existing work; keep the checkout running a live server out of branch switching and benchmark setup. - Select a bounded batch, usually the top two or three query families. Record deferred candidates so discovery does not turn into an unbounded rewrite. - The finish line is: reproducible baseline, faster treatment, output/behavior proof, relevant regression coverage, and green checks on each final PR head. A concrete access or infrastructure blocker must be reported as incomplete.
原文:2. Find the actual database and rank the work
Read [Cloud discovery](references/cloud-discovery.md) when starting from a hosted workspace. Follow the chain from Paperclip Cloud fleet admin to the stack's Neon project, branch, endpoint, database, and runtime role. Record the corresponding application deployment and time window. Do not reuse IDs from a previous run. Capture query text/fingerprint, calls, total execution time, mean time, rows, and available I/O, temporary-file, and lock-wait evidence. Rank both expensive individual calls and frequent work with high aggregate cost. Group variants by their actual caller; do not add unrelated query means into an endpoint latency. Keep three claims separate: | Claim | Evidence needed | | --- | --- | | SQL is expensive | Query statistics and a reproducible execution plan | | The database path dominates a slow request | Correlated SQL, connection wait, and application timings | | More database capacity would help | Resource/queue pressure in the same window and a capacity-specific experiment | Cumulative query statistics are not a recent-window trace. Capture reset times or two snapshots and calculate deltas. A large database-time total alone does not justify resizing Neon. Application CPU headroom also does not rule out a busy Node main thread.
原文:3. Trace each candidate to its behavior
Use `rg` on distinctive SQL fragments, table names, JSON keys, and predicates. Trace the full path: route or scheduler → service → generated SQL → indexes. Record frequency, fan-out, page limits, redaction, authorization, and any second query the caller performs. Compare the deployed implementation with local code. State a falsifiable cause and the contract the fix must preserve. Typical causes include casts on indexed columns, repeated detoasting of large JSON, broad candidate scans, unbounded result sets, duplicate reads, and unnecessary polling. Use plans and caller evidence to choose among them. Inspect existing indexes and recent related fixes before adding another index. For advisory locks, identify the caller, key, transaction duration, and wait chain first. Preserve checkout, leases, ownership, recovery, and no-replay rules; removing a lock or polling loop is not a query optimization by itself.
原文:4. Reproduce the baseline locally
Read [Local proof](references/local-proof.md) before building or changing the benchmark. Use disposable real PostgreSQL and synthetic data with representative row counts, selectivity, and payload sizes. Record the PostgreSQL version and any difference from the hosted server. Pin the pre-fix commit. Capture the complete SQL and parameters the real service generates, including projections, joins, ordering, limits, and relevant imported query helpers. Prove the baseline exhibits the suspected cost before editing. If it does not, improve the fixture or revise the hypothesis. Save baseline results, timings, and `EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON)`. Define the performance acceptance criterion for this fixture before measuring the treatment. Avoid a brittle universal millisecond threshold.
原文:5. Implement and prove both kinds of green
Make the smallest change supported by the measurements. Author the fix on our branch from source and evidence. Related community reports can supply leads; respect any instruction to keep the implementation independent of their code. Run baseline and treatment against equivalent fixtures under the same settings: - **Performance:** use warmups and repeated samples, report medians and spread, and examine plan/buffer changes. Alternate order or repeat in reverse order when caching could explain the gain. Report neutral or slower paths honestly. - **Correctness:** compare every returned SQL column and the externally visible behavior. Preserve ordering, duplicates, nulls, tenant scope, and redaction. A faster wrong result fails even when row counts match. When intentionally bounding history, compare query speed at the same result limit separately from the contract change. Test default/max limits and older record access. Do not call truncated output equivalent to the former full list. Reject or revise the change if either proof fails. Keep the reproducible harness with the source where repository conventions allow it; keep bulky evidence out of git. Exhaust viable query/caller changes and existing indexes before proposing an exceptional migration. Document the serious reason and why migration-free alternatives are insufficient. Do not add startup scripts, boot-time DDL, or recurring backfills to bypass the migration constraint. If a migration remains necessary, follow the database migration rules and the production-size timing procedure in [Local proof](references/local-proof.md). Measure the complete migration, including index builds, backfills, and lock waits. First optimize a migration exceeding the roughly one-to-two-minute budget; if it cannot be brought within an acceptable duration, flag it for human review with the measured timings and alternatives before presenting it as deployable.
文件 SHA256:0904852076325a4148a2020dd171ddec2fe06bccac77889320e78c6d497d4ccd
仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。
Diagnose and fix slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local reproduction, performance and result comparisons, regression tests, and a PR with passing checks. Use for costly queries, repeated database work, or slow requests with a suspected database cause.
历史收录数据
| 来源仓库 | paperclipai/paperclip |
|---|---|
| Skill源路径 | .agents/skills/fix-slow-queries/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
