---
title: "valet-mode"
url: "https://claudemods.dev/zh-cn/builds/valet-mode-c4f35c"
source: "https://github.com/DJPalefaceSD/rostech-mods/tree/main/plugins/valet-mode"
source_type: "github"
repo: "https://github.com/DJPalefaceSD/rostech-mods/tree/main/plugins/valet-mode"
author: "DJPalefaceSD"
author_handle: "DJPalefaceSD"
stars: 0
category: "安全与隐私"
categories: ["security"]
tags: ["access-control", "claude-code", "hooks", "lock", "plugin", "read-only"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add DJPalefaceSD/rostech-mods\nclaude plugin install valet-mode"
added: "2026-10-05T01:47:16.478Z"
updated: "2026-11-14T01:19:37Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# valet-mode

供他人在你的电脑前使用的只读模式：Claude 可以读取和回答，但在解锁前不能进行任何更改。

## Description

# Valet Mode

当别人使用你的电脑时提供只读模式。就像汽车的代客钥匙：对方可以操作 Claude 的问题和回答，但打不开后备箱。

- `/valet on 4821` 使用你选择的至少 4 个字符的代码开启。
- `/valet off 4821` 关闭。代码错误时会保持开启。
- `/valet` 报告当前是否开启。

开启后，Claude 仍然可以读取文件、搜索并回答问题，但不能编辑或写入文件、运行 shell 命令，也不能使用代表你执行操作的连接器，例如发送电子邮件。提示符上方会显示黄色的 VALET MODE 状态带，提醒所有人它已开启。

它会一次锁定电脑上的每个 Claude Code 窗口，包括已经打开的窗口，几秒内每个窗口都会显示状态带。重启后仍会保持开启，因此关闭 Claude Code 不会解锁。锁定状态和代码保存在你自己电脑用户文件夹中的一个小文件 `.claude/rostech/valet-mode.json` 中。如果文件损坏，Valet Mode 会保持锁定而不会打开。这是给桌边访客使用的简单锁，不是安全系统。它不会向任何地方发送内容。

已使用 Claude Code 2.1.288 测试。

## Install

```
claude plugin marketplace add DJPalefaceSD/rostech-mods
claude plugin install valet-mode
```

## Original README

# Valet Mode

A look-only mode for when someone else is at your PC. Like the valet key for a
car: they can drive Claude's questions and answers, but they cannot open the
trunk.

- `/valet on 4821` turns it on with a code you pick, 4 characters or more.
- `/valet off 4821` turns it off. The wrong code leaves it on.
- `/valet` says whether it is on.

While it is on, Claude can still read files, search and answer questions. It
cannot edit or write files, run shell commands, or use connectors that act for
you, such as sending email. A yellow VALET MODE band sits above the prompt so
nobody forgets it is on.

It locks every Claude Code window on the PC at once, including windows that
were already open, and the band shows up in each of them within a couple of
seconds. It stays on through a restart, so closing Claude Code does not unlock
it. The lock and its code are kept in one small file on your own machine,
`.claude/rostech/valet-mode.json` in your user folder. If that file is damaged,
Valet Mode stays locked rather than opening up. It is a simple lock for a guest
at your desk, not a security system. It sends nothing anywhere.

Tested with Claude Code 2.1.288.
