Programowanie · Budowanie i kod
shard
/shard
Dzieli plik na części, gdy użytkownik o to poprosi lub gdy plik ma ponad tysiąc linii.
Dla kogo
- Autor
- cwinvestments ↗
- Repozytorium
- memstack ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 24.10.2026
Ocena i bezpieczeństwo
100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Przestarzałość
Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.
Licencja
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Dzieli plik na części, gdy użytkownik o to poprosi lub gdy plik ma ponad tysiąc linii.
Wyzwalacze z opisu
shard thissplit file
Oryginalny opis (EN)
Use when the user says 'shard this', 'split file', or when working with files over 1000 lines.
Jak działa
- Activation
- Context Guard
- Protocol
- Inputs
- Outputs
- Example Usage
- Level History
Sekcje z nagłówków SKILL.md, w oryginale · 87 linii, 358 słów
Podgląd SKILL.md
--- name: shard description: "Use when the user says 'shard this', 'split file', or when working with files over 1000 lines." version: 1.0.0 --- # 💎 Shard: Refactoring Large File... *Split monolithic files into focused, maintainable modules.* ## Activation When this skill activates, output: `💎 Shard: Refactoring large file...` Then execute the protocol below. ## Context Guard | Context | Status | |---------|--------| | **User says "shard", "split file", or "refactor"** | ACTIVE: full protocol | | **Editing a file over 1000 lines** | ACTIVE: suggest refactor | | **User says "refactor" for logic changes (not splitting)** | DORMANT: not a shard task | | **Discussing code organization concepts** | DORMANT: do not activate | | **File is under 500 lines** | DORMANT: not worth splitting | ## Protocol 1. **Identify the target file** and count lines: ```bash wc -l <file> ``` 2. **Analyze structure:** - List all exports (functions, components, types, constants) - Identify logical groupings - Map internal dependencies (what calls what) 3. **Propose the split**: present to user BEFORE executing: - Target: 100-300 lines per new file - Group related functionality - Keep types near consumers - Shared utilities in separate file 4. **Execute the refactor:** - Create new files with proper names - Move code to appropriate files - Add import/export statements - Create index.ts barrel if needed for backwards compatibility - Update all imports throughout the project 5. **Verify build:** ```bash npm run build 2>&1 | tail -20 ``` 6. **Present result**: new file structure with line counts ## Inputs - File path to refactor - Optional: preferred split strategy or target file count ## Outputs - Multiple smaller files replacing the original - Updated imports throughout project - Build verification ## Example Usage **User:** "shard infrastructure/page.tsx: it's 1100 lines" ``` 💎 Shard: Refactoring large file... infrastructure/page.tsx (1,110 lines) → 6 files: page.tsx (~120 lines), Main page, tab switcher RailwayTab.tsx (~200 lines), Railway monitoring HetznerTab.tsx (~180 lines), Hetzner monitoring HeadroomTab.tsx (~250 lines), Headroom + setup guide types.ts (~80 lines), Shared interfaces constants.ts (~60 lines): Status configs Build check: ✓ passed ``` ## Level History - **Lv.1**: Base: File analysis and splitting with import updates. (Origin: MemStack v1.0, Feb 2026) - **Lv.2**: Enhanced: Added YAML frontmatter, context guard, propose-before-execute, activation message. (Origin: MemStack v2.0 MemoryCore merge, Feb 2026)
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · cwinvestments/memstack | 100 | MIT |
| seaworld008/commonly-used-high-value-skills | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 235a9db6cd62 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100bmad-shard-doc
Dzieli duże dokumenty Markdown na mniejsze pliki wg sekcji drugiego poziomu, by łatwiej je czytać i przetwarzać. - 100split-branch
Dzieli gałąź z N commitami na N gałęzi z jednym commitem każda, gdy użytkownik o to poprosi. - 95edge-shard-query
Odpytuje shard Qdrant tylko do odczytu w S3, GCS lub na żywym węźle: scroll, wyszukiwanie wektorowe, BM25, liczenie i fasety. - 100split-scripted-test
Dzieli długi test skryptowy na równoległe grupy dla run_unit_tests.py albo wyrównuje czas grup, żeby każda trwała podobnie długo. - 95documentdb-sharding
Doradza sharding kolekcji Azure DocumentDB: czy w ogóle dzielić, jak dobrać klucz shardu i diagnozować gorące partycje. - 100create-plan
Tworzy plik .plan.md, gdy użytkownik prosi o przygotowanie lub napisanie planu.