mandatory-tools
Skill1 starsChanged 3 days agoBSD-3-ClauseView on GitHub
Mandatory skill for CLI, shell execution, filesystem operations, structured edits, and token-optimized commands. Selects the right tool per operation: Serena and Kagi MCP tools first, Patchloom for parser-backed and multi-file edits, RTK for token-optimized shell output, modern UNIX replacements (lsd, fd, rg, ruplacer, uv, ruff, tree) for everything else. Forbids legacy ls, find, grep, sed, pip, black, flake8, isort.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-designSkill
- bootstrapSkill
- dash-protocolSkill
- discuss-firstSkill
- entity-protocolSkill
- existence-bibleSkill
- frontmatter-protocolSkill
- kagi-searchSkill
- markdown-protocolSkill
- ondemandSkill
- preflight-checklistSkill
- python-langSkill
- read-for-commentsSkill
- serena-protocolSkill
- subagents-protocolSkill
- todo-protocolSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Base filesystem/search/Python?: Use the modern replacement from §2.
- Distinctive: line 31
If you are about to run a command and have not asked these questions, stop and ask them.
- Very specific: line 52
When rtk is on PATH, every shell command starts with rtk.
- Very specific: line 62
Prefer rtk rg over plain rg when expected output exceeds roughly 20 lines.
- Very specific: line 70
Use Patchloom for any structured or multi-file edit when MCP tools are visible or the patchloom binary is present.
- Distinctive: line 86
Never use a legacy tool when a modern replacement exists.
- Very specific: line 87
Never omit the rtk prefix when RTK is available.
- Distinctive: line 88
Never bypass Patchloom for a structured/multi-file edit when Patchloom is available.
- Distinctive: line 89
Never use a non-MCP alternative when an MCP tool fits.
- Very specific: line 91
Run ruff check and ruff format after any Python file change.
- Distinctive: line 98
If you break any hard rule, halt immediately, disclose the miss in one line, discard the output, and rerun through the correct layer.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SKILL: Mandatory Tools — Modern CLI, RTK & Patchloom
[ref: #mt-skill]
This skill is a hard gate. Before every operation that touches files, shell, search, Python, or structured data, walk the ladder below and use the first applicable layer. No exceptions, no defaults, no "good enough".
1. Tool Selection Ladder
[ref: #mt-ladder]
Answer in this exact order:
- Serena MCP? Memory or symbolic code operation →
read_memory,write_memory,find_symbol,replace_symbol_body, etc. - Kagi MCP? Web search or page enrichment →
kagi_search_fetch,kagi_fastgpt,kagi_extract,kagi_summarizer. - Patchloom? Structured or multi-file edit →
execute_plan,doc_set,batch_replace,md_replace_section, etc. - Shell command? Prefix with
rtkif available. - Base filesystem/search/Python? Use the modern replacement from §2.
- Legacy tool? FORBIDDEN. Halt and pick the correct layer.
If you are about to run a command and have not asked these questions, stop and ask them.
2. Modern Replacements
[ref: #mt-replacements]
| Legacy | Modern |
ls | lsd |
find | fd |
grep | rg |
sed (bulk replace) | ruplacer |
pip, poetry, virtualenv | uv (read-only by default) |
black, flake8, isort | ruff |
uv state-changing commands (init/add/remove/lock/sync/venv/build/publish, tool install/uninstall, python install) require the user's explicit request. Read-only safe commands are always allowed.
3. RTK
[ref: #mt-rtk]
When rtk is on PATH, every shell command starts with rtk. This includes commands inside && chains. Choose the modern tool first, then prefix it.
# Wrong
git status && rg TODO
# Correct
rtk git status && rtk rg TODOPrefer rtk rg over plain rg when expected output exceeds roughly 20 lines.
Forbidden without explicit user request: rtk init, rtk trust, rtk untrust, rtk hook, rtk telemetry.
4. Patchloom
[ref: #mt-patchloom]
Use Patchloom for any structured or multi-file edit when MCP tools are visible or the patchloom binary is present.
| Situation | Tool |
| Same edit across 2+ files | batch_replace |
| JSON/YAML/TOML value edit | doc_set / execute_plan |
| Markdown section by heading | md_replace_section |
| Coordinated multi-file edits | execute_plan |
| Single small plain-text edit | native edit tool or ruplacer dry-run |
Patchloom never replaces Serena, Kagi, or shell build/test steps (uv, ruff, rtk-prefixed commands).
5. Hard Rules
[ref: #mt-hard-rules]
- Never use a legacy tool when a modern replacement exists.
- Never omit the
rtkprefix when RTK is available. - Never bypass Patchloom for a structured/multi-file edit when Patchloom is available.
- Never use a non-MCP alternative when an MCP tool fits.
ruplacerdry-run first; review stdout before any--go.- Run
ruff checkandruff formatafter any Python file change. - Limit directory listings with depth flags.
6. Violation Protocol
[ref: #mt-violation]
If you break any hard rule, halt immediately, disclose the miss in one line, discard the output, and rerun through the correct layer. Do not continue until the rerun succeeds. Record repeated violations in Serena memory under bugs/project/mandatory-tools-bypass.
7. Reference Routing
[ref: #mt-routing]
| Topic | Reference |
| RTK inventory | references/rtk.md |
| Patchloom traps | references/patchloom.md |
| File search | references/fd-find.md |
| Text search | references/ripgrep.md |
| Bulk replace | references/ruplacer.md |
| Python lint/format | references/ruff.md |
| uv safe commands | references/uv.md |
| Directory listing | references/lsd.md |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

