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

decision-log决策日志

Agent Skill

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

总安装

288

周安装

12

GitHub Stars

公开资料未说明

下载量

96
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bonkey/skills --skill decision-log

简介

decision-log 用于捕获架构和功能决策,自动生成轻量级 ADR 文件。

  • 适合在规划阶段或重大决策时自动或手动触发记录,支持与项目文档系统集成。
  • 通过创建专用目录、注册到项目指令文件实现初始化,提供标准化模板和触发机制。
  • 安装前需确认项目文档结构、权限范围及是否会修改文件系统或执行命令。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Decision Log

Capture architectural and feature decisions as lightweight ADR files. Automatically triggered when exiting plan mode; manually triggered for significant decisions outside plan mode.

Setup (run once per project)

1. Create the decision log directory

Scan the repo for common documentation folders (docs/, doc/, documentation/). Use the first match as {docs}. If none exist, default to docs. Then:

mkdir -p {docs}/decisions

2. Register in project agent instructions

Add to the project's AGENTS.md, CLAUDE.md, or GEMINI.md (whichever exists, prefer AGENTS.md):

## Decision Log

Decision log directory: ./{docs}/decisions/

When exiting plan mode, create a decision record in the decisions directory. If a non-trivial decision is made outside plan mode (choosing between approaches, introducing a pattern, reversing a prior decision), create one too. Use the format: `YYYY-MM-DD-{slug}.md` with YAML frontmatter containing `title`, `id` (YYYY-MM-DD-animal), `date`, `areas`, `references` (IDs of related records), and `tldr`. Never modify existing records — create a new one that references the old. Keep entries concise — a decision record is a signpost, not a specification.

3. Install the Claude Code hook (Claude Code only)

Add to the project's .claude/settings.json (create if needed):

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "ExitPlanMode",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/decision-log-capture.sh",
            "timeout": 5
          }
        ]
      }
    ]
  }
}

Create the hook script at .claude/hooks/decision-log-capture.sh:

#!/usr/bin/env bash
# Injects a reminder to create a decision log entry after exiting plan mode.
# The agent receives this as additionalContext and writes the ADR file itself.

cat <<'HOOK_JSON'
{
  "hookSpecificOutput": {
    "hookEventName": "PostToolUse",
    "additionalContext": "DECISION LOG: You just exited plan mode. Create a decision log entry now. Find the decisions directory from AGENTS.md/CLAUDE.md. Check existing IDs (grep '^id:' *.md) and pick an unused animal name. Write YYYY-MM-DD-{slug}.md with frontmatter: title, id (YYYY-MM-DD-animal), date, areas, references (IDs of related records or []), tldr. Four sections: Context, Decision, Alternatives Considered, Consequences. For Alternatives: only list what was actually discussed — if nothing, write 'No other approaches were evaluated'. Never modify existing records. Under 50 lines. Skip if trivial."
  }
}
HOOK_JSON

Make it executable: chmod +x.claude/hooks/decision-log-capture.sh

For other AI CLIs (Gemini CLI, Cursor, etc.): add equivalent post-plan instructions to the agent config. The AGENTS.md entry is the cross-CLI fallback.

Decision Record Format

Filename: YYYY-MM-DD-{slug}.md where {slug} is a short kebab-case summary.

ID assignment

Each record gets an id in frontmatter: YYYY-MM-DD-{animal} (e.g., 2025-03-15-falcon). The date is the record's creation date; the animal is a short (≤8 char) memorable name. To assign:

  1. List existing IDs in the decisions directory (grep -h '^id:' *.md)
  2. Pick an animal name not already used on that date
  3. If the obvious name collides, pick another animal — don't append numbers

The ID doubles as a human-friendly reference in conversation and in references frontmatter of other records.

Template

---
title: Short decision title
id: 2025-03-15-falcon
date: 2025-03-15
areas: [auth, database, ui]
references: []  # IDs of related prior decisions, e.g. [2025-03-10-otter, 2025-02-28-hawk]
tldr: One sentence — what changed and why.
---

## Context

What's the situation? 1-3 sentences. Reference prior decisions by ID if relevant.

## Decision

What was done? Be specific — name files, types, patterns. 2-5 sentences.

## Alternatives Considered

What else was on the table and why it was rejected? If nothing else was considered, write "No other approaches were evaluated" — do not invent alternatives after the fact.

## Consequences

What follows from this decision? Trade-offs, migration needs, things that become easier or harder. 2-4 bullet points.

Guidelines

  • Concise over complete — a decision record is a signpost, not a design doc. If someone needs detail, they read the code or the PR.
  • Frontmatter is for machinestldr, areas, id, and references let agents scan and traverse decisions without reading bodies.
  • One decision per file — don't bundle unrelated choices.
  • No fabricated alternatives — only document alternatives that were actually discussed or evaluated. "No other approaches were evaluated" is a valid and preferred answer over made-up options.
  • Never modify existing records — if a decision changes, create a new record that references the old one. The old record stays as-is. History is append-only.
  • Skip trivial changes — typo fixes, single-file renames, and dependency bumps don't need a record.

When to Create a Decision Record

TriggerAction
Exiting plan mode (auto via hook)Create record from the plan
Choosing between approachesCreate record explaining the choice
Introducing a new pattern or conventionCreate record for future reference
Reversing or replacing a prior decisionCreate new record referencing the old one by ID
Plan changes significantly during implementationCreate new record referencing the original plan's ID
Someone asks "why did we do X?"If no record exists, create one retroactively

Before Making Changes

  1. Check the decisions directory for existing records related to your task
  2. Read related records to understand context, constraints, and prior decisions
  3. Reference prior decisions by ID in your new record's references frontmatter field

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.01%
按下载量换算36

Claude

28.22%
按下载量换算27

Cursor

19.72%
按下载量换算19

Gemini CLI

8.89%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills