Przejdź do treści
Biblioteka skilli
Programowanie · Research

search-before-building

/search-before-building

Sprawdza, co już istnieje, zanim powstanie nowy helper, abstrakcja lub zależność, gdy zadanie wygląda na rozwiązany problem.

Repozytorium
agent-powerups ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.09.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 27.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Sprawdza, co już istnieje, zanim powstanie nowy helper, abstrakcja lub zależność, gdy zadanie wygląda na rozwiązany problem.

Oryginalny opis (EN)

Use when about to add a new helper, utility, or abstraction, a task sounds like a solved problem, a new external dependency is being considered, or custom code is proposed without checking what already exists.

Jak działa

  1. When to Use
  2. Four-Step Check
  3. Decision
  4. Constraint: Do Not Skip
  5. Anti-Patterns
  6. Verification
Sekcje z nagłówków SKILL.md, w oryginale · 106 linii, 630 słów
Podgląd SKILL.md
---
name: search-before-building
description: Use when about to add a new helper, utility, or abstraction, a task sounds like a solved problem, a new external dependency is being considered, or custom code is proposed without checking what already exists.
---

# Search Before Building

Before implementing new functionality, verify it does not already exist and that the best option has been considered.

## When to Use

- About to add a new helper, utility, or abstraction
- Task says "add X" and X sounds like a solved problem
- Considering a new external dependency
- Agent proposes writing something from scratch without checking first

## Four-Step Check

Run in order. Stop when you find a satisfactory answer.

### Step 1 — Repo-first

Search the current codebase before anything else:

```bash
rg "<keyword>" src/ lib/ --type ts --type js -l
rg "<keyword>" --glob "*.py" -l
```

Check: Does equivalent logic already exist? Is it importable as-is, or would it need wrapper work?

### Step 2 — Package registry

Search the relevant registry for the project language:

| Language | Registry | Search method |
| --- | --- | --- |
| TypeScript/JS | npm | `npm search <keyword>` or npmjs.com |
| Python | PyPI | `pip index search <keyword>` or pypi.org |
| Go | pkg.go.dev | web search `site:pkg.go.dev <keyword>` |
| Rust | crates.io | `cargo search <keyword>` |

Score each candidate:

- Maintenance: last commit < 1 year, open issues ratio
- Popularity: weekly downloads or GitHub stars
- License: MIT / Apache-2.0 / BSD preferred; check for GPL/commercial constraints
- Size: avoid heavy packages for a single feature

### Step 3 — MCP / tool servers

Check whether an MCP server already provides this capability:

```bash
# List currently configured MCP servers
cat .mcp.json 2>/dev/null || cat ~/.claude/settings.json | grep -A5 '"mcpServers"'
```

Check the Agent Powerups catalog for MCP configs:

```bash
apx list --type mcp-config
```

If a server covers the need, prefer configuring it over writing code.

### Step 4 — Maintenance and license risk

Before adopting a package, verify:

- [ ] Not abandoned (last release within 18 months)
- [ ] License compatible with this project
- [ ] No known critical CVEs (`npm audit` / `pip-audit` / `cargo audit`)
- [ ] Dependency count is reasonable (< 20 transitive for small utilities)

## Decision

| Finding | Action |
| --- | --- |
| Exact match in repo | **Reuse** — import and use; refactor only if the interface is incompatible |
| Exact external match, acceptable risk | **Adopt** — install and use directly; do not wrap unless the API is hostile |
| Partial match | **Wrap** — install, write a thin adapter; keep the adapter < 50 lines |
| Multiple weak matches | **Compose** — combine 2–3 small packages; document why |
| No suitable option | **Build** — write custom code; document the gap search found |

## Constraint: Do Not Skip

This check is mandatory before:

- Writing any utility over 20 lines that solves a generic problem
- Adding a new external dependency
- Configuring a new MCP server

If time-boxed, spend at most 5 minutes on Steps 1–2 before deciding.

## Anti-Patterns

- **Repo-skip**: Writing code without checking if an internal equivalent exists
- **Registry-skip**: Adding a package without checking simpler alternatives
- **Over-wrapping**: Encapsulating a library so heavily that the benefits are lost
- **Dependency bloat**: Pulling in a 5 MB package for a single 10-line feature

## Verification

- [ ] The Step 1 repo search ran before any custom code was written
- [ ] Registry candidates were scored on maintenance, popularity, license, and size
- [ ] MCP/tool-server coverage was checked before writing new integration code
- [ ] Any adopted package passed the abandonment, license, CVE, and dependency-count checks
- [ ] The decision (reuse / adopt / wrap / compose / build) is recorded — and for build, the gap the search found is documented

Wersje

W bazie nie ma innych skilli o nazwie search-before-building.

Identyczna treść występuje jeszcze w 2 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 94882827298e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 82problem
    Zapisuje rozwiązany błąd i jego rozwiązanie w centralnej bibliotece problemów, wcześniej sprawdzając, czy taki problem już istnieje.
  • 90search-first
    Szuka istniejącego repozytorium, pakietu lub skilla, zanim powstanie nowy kod, folder czy narzędzie.
  • 90minimalism-driven
    Ogranicza kod przy pisaniu lub restrukturyzacji, zanim powstanie nowy helper, wrapper, klucz konfiguracji lub zależność, oraz gdy ktoś prosi o minimalny albo DRY kod.
  • 90search-first
    Szuka istniejących bibliotek, serwerów MCP, skilli i gotowych implementacji przed napisaniem własnego kodu lub nowej zależności.
  • 100lessons
    Przeszukuje bazę lekcji przed debugowaniem lub zadaniem i zapisuje nową lekcję, gdy problem zostanie rozwiązany.
  • 100native-first
    Sprawdza natywną drogę, zanim doda się zależność lub własny helper, i nie dopuszcza do cichych obejść.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.