takes-scope

takes-scope is a command for Claude Code from an8079/take-skills. It costs 25 tokens per session (812 once invoked), scanned A, original, MIT.

A command for defining which files or directories a coding agent may modify, which must remain read-only, and which require a warning first.

In plain words
What is it for?
Use it to view, add, remove, lock, unlock, or reset development boundaries and to check edit permissions before files are changed.
Why use it?
It helps protect existing or sensitive parts of a project from accidental changes during incremental development.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-dev-assistant plugin — 21 skills, 39 commands shipped together

Good fit Use it to view, add, remove, lock, unlock, or reset development boundaries and to check edit permissions before files are changed.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/an8079/take-skills/takes-scope
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/an8079/take-skills

Made for: Claude Code.

Or install claude-dev-assistant, the plugin that ships this one along with the rest of its 21 skills, 39 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for takes-scope

README.md
[![agentmods](https://agentmods.dev/badge/commands/an8079/take-skills/takes-scope.svg)](https://agentmods.dev/commands/an8079/take-skills/takes-scope)
Your own site
<a href="https://agentmods.dev/commands/an8079/take-skills/takes-scope"><img src="https://agentmods.dev/badge/commands/an8079/take-skills/takes-scope.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 812 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00812
Opus 5 $0.00013 $0.00406
Sonnet 5 $0.00005 $0.00162
Haiku 4.5 $0.00003 $0.00081

Measured 7d ago against content hash e6552ad560ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

takes-scope scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/takes-scope.md · 143 lines

What it actually says

/scope - 开发范围管理

管理项目的开发边界,确保增量开发过程中不会破坏未授权的模块。

使用方式

/scope <子命令> [参数]

子命令

子命令 说明
show 显示当前开发边界
add 添加允许修改的范围
remove 移除允许修改的范围
lock 锁定指定目录为只读
unlock 解锁指定目录
reset 重置为默认配置

开发边界概念

开发边界是 CLAUDE-STUDIO 的核心安全机制:

  • 允许范围: 可以自由修改的文件/目录
  • 🚫 锁定范围: 禁止修改的只读区域
  • ⚠️ 警告范围: 修改时需要确认的区域

边界设置示例

# .claude/scope.yaml
scope:
  # 允许修改的目录
  allowed:
    - src/features/user
    - src/api/user.ts
    - tests/user

  # 禁止修改的目录(保护现有功能)
  locked:
    - src/core
    - src/legacy
    - node_modules

  # 需要确认的目录(修改前提示)
  warning:
    - src/shared

工作流程

1. 查看当前边界

/scope show

输出:

═══════════════════════════════════════════════════
🔒 开发边界
═══════════════════════════════════════════════════

✅ 允许修改:
   - src/features/*
   - src/api/*
   - tests/*

🚫 锁定区域:
   - src/core/*
   - node_modules/*

⚠️ 警告区域:
   - src/shared/*

═══════════════════════════════════════════════════

2. 添加允许范围

/scope add src/features/payment

3. 锁定保护区域

/scope lock src/legacy --reason="遗留代码,保持稳定"

4. 解锁区域

/scope unlock src/legacy

边界检查

每次编辑/写入文件时,系统会自动检查:

  1. 编辑前检查

    • 文件是否在允许范围内?
    • 是否需要确认?
  2. 危险操作警告

    • 修改锁定区域会直接拒绝
    • 修改警告区域会提示确认
  3. 跨边界检测

    • 检测模块间依赖
    • 警告潜在影响

边界模式

模式 说明 适用场景
全开放 全部可编辑 新项目开发
部分边界 指定范围可编辑 增量开发
只读 全部锁定 只分析不修改

注意事项

  • 边界配置存储在 .claude/scope.yaml
  • 锁定区域无法通过常规操作修改
  • 紧急情况下可使用 scope reset 重置

示例

/scope show                    # 查看当前边界
/scope add src/new-feature    # 添加新功能目录
/scope lock src/core          # 锁定核心代码
/scope unlock src/legacy      # 解锁遗留代码
/scope reset                  # 重置边界配置
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 143 lines · 25 tokens per session scan A e6552ad560ef

Subscribe to this mod's changes

takes-scope is a command published in the GitHub repository an8079/take-skills (4 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 812 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.