Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计通过

distribution-search分布搜索

Agent Skill

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

总安装

792

周安装

33

GitHub Stars

93

下载量

264
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill distribution-search

简介

distribution-search 提供概率分布查找的结构化指导框架。

  • 适用于满足特定熵、KL 散度等信息的数学问题求解。
  • 支持从理论推导到代码实现的完整解决方案构建。
  • 需明确目标分布类型与约束条件方可启动搜索流程。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Distribution Search

Overview

This skill provides structured guidance for finding probability distributions that satisfy specific statistical constraints. These problems typically involve constructing a discrete probability distribution over a large vocabulary that achieves target values for metrics like KL divergence, entropy, or other information-theoretic quantities.

Mathematical Analysis First

Before writing any code, perform thorough mathematical analysis to constrain the solution space:

  1. Derive analytical relationships between the target metrics and distribution properties

- For KL divergence from uniform: KL(P||U) = -H(P) + log(V) where H(P) is entropy and V is vocabulary size - For KL divergence to uniform: KL(U||P) = log(V) - (1/V) * Σ log(P(i))

  1. Calculate fixed quantities from the problem specification

- Vocabulary size V determines log(V) - Target values combined with log(V) constrain feasible entropy ranges

  1. Identify implied constraints from simultaneous requirements

- Multiple target metrics often severely restrict the feasible solution space - Determine if the problem is over-constrained before attempting optimization

  1. Estimate the solution structure analytically

- Determine the approximate entropy the distribution must have - Estimate how concentrated or spread the probability mass should be

Parameterization Strategy

High-dimensional optimization over all probability values is impractical. Use reduced parameterizations:

Recommended Parameterizations

  1. Power law with uniform tail: k high-probability elements following p_i ∝ i^(-α), remaining elements share probability equally

- Parameters: k (number of special elements), α (power law exponent), p_rest (probability for tail)

  1. Two-group distribution: k elements with probability p_high, remaining elements with probability p_low

- Parameters: k, p_high (p_low is determined by normalization)

  1. Multi-tier distribution: Several groups of elements with distinct probability levels

- Parameters: group sizes and probability levels

Parameter Selection Guidance

  • Start with few parameters (2-3) and add flexibility only if needed
  • Derive parameter bounds from mathematical constraints rather than arbitrary choices
  • Calculate reasonable initial values from the analytical solution estimates

Implementation Approach

Modular Code Structure

Organize code into separate, tested functions:

- kl_forward(P, V): Compute KL(P||Uniform)
- kl_backward(P, V): Compute KL(Uniform||P)
- create_distribution(params, V): Generate distribution from parameterization
- objective(params): Optimization objective combining constraints
- verify_solution(P, V, targets): Independent verification

Computational Efficiency

  • Avoid full array operations when possible - use analytical formulas for symmetric distributions
  • For two-group distributions: compute entropy/KL directly from group sizes and probabilities
  • Estimate computational cost before running - set appropriate timeouts

Optimization Strategy

  1. Coarse grid search over reduced parameter space to find promising regions
  2. Local optimization from multiple starting points in promising regions
  3. Refinement with tighter tolerances near solutions

Verification

Independent Verification

Always verify solutions with code independent from the optimization:

  1. Check probability constraints: All values non-negative, sum to 1.0
  2. Compute metrics directly: Use explicit formulas, not the optimization objective
  3. Test against known cases: Verify computation on uniform distribution or other known solutions

Common Verification Bugs

  • Incorrect handling of log(0) - use appropriate thresholds (e.g., max(p, 1e-30))
  • Array indexing errors when elements are counted vs indexed
  • Forgetting to normalize after parameter adjustments
  • Multiplication errors when computing sums over groups

Common Pitfalls

Computational

  • Starting with full-dimensional optimization: Immediately recognize the need for reduced parameterization
  • Insufficient timeout estimation: Estimate iterations needed before running
  • Rewriting entire scripts: Use modular code to enable targeted fixes

Mathematical

  • Incomplete constraint analysis: Fully leverage mathematical relationships before coding
  • Arbitrary parameter bounds: Derive bounds from problem constraints
  • Poor initial values: Use analytical estimates for starting points

Verification

  • Trusting optimization output directly: Always verify with independent computation
  • Not testing verification code: Verify the verifier using known solutions first
  • Numerical precision issues: Handle small probabilities carefully

Problem-Solving Workflow

  1. Analyze: Derive analytical relationships and estimate solution structure
  2. Parameterize: Choose reduced parameterization matching expected structure
  3. Implement: Write modular, tested code for each component
  4. Search: Grid search followed by local optimization
  5. Verify: Independent verification of candidate solutions
  6. Refine: Adjust parameterization if tolerances not achieved

When Solutions Are Not Found

If optimization fails to find valid solutions:

  1. Check if the problem is mathematically feasible given constraints
  2. Verify the parameterization can represent valid solutions
  3. Expand the parameterization to add flexibility
  4. Check for bugs in objective function or constraint handling
  5. Try different optimization algorithms or starting points

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

29.28%
按下载量换算77

Gemini CLI

23.75%
按下载量换算63

Antigravity

19.63%
按下载量换算52

windsurf

12.18%
按下载量换算32

OpenCode

7.21%
按下载量换算19

Codex

3.57%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills