Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

File Operations

ASecurity

Read, write, search, and edit files across the workspace. Enforces the

3 stars
0 votes
0 copies
0 views
Added 9/20/2026
toolspythonrustgoshell

Works with

cursorterminalcli

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add ruskicoder/system-prompts --skill file-operations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of File Operations?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for File Operations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ruskicoder-file-operations-61862e45/badge)](https://www.skillsdirectory.com/skills/ruskicoder-file-operations-61862e45)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: file-operations
description: Read, write, search, and edit files across the workspace. Enforces the
  READ-BEFORE-WRITE rule, batch file reads, atomic SEARCH/REPLACE blocks, and file
  discovery via grep and glob rather than terminal commands.
argument-hint: <file path or search pattern>
---

<!-- Generated from skills/file-operations.md by tools/generate_integrations.py. Edit the source file, not this one. -->

# Skill: File Operations

## Purpose
Read, write, search, and edit files in the filesystem with maximum efficiency and minimal token waste. _Source: Cursor (Category D)_

## Tools Required
- readFile / readMultipleFiles
- write / fsWrite
- append / fsAppend
- edit / strReplace / search_replace
- grep / grepSearch
- glob / fileSearch / glob_file_search
- delete / deleteFile
- list_dir / listDirectory

## General Principles
- Prefer batch reads (readMultipleFiles) over sequential single-file reads _Source: Amp (Category C)_
- Read entire files when practical — partial reads force extra roundtrips _Source: Cursor (Category D)_
- Search first (grep/glob) before reading when you don't know exact file location _Source: Cursor (Category H)_
- Never print file contents to user — use edit/write tools instead _Source: Qoder (Category E)_
- Never generate binary, hashes, or non-textual content _Source: Cursor (Category E)_

## Reading Files

### Single File
- Use `readFile` with known absolute path _Source: Kiro (Category D)_
- For large files (>500 lines), read in chunks with offset/limit _Source: Cursor (Category D)_
- Prefer reading a large meaningful section over many small sequential reads _Source: Amp (Category H)_

### Multiple Files
```python
# Preferred: batch related files in one call
readMultipleFiles(paths=[...])
```

### File Discovery
1. Use `glob` / `fileSearch` when you know part of the filename _Source: Cursor (Category D)_
2. Use `grep` / `grepSearch` when searching for content patterns _Source: Cursor (Category D)_
3. Use `listDirectory` for understanding structure _Source: Kiro (Category D)_
4. NEVER use shell `find`, `grep`, `cat` for file operations — use dedicated tools _Source: Kiro (Category C)_

## Writing Files

### Creating New Files
- Use `write` / `fsWrite` for new files or complete rewrites _Source: Kiro (Category D)_
- For files >50 lines, prefer write + follow-up appends _Source: Cursor (Category D)_
- Always create with complete, immediately runnable content _Source: Qoder (Category E)_
- Include all imports, dependencies, and types _Source: Aider (Category Q)_

### Appending to Existing Files
- Use `append` / `fsAppend` when adding to the end of a file _Source: Kiro (Category D)_
- File must already exist

### Editing Existing Files (SEARCH/REPLACE)
- Use `edit` / `strReplace` / `search_replace` for targeted edits _Source: Kiro (Category D)_
- CRITICAL: `oldString` / `SEARCH` block must match EXACTLY — character for character, including whitespace _Source: Aider (Category D)_
- Include 2-5 lines of surrounding context to ensure uniqueness _Source: Cline (Category D)_
- Break large edits into a series of smaller, targeted SEARCH/REPLACE blocks _Source: Cline (Category D)_
- Each block should change a focused section — don't edit half a file at once _Source: Cline (Category D)_

```python
# GOOD: precise with context
edit(
    filePath="src/app.py",
    oldString="def old_function():\n    return x + 1\n\ndef another():\n    pass",
    newString="def new_function():\n    return x * 2\n\ndef another():\n    pass"
)

# BAD: too little context (may match multiple places)
edit(
    filePath="src/app.py",
    oldString="return x + 1",
    newString="return x * 2"
)
```

### Partial Write for Large Files (Lovable pattern)
- For large files where only small sections change, use `// keep existing code` markers _Source: Lovable (Category D)_
- The unchanged code stays as a comment placeholder _Source: Lovable (Category D)_
- Only applies when the tooling supports this pattern _Source: Lovable (Category D)_

## Deleting Files
- Use `deleteFile` / `delete` with explanation _Source: Kiro (Category D)_
- Handles non-existent files gracefully _Source: Cursor (Category D)_

## Searching

### Content Search (grep)
- Use `grep` / `grepSearch` for regex pattern matching across files _Source: Cursor (Category D)_
- Rust regex syntax — escape special characters: `(`, `)`, `[`, `]`, `{`, `}`, `+`, `*`, `?`, `^`, `$`, `|`, `.`, `\` _Source: Cursor (Category D)_
- Include patterns to filter file types when possible _Source: Cursor (Category D)_
- Results capped at 50 — refine query if results fill up _Source: Cursor (Category D)_

### File Search (glob)
- Use `glob` / `fileSearch` when you know part of the filename _Source: Cursor (Category D)_
- Glob patterns like `**/*.ts`, `src/**/*.py`

## Directory Listing
- Use `listDirectory` / `list_dir` with optional depth parameter _Source: Kiro (Category D)_
- Use for understanding project structure before diving in _Source: Amp (Category H)_

## Batch Editing Rule (Windsurf pattern)
- When making multiple edits to the same file, combine ALL changes into a SINGLE edit call _Source: Windsurf (Category E)_
- This minimizes roundtrips and token overhead _Source: Amp (Category I)_
- Only split into multiple calls when edits are in completely unrelated sections _Source: Windsurf (Category E)_

## Post-Edit Verification
- After editing, check for linter errors by running lint tools _Source: Cursor (Category E)_
- If errors introduced, fix them (max 3 fix cycles per file) _Source: Cursor (Category E)_
- Verify imports are complete and correct _Source: Aider (Category Q)_

Attribution

ruskicoderruskicoder
View sourceMore from ruskicoder →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

ucoz-landing-skill

Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...

107 votes

Paperclip

Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.

798221 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes

Caveman Compress

Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"

1023330 votes
View all in tools →