Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/chen3feng/agent-skillsnpx agentmods add skills/chen3feng/agent-skills/workspace-path-constraintsWrote 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.
[](https://agentmods.dev/skills/chen3feng/agent-skills/workspace-path-constraints)<a href="https://agentmods.dev/skills/chen3feng/agent-skills/workspace-path-constraints"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/workspace-path-constraints/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/workspace-path-constraints"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/workspace-path-constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00018 | $0.00731 |
| Opus 5 | $0.00009 | $0.00365 |
| Sonnet 5 | $0.00004 | $0.00146 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
workspace-path-constraints 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working across indexed and non-indexed workspaces
When to use
You need to create or edit files in a sibling directory the user just
cloned (e.g. ../agent-skills) but the agent's edit_file,
list_dir, codebase_search, or view_code_item refuses it with
路径不在workspace下,拒绝请求 / "path is not in workspace".
Problem
Several tools are scoped to the indexed workspaces only (the ones listed in the session's workspace configuration). They won't touch files outside, even if the process has filesystem permission.
Trying to keep inventing ad-hoc cat > file <<EOF heredocs in the
shell is how you get the problems documented in
shell-heredoc-and-multiline-strings.
Solution
Pick one based on what the target needs:
-
One or two short text files → use the agent's
terminaltool withprintf/tee, quoting carefully. -
Multiple files, or files with backticks / quotes / multi-line code → write a generator script inside an indexed workspace (e.g.
blade-build/tmp_build_skills.py) that builds a{path: content}dict and writes every file with standardPath.write_text. The generator is plain Python source, soedit_fileis happy to create it. Run it once withpython3, then delete. -
Read-only exploration (listing, grepping) of the non-indexed directory → use
terminalwithls,find,cat,rg. -
Large existing file you need to modify →
catit through the terminal to inspect, then apply a smallsed -ior re-emit via the generator-script trick.
Example
Generator-script pattern:
# blade-build/tmp_build_skills.py
from pathlib import Path
ROOT = Path("/Volumes/SanDiskSSD/code/agent-skills")
FILES = {
"README.md": "…",
"skills/foo/SKILL.md": "…",
}
for rel, body in FILES.items():
p = ROOT / rel
p.parent.mkdir(parents=True, exist_ok=True)
p.write_text(body)
print(f"wrote {len(FILES)} files")
Then:
python3 /Volumes/SanDiskSSD/code/blade-build/tmp_build_skills.py
rm /Volumes/SanDiskSSD/code/blade-build/tmp_build_skills.py
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.
- 8d ago First seen · 86 lines · 18 tokens per session scan A 6d8028027cdf
workspace-path-constraints is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 731 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.
Other skills, from other repositories
sivtr-memory
Retrieve shared local work memory: terminal activity, AI conversation history, prior decisions, validation evidence, debugging trails, recaps, and handoff context. Use before asking the user to repeat local work context.
General Data Analysis Skills Index
General-purpose skills for data analysis infrastructure: workspace file organization, environment management, parallel computing, and performance.
google-workspace
Google Docs, Sheets, and Drive operations via REST API.
notion
Notion workspace management via API — pages, databases, blocks.
Shell Execution
Keeps explicit shell work legible, bounded, and attached to the current workspace thread.
Workspace Search
Keeps local retrieval, file search, and nearby context gathering available in-session.