Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

prompt-distiller即时蒸馏器

Agent Skill

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

总安装

306

周安装

13

GitHub Stars

1

下载量

107
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 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

简介

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。

  • 适合让 Agent 规范任务边界、统一输出格式或优化提示词可复用性。
  • 通过安装命令添加,使用时需保留真实业务约束,避免将示例当硬规则。
  • 涉及自动执行或外部工具调用时,应在提示词中明确确认步骤和权限边界。
  • prompt-distiller 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

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/

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

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、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills