Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

sniff-patterns

/sniff-patterns

Uruchamia katalog reguł sniff-patterns na repozytorium i zwraca tabelę wyników z regułą, wagą i lokalizacją.

Repozytorium
sniff ↗
Licencja
MIT
Ostatnia zmiana repozytorium
06.08.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 06.08.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

Uruchamia katalog reguł sniff-patterns na repozytorium i zwraca tabelę wyników z regułą, wagą i lokalizacją.

Wyzwalacze z opisu

lint the codebasefind code smellsrun the smell checksscan for anti-patternssonar-style scan
Oryginalny opis (EN)

Run the sniff-patterns code-smell rule catalog over a repo in one pass and return a compact findings table. Use when the user wants to "lint the codebase", "find code smells", "run the smell checks", "scan for anti-patterns", "sonar-style scan", or check many small rules at once (e.g. explicit any, nested ternaries, empty Angular metadata). Returns a RULE / SEVERITY / LOCATION summary, never raw per-match output.

Jak działa

  1. Relaying the result
  2. Usage
  3. Adding rules
  4. Caveats
Sekcje z nagłówków SKILL.md, w oryginale · 52 linii, 402 słów
Podgląd SKILL.md
---
name: sniff-patterns
description: >-
  Run the sniff-patterns code-smell rule catalog over a repo in one pass and return a
  compact findings table. Use when the user wants to "lint the codebase", "find
  code smells", "run the smell checks", "scan for anti-patterns", "sonar-style
  scan", or check many small rules at once (e.g. explicit any, nested ternaries,
  empty Angular metadata). Returns a RULE / SEVERITY / LOCATION summary,
  never raw per-match output.
---

# sniff-patterns

Run the whole rule catalog (`rules/*.yml`) in a single `ast-grep scan` and report a
small findings table. Adding rules costs nothing here: they are inert data files,
loaded only when this skill runs, so the catalog can grow to hundreds of rules
without bloating context.

## Relaying the result

**Reproduce the entire output (header line + every per-rule table) in your reply
message, verbatim.** It IS the answer. The script emits one markdown table per rule
(heading = rule/severity/count, rows = locations); tables only render as real tables
when they live in your reply, NOT when left inside the tool-output block. Do NOT
summarize to prose or drop rows. You may add ONE takeaway line at the end (e.g. the
worst rule), but the full output comes first and in full.

A "Clean: 0 findings. Ran N rules (...)" line is a **valid, complete result**: the
codebase passed every rule. Relay it as-is. Do NOT speculate that the plugin "has no
rules" or is "new/empty", the line already names the rules that ran; trust it.

## Usage

Run the detector through the installed sniff CLI:

1. If `sniff version` fails: `uv tool install sniff-smells` (and `uv tool install ast-grep-cli` if `ast-grep` is missing).
2. Run: `sniff --only sniff-patterns DIR [--severity error|warning|info|hint]
   [--rule ID] [--top-locs N]`, or `sniff --list-patterns` to see the catalog.
3. Report the findings; do not paste raw rule files.

`DIR` defaults to the current directory. Filter with `--severity` or a single
`--rule`. Vendored/build dirs are always skipped.

Rules print worst severity first (error, warning, info, hint). Each heading carries
the rule's full hit count, but only its first 10 locations are listed; the rest
collapse into a `+N more` row. Use `--top-locs 0` to list every location of every
rule, or `--top-locs N --rule <id>` to expand one rule.

## Adding rules

Use `sniff-create` (rule mode) to add a rule, or drop a standard ast-grep rule file
into `rules/`. Each rule file needs `id`, `language`, `severity`, `message`, `rule`.
Prerequisites: `ast-grep` installed (`pip install ast-grep-cli`), Python 3.

## Caveats

- Each rule is single-language and single-file (ast-grep). Cross-file smells
  (e.g. inheritance depth) are out of scope, see the cross-file engine.
- Pattern matches flag a *shape*, not a proven defect. The `message` says why it is
  worth a look; the `LOCATION` column is authoritative.
- Test files are NOT excluded: a lint finding in a test still counts.

Wersje

W bazie nie ma innych skilli o nazwie sniff-patterns.

Migawka bazy z 28.10.2026 · wersja paczki 132bcdfd3068 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100sniff
    Uruchamia wszystkie detektory zapachów kodu w repozytorium i zwraca jedną zwartą sekcję na każdy detektor.
  • 100sniff-create
    Tworzy nową regułę wykrywania zapachów kodu lub metrykę z krótkiej rozmowy, z walidacją na repozytorium.
  • 100sniff-review
    Otwiera niezależny przegląd kodu obok Hunk w Herdr, z interaktywnym recenzentem i objaśnieniami uwag.
  • 85smell-check
    Przeprowadza audyt zapachów kodu na wskazanych ścieżkach: metryki struktury, zapachy w kodzie i testach oraz siłę dowodów.
  • 90smell
    Uruchamia recenzenta zapachów kodu na pliku, katalogu lub bieżących zmianach, szukając klas-bogów i martwego kodu.
  • 95smell
    Wykrywa w kodzie złe wzorce architektury, punkty o wysokiej złożoności algorytmicznej i antywzorce, a wynik zapisuje w szczegółowym raporcie markdown.

Uwagi i zgłoszenia

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