技能 file-boundaries
🔒

file-boundaries

安全 🌐 网络访问📁 文件系统访问⚙️ 外部命令

尊重檔案所有權界線

並行 AI 代理程式在編輯相同檔案時經常發生衝突。此技能教導代理程式識別並尊重所有權界線,防止協作實作過程中的工作遺失和合併衝突。

支持: Claude Codex Code(CC)
⚠️ 68
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“file-boundaries”。 Check if I can modify src/auth/login.ts

预期结果:

  • ✓ src/auth/login.ts is in your owned files list
  • You can read, modify, create, or delete this file
  • Proceed with your changes

正在使用“file-boundaries”。 I need to modify src/types/user.ts to add a new field

预期结果:

  • ✗ BLOCKED: src/types/user.ts is not in your owned files
  • It is in your read-only files list
  • Status: boundary_violation
  • Resolution: Request permission to modify or contract update

正在使用“file-boundaries”。 What files do I own in the src/api directory?

预期结果:

  • Owned files in src/api/:
  • ✓ src/api/users/* - full access
  • ✓ src/api/posts/* - full access
  • Read-only files in src/api/:
  • ○ src/api/shared/* - reference only

安全审计

安全
v5 • 1/16/2026

This is a pure prompt-based documentation skill containing only guidance rules for multi-agent coordination. The skill teaches agents to recognize and respect file ownership boundaries, preventing conflicts in parallel work. No executable code, no file system access, no network calls, no command execution capabilities. The static findings are false positives: SHA256 hash identifiers were misidentified as C2/weak crypto, and YAML code block examples were misidentified as shell execution.

2
已扫描文件
253
分析行数
3
发现项
5
审计总数
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
85
内容
20
社区
100
安全
83
规范符合性

你能构建什么

並行開發

啟用多個 AI 代理程式同時處理程式碼庫的不同部分而不發生衝突。

強制執行所有權規則

確保代理程式只能修改明確指派給它們擁有或修改的檔案。

受控變更

透過清晰的所有權界線將大型重構任務分配給各個代理程式,防止重疊。

试试这些提示

基本所有權檢查
在修改 src/components/button.ts 之前,檢查它是否在我擁有的檔案清單中。
唯讀參考
我需要讀取 src/types/api.ts 作為參考。我可以讀取它,但不能修改它。
報告違規
我需要修改 src/utils/auth.ts,但它不在我擁有的檔案中。報告 BLOCKED 狀態並附上詳細資訊。
並行安全性檢查
根據 src/api/ 端點驗證我的界線。我擁有 src/api/users/,但沒有 src/api/auth/。

最佳实践

  • 在開始並行工作前定義清晰的所有權界線
  • 報告界線違規而非繞過它們
  • 使用擁有的檔案進行修改,唯讀檔案用於參考

避免

  • 假設有權限修改不在所有權清單中的檔案
  • 繞過界線以更快完成任務
  • 未經明確許可修改共享公用程式檔案

常见问题

哪些工具支援檔案界線?
此技能適用於 Claude、Codex 和 Claude Code。這是一種基於提示的模式,而非獨立工具。
遇到界線時會發生什麼?
您必須報告 BLOCKED 狀態並附上詳細資訊。請勿嘗試修改超出您所有權的檔案。
我可以修改唯讀檔案嗎?
不行。唯讀檔案可以匯入和參考,但無法修改。請請求許可以變更界線。
如何配置界線?
界線在技能配置中的 owns 和 reads 陣列下定義,指定檔案路徑。
此技能安全嗎?
是的。此技能僅提供指導規則。它不會存取檔案、網路或執行程式碼。
這與 .claudeignore 有何不同?
.claudeignore 完全阻止檔案存取。File-boundaries 允許讀取存取,同時限制修改僅限於擁有的檔案。

开发者详情

文件结构

📄 SKILL.md