用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill approval命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| description | Imported skill approval from langchain |
| name | approval |
| signature | 28370e8209247ef92b9b75a67f3bf7db8b5f6af4bbe3049de2eb4c2790a2b2a9 |
| source | /a0/tmp/skills_research/langchain/libs/deepagents-cli/deepagents_cli/widgets/approval.py |
"""Approval widget for HITL - using standard Textual patterns."""
from future import annotations
import asyncio from typing import Any, ClassVar
from textual import events from textual.app import ComposeResult from textual.binding import Binding, BindingType from textual.containers import Container, Vertical, VerticalScroll from textual.message import Message from textual.widgets import Static
from deepagents_cli.widgets.tool_renderers import get_renderer
class ApprovalMenu(Container): """Approval menu using standard Textual patterns.
Key design decisions (following mistral-vibe reference):
- Container base class with compose()
- BINDINGS for key handling (not on_key)
- can_focus_children = False to prevent focus theft
- Simple Static widgets for options
- Standard message posting
- Tool-specific widgets via renderer pattern
"""
can_focus = True
can_focus_children = False
# CSS is in app.tcss - no DEFAULT_CSS needed
BINDINGS: ClassVar[list[BindingType]] = [
Binding("up", "move_up", "Up", show=False),
Binding("k", "move_up", "Up", show=False),
Binding("down", "move_down", "Down", show=False),
Binding("j", "move_down", "Down", show=False),
Binding("enter", "select", "Select", show=False),
Binding("1", "select_approve", "Approve", show=False),
Binding("y", "select_approve", "Approve", show=False),
Binding("2", "select_reject", "Reject", show=False),
Binding("n", "select_reject", "Reject", show=False),
Binding("3", "select_auto", "Auto-approve", show=False),
Binding("a", "select_auto", "Auto-approve", show=False),
]
class Decided(Message):
"""Message sent when user makes a decision."""
def __init__(self, decision: dict[str, str]) -> None:
super().__init__()
self.decision = decision
def __init__(
self,
action_request: dict[str, Any],
assistant_id: str | None = None,
id: str | None = None, # noqa: A002
**kwargs: Any,
) -> None:
super().__init__(id=id or "approval-menu", classes="approval-menu", **kwargs)
self._action_request = action_request
self._assistant_id = assistant_id
self._tool_name = action_request.get("name", "unknown")
self._tool_args = action_request.get("args", {})
self._description = action_request.get("description", "")
self._selected = 0
self._future: asyncio.Future[dict[str, str]] | None = None
self._option_widgets: list[Static] = []
self._tool_info_container: Vertical | None = None
def set_future(self, future: asyncio.Future[dict[str, str]]) -> None:
"""Set the future to resolve when user decides."""
self._future = future
def compose(self) -> ComposeResult:
"""Compose the widget with Static children.
Layout prioritizes options visibility - they appear at the top so users
always see them even in small terminals.
"""
# Title
yield Static(
f">>> {self._tool_name} Requires Approval <<<",
classes="approval-title",
)
# Options container FIRST - always visible at top
with Container(classes="approval-options-container"):
# Options - create 3 Static widgets
for i in range(3):
widget = Static("", classes="approval-option")
self._option_widgets.append(widget)
yield widget
# Help text right after options
yield Static(
"↑/↓ navigate • Enter select • y/n/a quick keys",
classes="approval-help",
)
# Separator between options and tool details
yield Static("─" * 40, classes="approval-separator")
# Tool info in scrollable container BELOW options
with VerticalScroll(classes="tool-info-scroll"):
self._tool_info_container = Vertical(classes="tool-info-container")
yield self._tool_info_container
async def on_mount(self) -> None:
"""Focus self on mount and update tool info."""
await self._update_tool_info()
self._update_options()
self.focus()
async def _update_tool_info(self) -> None:
"""Mount the tool-specific approval widget."""
if not self._tool_info_container:
return
# Get the appropriate renderer for this tool
renderer = get_renderer(self._tool_name)
widget_class, data = renderer.get_approval_widget(self._tool_args)
# Clear existing content and mount new widget
await self._tool_info_container.remove_children()
approval_widget = widget_class(data)
await self._tool_info_container.mount(approval_widget)
def _update_options(self) -> None:
"""Update option widgets based on selection."""
options = [
"1. Approve (y)",
"2. Reject (n)",
"3. Auto-approve all this session (a)",
]
for i, (text, widget) in enumerate(zip(options, self._option_widgets, strict=True)):
cursor = "› " if i == self._selected else " "
widget.update(f"{cursor}{text}")
# Update classes
widget.remove_class("approval-option-selected")
if i == self._selected:
widget.add_class("approval-option-selected")
def action_move_up(self) -> None:
"""Move selection up."""
self._selected = (self._selected - 1) % 3
self._update_options()
def action_move_down(self) -> None:
"""Move selection down."""
self._selected = (self._selected + 1) % 3
self._update_options()
def action_select(self) -> None:
"""Select current option."""
self._handle_selection(self._selected)
def action_select_approve(self) -> None:
"""Select approve option."""
self._selected = 0
self._update_options()
self._handle_selection(0)
def action_select_reject(self) -> None:
"""Select reject option."""
self._selected = 1
self._update_options()
self._handle_selection(1)
def action_select_auto(self) -> None:
"""Select auto-approve option."""
self._selected = 2
self._update_options()
self._handle_selection(2)
def _handle_selection(self, option: int) -> None:
"""Handle the selected option."""
decision_map = {
0: "approve",
1: "reject",
2: "auto_approve_all",
}
decision = {"type": decision_map[option]}
# Resolve the future
if self._future and not self._future.done():
self._future.set_result(decision)
# Post message
self.post_message(self.Decided(decision))
def on_blur(self, event: events.Blur) -> None:
"""Re-focus on blur to keep focus trapped."""
self.call_after_refresh(self.focus)