agentleFS
frontier-ai-nextfrontier-ai-next/mgarlbot/skills/file_operations/SKILL.md

file_operations

Skill17 starsChanged 4 months agoMITView on GitHub

Create, read, write, edit, move, copy, and delete files and directories

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use shell commands for file and directory work.

    line 11
  2. Distinctive:

    Use absolute paths or paths relative to the working directory.

    line 133
  3. Very specific:

    After creating files, verify with ls -la.

    line 134
  4. Very specific:

    Use mkdir -p for nested directories.

    line 135
  5. Distinctive:

    Before deleting, confirm with the user what will be removed.

    line 136
  6. Very specific:

    Use cat for small files; head/tail for large ones.

    line 137
  7. Very specific:

    Prefer cat << 'EOF' (single-quoted EOF) to avoid accidental variable expansion.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

File operations

Use shell commands for file and directory work.

Create

Single line:

echo "content" > /path/to/file.txt

Here-doc:

cat > /path/to/file.txt << 'EOF'
Line 1
Line 2
Line 3
EOF

Empty file:

touch /path/to/file.txt

Read

Whole file:

cat /path/to/file.txt

First N lines:

head -n 10 /path/to/file.txt

Last N lines:

tail -n 10 /path/to/file.txt

Write / append

Overwrite:

echo "new content" > /path/to/file.txt

Append:

echo "more content" >> /path/to/file.txt

Directories

Create:

mkdir -p /path/to/new/directory

List:

ls -la /path/to/directory

Copy / move / delete

Copy file:

cp /source/file.txt /destination/file.txt

Copy tree:

cp -r /source/dir /destination/dir

Move or rename:

mv /old/path/file.txt /new/path/file.txt

Delete file:

rm /path/to/file.txt

Delete directory:

rm -r /path/to/directory

Find

By name:

find /search/path -name "*.txt" -maxdepth 3

By content:

grep -r "search text" /search/path --include="*.txt"

Rules

  1. Use absolute paths or paths relative to the working directory.
  2. After creating files, verify with ls -la.
  3. Use mkdir -p for nested directories.
  4. Before deleting, confirm with the user what will be removed.
  5. Use cat for small files; head/tail for large ones.
  6. Prefer cat << 'EOF' (single-quoted EOF) to avoid accidental variable expansion.

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.