← 返回 Skills 市场
shaoxiang616

CLAUDE.md Auto Discovery

作者 shaoxiang616 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
157
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-md-auto
功能描述
Automatically discovers and loads CLAUDE.md files from the project root, supporting @include directives and reverse loading up to 40,000 characters.
使用说明 (SKILL.md)

CLAUDE.md 自动发现技能

自动发现并加载项目根目录的 CLAUDE.md 文件,参考 Claude Code 实现。

功能

  1. 自动查找 ./CLAUDE.md 和 ./ CLAUDE.md
  2. 支持 @include 指令
  3. 最大 40000 字符限制
  4. 逆序加载(后面的文件优先级更高)

触发条件

  • 当用户发送消息时自动执行
  • 无需用户手动调用

实现

  • 使用 fs.readFileWithinRoot 读取文件
  • 遍历当前工作目录向上查找
  • 解析 @include 指令
  • 注入到系统上下文
安全使用建议
This skill reads CLAUDE.md files from the repository (up to 4 parent directories), concatenates them, and injects the text into the agent's system context. It does not make network calls or request credentials. Before enabling: (1) review your repository's CLAUDE.md files for any sensitive data (secrets, tokens, private notes), because those will be included in the agent context; (2) note the skill auto-runs on user messages — enable it only for workspaces/repos you trust; (3) be aware implementations check for a file named with a leading space (' CLAUDE.md') which is unusual but harmless. If you need different traversal depth or stricter filtering of loaded content, request or inspect modifications before use.
功能分析
Type: OpenClaw Skill Name: claude-md-auto Version: 0.1.0 The skill automates the discovery and loading of 'CLAUDE.md' files into the agent's system context, which is a high-risk behavior that facilitates indirect prompt injection attacks. While the implementation in 'claude-md.py' and 'discover.mjs' is straightforward file reading, the instructions in 'SKILL.md' to automatically inject unsanitized external content into the system prompt represent a significant security vulnerability. Furthermore, 'SKILL.md' claims to support an '@include' directive that is not actually implemented in the provided code, and it includes an unusual search for files with leading spaces (' CLAUDE.md').
能力评估
Purpose & Capability
Name/description match the provided code: both Python and Node implementations search upward up to 4 levels for CLAUDE.md (and a variant with a leading space), read and combine contents, apply a 40,000-character limit, and return the text for injection. No unrelated binaries, services, or credentials are requested.
Instruction Scope
SKILL.md states the skill auto-runs on user messages and 'injects into system context' — that is consistent with a loader skill. The runtime instructions and code only read local files; they do not access env vars, network, or other system paths. Minor mismatch: SKILL.md refers to fs.readFileWithinRoot (an abstract API) while implementations use direct file reads; also SKILL.md implies generic upward traversal but code limits to 4 levels. These are implementation details and not high risk.
Install Mechanism
No install specification; this is instruction/code-only and does not download or install external packages or run remote installers.
Credentials
The skill requires no environment variables, credentials, or config paths. The actions (reading CLAUDE.md files) are proportionate to its stated goal.
Persistence & Privilege
Registry flags are normal (always:false, model invocation enabled). The SKILL.md says it will run automatically on user messages; autonomous invocation is allowed by default and not in itself a flaw, but users should be aware the skill will load repository-provided text into the agent context whenever triggered.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-md-auto
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-md-auto 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of CLAUDE.md auto-discovery skill. - Automatically searches for and loads CLAUDE.md files from the project root. - Supports @include directives for modular file inclusion. - Handles files up to 40,000 characters. - Loads files in reverse order to prioritize later files. - Triggers automatically on user message—no manual activation required.
元数据
Slug claude-md-auto
版本 0.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

CLAUDE.md Auto Discovery 是什么?

Automatically discovers and loads CLAUDE.md files from the project root, supporting @include directives and reverse loading up to 40,000 characters. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 157 次。

如何安装 CLAUDE.md Auto Discovery?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-md-auto」即可一键安装,无需额外配置。

CLAUDE.md Auto Discovery 是免费的吗?

是的,CLAUDE.md Auto Discovery 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

CLAUDE.md Auto Discovery 支持哪些平台?

CLAUDE.md Auto Discovery 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 CLAUDE.md Auto Discovery?

由 shaoxiang616(@shaoxiang616)开发并维护,当前版本 v0.1.0。

💬 留言讨论