Token导航 LogoToken导航

Agent Skill · 研究检索

prompt-distiller(即时蒸馏器)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

prompt-distiller 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 64,068。

总安装 306周安装 13GitHub Stars 1下载 107核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/fisokuhle21/prompt-distiller --skill prompt-distiller

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。适合让 Agent 规范任务边界、统一输出格式或优化提示词可复用性。通过安装命令添加,使用时需保留真实业务约束,避免将示例当硬规则。涉及自动执行或外部工具调用时,应在提示词中明确确认步骤和权限边界。

prompt-distiller 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/prompt-distiller

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fisokuhle21/prompt-distiller --skill prompt-di…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

prompt-distiller 怎么安装?

在终端执行 npx skills add https://github.com/fisokuhle21/prompt-distiller --skill prompt-distiller。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

prompt-distiller 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

prompt-distiller 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

prompt-distiller 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

prompt-distiller 用的人多吗?

公开数据是累计安装 306 次,近一周安装 13 次,下载 107 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

prompt-distiller 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
prompt-distiller

即时蒸馏器 · 本页

3061接触敏感数据MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Prompt Distiller

Transform iterative conversations into optimized one-shot prompts. Learn from multi-turn exchanges to create prompts that succeed on the first try.

Mode Selection

Determine which mode applies:

Distilling a conversation? User wants to create a one-shot prompt from a session.

  • Follow: DISTILL Workflow below

Planning a new task? User wants to plan ahead with clarifying questions.

  • Follow: PLAN Workflow below

Listing sessions? User wants to see available conversations.

  • Follow: LIST Workflow below

DISTILL Workflow

Step 1: List Available Sessions

Run the session listing script to find conversations:

python scripts/list_sessions.py [--agent opencode|claude|gemini|codex|all] [--limit 20]

Present sessions to user with:

  • Session ID/timestamp
  • Initial prompt preview
  • Message count
  • Duration/turns

Step 2: Load and Parse Session

Once user selects a session or provides a conversation file/URL:

# Parse OpenCode/Claude/Gemini/Codex session by ID
python scripts/parse_session.py <session-id-or-path> [--agent opencode|claude|gemini|codex]

# Parse external conversation files (.md, .txt)
python scripts/parse_session.py conversation.md
python scripts/parse_session.py chat_export.txt

# Parse from URL (automatically downloads large files)
python scripts/parse_session.py https://example.com/conversation.md
python scripts/parse_session.py https://gist.githubusercontent.com/.../chat.md --save-dir ~/downloads/

The script will:

  • Detect agent type if not specified (supports opencode, claude, gemini, codex, file, or url)
  • Download files from URLs if too large to read online (saved to ~/.cache/prompt-distiller/downloads/)
  • Parse external.md/.txt files with various conversation formats
  • Extract all user messages and assistant responses
  • Identify tool calls and their results
  • Track file modifications and key decisions

Supported External File Formats:

  • Markdown headers: ## User / ## Assistant
  • Prefix format: User: / Assistant:
  • Human/AI format: Human: / AI:
  • Numbered format: 1. User: / 2. Assistant:

Step 3: Analyze the Conversation

Run the distillation analysis:

# Default: saves to ./distilled-prompts/
python scripts/distill_prompt.py <session-id-or-path>

# Custom output directory
python scripts/distill_prompt.py <session> --output ~/my-prompts/

# Custom output file path
python scripts/distill_prompt.py <session> --output ~/prompts/my-prompt.md

# Output to stdout
python scripts/distill_prompt.py <session> --stdout

The analyzer identifies:

  1. Initial Intent - What the user originally wanted
  2. Missing Context - Information that had to be clarified
  3. Corrections Made - Where the assistant went wrong
  4. Key Decisions - Important choices that shaped the outcome
  5. Final Solution - What actually worked

Step 4: Generate One-Shot Prompt

The script outputs a markdown file containing:

# Distilled Prompt: [Task Summary]

## Original Context
- Session: [ID]
- Turns: [N]
- Duration: [Time]

## One-Shot Prompt

[The optimized prompt that includes all necessary context upfront]

## What Made This Work
- [Key insight 1]
- [Key insight 2]

## Anti-Patterns Avoided
- [What went wrong initially]

## Reusability Notes
- [When to use this prompt template]
- [Variables to customize]

Output Format Options:

# Get only the one-shot prompt (no metadata)
python scripts/distill_prompt.py <session> --prompt-only

# Get JSON output for programmatic use
python scripts/distill_prompt.py <session> --json

# Ready-to-use: display prompt + copy to clipboard
python scripts/distill_prompt.py <session> --use

The --use flag is particularly useful for immediately using the distilled prompt:

  • Displays the optimized prompt
  • Automatically copies to clipboard (xclip, xsel, or pbcopy)
  • Provides instructions for starting a new session

Step 5: Review and Refine

Present the distilled prompt to the user. Ask:

  • Does this capture the essential requirements?
  • Are there domain-specific details to add?
  • Should any sections be expanded or condensed?

PLAN Workflow

Step 1: Gather Initial Request

Ask the user to describe their task. Listen for:

  • Vague requirements
  • Assumed context
  • Implicit constraints
  • Missing acceptance criteria

Step 2: Generate Clarifying Questions

Run the planning question generator:

python scripts/generate_questions.py --task "<user's task description>"

The script generates questions across categories:

  • Scope: What's in/out of bounds?
  • Context: What existing code/patterns to follow?
  • Constraints: Performance, compatibility, style requirements?
  • Acceptance: How will success be measured?
  • Edge Cases: What happens when things go wrong?

Step 3: Conduct Planning Interview

Present questions to the user in batches of 3-5. Prioritize:

  1. Blocking questions (can't proceed without answers)
  2. Scope clarifications
  3. Nice-to-have details

After each batch, assess if enough context has been gathered.

Step 4: Synthesize One-Shot Prompt

Once sufficient context is gathered:

python scripts/synthesize_prompt.py --task "<task>" --answers "<qa-pairs>"

Generate a comprehensive prompt that:

  • States the objective clearly
  • Provides all necessary context
  • Specifies constraints and preferences
  • Defines acceptance criteria
  • Anticipates edge cases

Step 5: Validate the Prompt

Present the synthesized prompt and ask:

  • Is anything missing?
  • Are priorities correct?
  • Should any constraints be relaxed?

LIST Workflow

List OpenCode Sessions

python scripts/list_sessions.py --agent opencode

Default location: ~/.local/share/opencode/storage/

List Claude Code Sessions

python scripts/list_sessions.py --agent claude

Default location: ~/.claude/projects/

List Gemini CLI Sessions

python scripts/list_sessions.py --agent gemini

Default location: ~/.gemini/tmp/<project_hash>/chats/

List Codex CLI Sessions

python scripts/list_sessions.py --agent codex

Default location: ~/.codex/sessions/

List All Agents

python scripts/list_sessions.py --agent all

External Conversation Files

You can also distill prompts from exported conversations or manually created files:

# Parse and analyze a markdown conversation
python scripts/distill_prompt.py conversation.md --use

# Parse a text file export
python scripts/distill_prompt.py chat_export.txt --output ~/prompts/

Supported Formats:

  • ## User / ## Assistant - Markdown headers
  • User: / Assistant: - Colon-prefixed messages
  • Human: / AI: - Alternative role names
  • 1. User: / 2. Assistant: - Numbered messages
  • >>> User >>> / --- Assistant --- - Block separators

If no format is detected, the entire file is treated as a single user message.

URL Support

Distill prompts directly from conversations hosted online. Large files are automatically downloaded locally:

# Download and distill from URL
python scripts/distill_prompt.py https://example.com/conversation.md --use

# Download from GitHub Gist
python scripts/distill_prompt.py https://gist.githubusercontent.com/user/id/raw/chat.md

# Specify custom download directory
python scripts/distill_prompt.py https://example.com/large-chat.md --save-dir ~/downloads/

# Force re-download (bypass cache)
python scripts/distill_prompt.py https://example.com/chat.md --force

# Set maximum file size (default 50MB)
python scripts/distill_prompt.py https://example.com/huge-chat.md --max-size 100

URL Features:

  • Automatic file type detection from URL
  • Caches downloaded files in ~/.cache/prompt-distiller/downloads/
  • Respects --force flag to re-download
  • Configurable max file size limit (default 50MB)
  • Works with raw GitHub, Gists, Pastebin, and any direct file URL

Session Data Locations

AgentDefault PathFormat
OpenCode~/.local/share/opencode/storage/JSON
Claude Code~/.claude/projects/JSONL
Gemini CLI~/.gemini/tmp/<project_hash>/chats/JSON
Codex CLI~/.codex/sessions/JSON

Override with environment variables:

  • OPENCODE_SESSIONS_PATH
  • CLAUDE_SESSIONS_PATH
  • GEMINI_SESSIONS_PATH
  • CODEX_SESSIONS_PATH

Resources

scripts/

ScriptPurpose
list_sessions.pyList available conversation sessions (OpenCode, Claude, Gemini, Codex)
parse_session.pyParse session data (OpenCode, Claude, Gemini, Codex, files, or URLs)
distill_prompt.pyAnalyze conversation and generate one-shot prompt
generate_questions.pyGenerate planning questions for a task
synthesize_prompt.pyCreate prompt from task + Q&A answers

distill_prompt.py Options

FlagDescription
--output PATHCustom output file or directory
--stdoutPrint full output to stdout
--prompt-onlyOutput only the one-shot prompt (no metadata)
--useDisplay prompt and copy to clipboard
--jsonOutput analysis as JSON
--agent TYPEForce agent type: opencode, claude, gemini, codex, file, or url
--save-dir PATHDirectory for downloaded files (URLs)
--forceForce re-download even if cached
--max-size MBMaximum download size in MB (default: 50)

parse_session.py Options

FlagDescription
--agent TYPEForce agent type: opencode, claude, gemini, codex, file, or url
--output FILESave parsed output to file
--jsonOutput as JSON instead of formatted text
--save-dir PATHDirectory for downloaded files (URLs)
--forceForce re-download even if cached
--max-size MBMaximum download size in MB (default: 50)

references/

平台分布

OpenCode

29.27%
按下载量换算31

Claude Code

24.34%
按下载量换算26

windsurf

20%
按下载量换算21

Codex

13.17%
按下载量换算14

Antigravity

8.49%
按下载量换算9

Gemini CLI

3.56%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills