agentleFS
kalaverinkalaverin/skills/mandatory-tools/SKILL.md

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.

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
  1. Very specific:

    Base filesystem/search/Python?: Use the modern replacement from §2.

    line 28
  2. Distinctive:

    If you are about to run a command and have not asked these questions, stop and ask them.

    line 31
  3. Very specific:

    When rtk is on PATH, every shell command starts with rtk.

    line 52
  4. Very specific:

    Prefer rtk rg over plain rg when expected output exceeds roughly 20 lines.

    line 62
  5. Very specific:

    Use Patchloom for any structured or multi-file edit when MCP tools are visible or the patchloom binary is present.

    line 70
  6. Distinctive:

    Never use a legacy tool when a modern replacement exists.

    line 86
  7. Very specific:

    Never omit the rtk prefix when RTK is available.

    line 87
  8. Distinctive:

    Never bypass Patchloom for a structured/multi-file edit when Patchloom is available.

    line 88
  9. Distinctive:

    Never use a non-MCP alternative when an MCP tool fits.

    line 89
  10. Very specific:

    Run ruff check and ruff format after any Python file change.

    line 91
  11. Distinctive:

    If you break any hard rule, halt immediately, disclose the miss in one line, discard the output, and rerun through the correct layer.

    line 98

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Serena MCP? Memory or symbolic code operation → read_memory, write_memory, find_symbol, replace_symbol_body, etc.
  2. Kagi MCP? Web search or page enrichment → kagi_search_fetch, kagi_fastgpt, kagi_extract, kagi_summarizer.
  3. Patchloom? Structured or multi-file edit → execute_plan, doc_set, batch_replace, md_replace_section, etc.
  4. Shell command? Prefix with rtk if available.
  5. Base filesystem/search/Python? Use the modern replacement from §2.
  6. 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]

LegacyModern
lslsd
findfd
greprg
sed (bulk replace)ruplacer
pip, poetry, virtualenvuv (read-only by default)
black, flake8, isortruff

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 TODO

Prefer 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.

SituationTool
Same edit across 2+ filesbatch_replace
JSON/YAML/TOML value editdoc_set / execute_plan
Markdown section by headingmd_replace_section
Coordinated multi-file editsexecute_plan
Single small plain-text editnative 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]

  1. Never use a legacy tool when a modern replacement exists.
  2. Never omit the rtk prefix when RTK is available.
  3. Never bypass Patchloom for a structured/multi-file edit when Patchloom is available.
  4. Never use a non-MCP alternative when an MCP tool fits.
  5. ruplacer dry-run first; review stdout before any --go.
  6. Run ruff check and ruff format after any Python file change.
  7. 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]

TopicReference
RTK inventoryreferences/rtk.md
Patchloom trapsreferences/patchloom.md
File searchreferences/fd-find.md
Text searchreferences/ripgrep.md
Bulk replacereferences/ruplacer.md
Python lint/formatreferences/ruff.md
uv safe commandsreferences/uv.md
Directory listingreferences/lsd.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.