---
name: fast-filesystem-ops
description: Expert en édition chirurgicale de fichiers volumineux pour préserver les tokens et optimiser les modifications.
title: fast-filesystem-ops
canonical_url: https://skilld.dev/gh/ki2pixel/render_signal_server/fast-filesystem-ops
last_updated: 2026-10-08T16:19:03.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ki2pixel/render_signal_server/fast-filesystem-ops`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/fast-filesystem-ops`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ki2pixel/render_signal_server/fast-filesystem-ops) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/fast-filesystem-ops`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/fast-filesystem-ops --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/fast-filesystem-ops --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Fast Filesystem Operations

> **Expertise** : Édition chirurgicale de fichiers, optimisation token, recherche efficace, manipulation précise de codebase.

## Quick Start

### Mental Model

Fast Filesystem Ops optimise chaque opération fichier pour minimiser l'usage de tokens :
- Édition ciblée avec `edit_file`
- Recherche intelligente avec `fast_search_code`
- Lecture multiple avec `fast_read_multiple_files`
- Évitement des chargements inutiles

### Workflow obligatoire

1. **Localisation** : `fast_search_code` pour trouver les cibles
2. **Lecture minimale** : `fast_read_multiple_files` uniquement des sections nécessaires
3. **Édition chirurgicale** : `edit_file` pour modifications précises
4. **Validation** : Vérification minimale des changements

### Patterns d'utilisation

#### Pour modification de fonction spécifique

```bash
# 1. Localiser la fonction
fast_search_code "function calculateTotal" --language python

# 2. Lire uniquement le fichier contenant la fonction
fast_read_multiple_files src/calculations.py --lines 45-67

# 3. Éditer chirurgicalement
edit_file src/calculations.py --start 45 --end 67 --replacement "new_function_code"
```

#### Pour refactoring multi-fichiers

```bash
# 1. Rechercher toutes les occurrences
fast_search_code "deprecated_function" --language javascript

# 2. Lire les sections pertinentes de chaque fichier
fast_read_multiple_files file1.js file2.js file3.js --context 3

# 3. Éditer chaque occurrence chirurgicalement
edit_file file1.js --line 123 --replacement "new_function_call"
edit_file file2.js --line 45 --replacement "new_function_call"
```

## Production-safe patterns

### Recherche optimisée

```bash
# Recherche ciblée avec filtres
fast_search_code "class UserController" --language python --exclude test/

# Recherche par pattern avec contexte limité
fast_search_code "TODO.*performance" --context 2

# Recherche multi-langages
fast_search_code "import.*React" --language javascript,typescript
```

### Lecture chirurgicale

```bash
# Lire uniquement les lignes nécessaires
fast_read_multiple_files large_file.py --lines 1000-1050

# Lire avec contexte minimal
fast_read_multiple_files config.json --context 1

# Lecture multi-fichiers optimisée
fast_read_multiple_files src/*.js --pattern "export.*function"
```

### Édition précise

```bash
# Édition par ligne unique
edit_file src/app.js --line 234 --replacement "newCode"

# Édition par bloc
edit_file src/app.js --start 200 --end 250 --replacement "newBlock"

# Édition avec recherche automatique
edit_file src/app.js --search "oldPattern" --replacement "newPattern"
```

## Token optimization strategies

### Éviter les chargements massifs

❌ **Incorrect** :
```bash
read_file large_project/src/entier_fichier.py  # 5000+ lignes
```

✅ **Correct** :
```bash
fast_search_code "function targetFunction" --language python
fast_read_multiple_files target_file.py --lines 100-150
edit_file target_file.py --line 125 --replacement "optimized code"
```

### Recherche avant lecture

Toujours rechercher avant de lire :
```bash
# 1. Localiser
fast_search_code "targetPattern" --language typescript

# 2. Lire uniquement les résultats
fast_read_multiple_files results... --context 2

# 3. Éditer
edit_file target_file.ts --line X --replacement "new code"
```

### Lecture multiple optimisée

```bash
# Lire plusieurs fichiers en une seule passe
fast_read_multiple_files file1.js file2.js file3.js --pattern "export.*"

# Plutôt que
read_file file1.js
read_file file2.js  
read_file file3.js
```

## Common gotchas

### Fichiers volumineux (>1000 lignes)

```bash
# ❌ Ne jamais charger entièrement
read_file massive_config.json  # 5000+ lignes

# ✅ Utiliser JSON Query pour les gros JSON
json_query_query_json massive_config.json "$.database.connection"

# ✅ Pour code, recherche ciblée
fast_search_code "database.*connection" --language python
fast_read_multiple_files config.py --lines 50-60
```

### Éditions en cascade

```bash
# Pour modifications multi-fichiers, utiliser la lecture multiple
fast_read_multiple_files file1.js file2.js file3.js --pattern "oldFunction"

# Puis éditer séquentiellement
edit_file file1.js --search "oldFunction" --replacement "newFunction"
edit_file file2.js --search "oldFunction" --replacement "newFunction"
```

### Contexte insuffisant

```bash
# Toujours inclure un peu de contexte pour éviter les erreurs
fast_read_multiple_files target.py --lines 100-120 --context 3

# Plutôt que
fast_read_multiple_files target.py --lines 100-120  # Risque d'erreur
```

## API Reference

### Commandes principales

- `fast_search_code "<pattern>"` : Recherche intelligente avec options
- `fast_read_multiple_files <files>` : Lecture optimisée multi-fichiers  
- `edit_file <file>` : Édition chirurgicale précise

### Options de recherche

- `--language <lang>` : Filtrer par langage (python, javascript, typescript, etc.)
- `--exclude <pattern>` : Exclure fichiers/dossiers
- `--context <n>` : Nombre de lignes de contexte
- `--max-results <n>` : Limiter nombre de résultats

### Options de lecture

- `--lines <start-end>` : Lignes spécifiques
- `--context <n>` : Lignes de contexte supplémentaires
- `--pattern <regex>` : Filtrer lignes par pattern

### Options d'édition

- `--line <n>` : Ligne spécifique à remplacer
- `--start <n> --end <n>` : Bloc de lignes
- `--search <pattern>` : Rechercher et remplacer
- `--replacement <code>` : Code de remplacement

## Debugging checklist

- Confirmer que la recherche retourne les bons fichiers avant lecture
- Vérifier que les lignes spécifiées existent dans les fichiers
- Tester les patterns de recherche sur petits échantillons
- Valider que les éditions ne cassent pas la syntaxe
- Contrôler l'usage token après chaque opération

## When to use this skill

- **Fichiers volumineux** : Quand les fichiers dépassent 1000 lignes
- **Modifications ciblées** : Pour changer des fonctions spécifiques
- **Refactoring** : Quand plusieurs fichiers nécessitent des changements
- **Recherche globale** : Pour trouver des patterns dans tout le codebase
- **Optimisation token** : Quand l'usage de tokens est critique
- **Édition chirurgicale** : Pour modifications précises sans effets de bord

## Integration patterns

### Avec Sequential Thinking

Utilise `sequentialthinking_tools` pour valider la logique des modifications avant édition.

### Avec Shrimp Task Manager

Utilise pour implémenter les tâches générées par Shrimp Task Manager de manière optimisée.

### Avec JSON Query

Utilise `json_query_query_json` pour les fichiers JSON volumineux avant édition.