Token导航 LogoToken导航TokenDH.com
Yakusoku Keeper logo
AI代理stdio官方级别未说明来源级核验

Yakusoku Keeper

MCP Server

一个基于规则的提示管理服务器,通过输入计数和时间触发器强制执行一致的LLM行为,适用于代码规范提醒、文档提示等场景。

工具数

5

提示词数

0

GitHub Stars

1

资源数

0
PythonClaudeAI代理Claude

安装说明

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

作者 / 组织

ShigeruWakida

提供方

ShigeruWakida

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

雅库索库守门员

一种基于规则的提示MCP服务器,通过输入计数和基于时间的触发器强制执行一致的LLM行为。

Yakusoku在日语中意为“promise”-此工具通过在指定时间间隔自动应用配置的规则来帮助Claude Code遵守其承诺。

特性

  • 🎯 自动规则应用程序:规则会根据输入计数或经过的时间自动触发
  • 🔄 动态规则管理:实时添加、删除和修改规则
  • ⚙️ 灵活的配置:支持用户级别和项目特定规则
  • 📊 多种触发器类型:第一次,每N个输入,每N分钟规则
  • 🔌 Claude代码集成:MCP服务器与Claude Code无缝集成

快速开始

安装

  1. 克隆存储库:
git clone https://github.com/ShigeruWakida/YakusokuKeeper.git
cd YakusokuKeeper
  1. 安装依赖项:
pip install -r requirements.txt
  1. 测试服务器:
python yakusoku_keeper.py

Claude代码配置

使用Claude Code CLI添加服务器:

claude mcp add yakusoku_keeper --scope project -- python /path/to/YakusokuKeeper/yakusoku_keeper.py

或者手动将此添加到您的Claude Code MCP设置中:

{
  "mcpServers": {
    "yakusoku_keeper": {
      "type": "stdio",
      "command": "python",
      "args": ["/path/to/YakusokuKeeper/yakusoku_keeper.py"],
      "env": {}
    }
  }
}

运作原理

规则类型

  • first:触发第一次交互
  • every_N_inputs:每N个用户输入触发一次(例如,每5次交互)
  • every_N_minutes:自上次触发后经过N分钟后触发

配置文件

Yakusoku Keeper使用两层配置系统:

  • ~/.yakusoku/yakusoku_config.yml:全局规则(默认情况下已创建并注释掉)
  • .yakusoku/project.yml:项目特定规则(默认情况下创建为活动)

配置示例

# --- First time rules ---
first:
  - At the beginning of the response, insert the string that follows "say".
  - say Hello! I am Yakusoku Keeper.
  - Generate code using the K&R coding style.
  - Use only < and <= operators for all comparisons.
  - Read and follow ./docs/README_CODING_STANDARDS.md
  - When using replace_symbol_body, insert_after_symbol, or insert_before_symbol, you MUST present the code block—preferably in diff format—and you MUST obtain explicit approval before applying any change.

# --- Input count based rules ---
every_5_inputs:
  - Generate code using the K&R coding style.
every_10_inputs:
  - Use only < and <= operators for all comparisons.
  - When using replace_symbol_body, insert_after_symbol, or insert_before_symbol, you MUST present the code block—preferably in diff format—and you MUST obtain explicit approval before applying any change.

# --- Time based rules ---
every_60_minutes:
  - Read and follow ./docs/README_CODING_STANDARDS.md

MCP工具

核心工具

  • get_rules():返回符合当前条件的规则(自动调用)
  • reset():重置输入计数器和时间触发器
  • initial_instructions():为Claude Code提供高优先级指令

规则管理工具

  • add_rule(rule_type, rule_content, target, value):动态添加新规则
  • remove_rule(rule_type, rule_content, target, value):删除现有规则

例子

# Add a first-time rule
add_rule("first", "Always be polite and helpful")

# Add an input-based rule (every 3 inputs)
add_rule("every_N_inputs", "Check code for best practices", value=3)

# Add a time-based rule (every 30 minutes)
add_rule("every_N_minutes", "Suggest taking a break", value=30)

# Remove a rule
remove_rule("first", "Always be polite and helpful")

项目结构

YakusokuKeeper/
├── yakusoku_keeper.py    # Main MCP server
├── README.md           # This file
├── requirements.txt    # Dependencies
├── LICENSE            # MIT License
└── .yakusoku/          # Project configuration (auto-created)

用例

  • 编码标准:自动提醒代码样式要求
  • 文档:定期提示提供文件
  • 代码审查:每隔几次交互就触发质量检查
  • 休息提醒:建议在长时间编码会话中休息
  • 问候语:为新会议提供一致的欢迎信息

组合:雅库索库守门员+mcp获胜祝酒词

mcp胜利干杯 是一个MCP服务器,允许AI助手发送Windows吐司通知和对话框。通过将其与YakusokuKeeper结合,您可以构建一个 自我管理AI助手 它会在适当的时候自动通知你,而不会被问到。

休息提醒

添加一个基于时间的规则,以吐司通知的形式提醒您每30分钟休息一次。

every_30_minutes:
  - "Call show_toast with title 'Break Time' and message 'You have been working for 30 minutes. Stand up and stretch!'"

定期进度报告

让克劳德每10次交互自动总结一下它所做的事情,并通知你。

every_10_inputs:
  - "Summarize what you have accomplished so far in 2-3 bullet points, then call show_toast with title 'Progress Report' and the summary as the message."

关键文件保护

每当Claude要修改重要文件时,都会显示一个阻止对话框进行确认。

first:
  - "Before editing any file matching *.env, *.config, or docker-compose.*, always call show_dialog with title 'Confirm Edit' and a message describing which file you are about to modify. Wait for the user to acknowledge before proceeding."

会话持续时间警告

在长时间会话后用对话框警告用户,以便他们决定是否继续。

every_60_minutes:
  - "Call show_dialog with title 'Long Session' and message 'You have been working for over an hour. Would you like to wrap up or continue?' to check in with the user."

贡献

  1. 分叉存储库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

致谢

目录标签

目录标签

PythonClaudeAI代理规则引擎本地部署LLM行为控制代码规范自动提醒Claude集成

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP