Przejdź do treści
Biblioteka skilli
DevOps i chmura · Automatyzacja

usage

/usage

Włącza, sprawdza lub wyłącza zbieracz danych o użyciu Astillero w repozytoriach, odświeża nieaktualny hook.

Repozytorium
astillero ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
10.11.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
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.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

Włącza, sprawdza lub wyłącza zbieracz danych o użyciu Astillero w repozytoriach, odświeża nieaktualny hook.

Oryginalny opis (EN)

Enable, check or disable the Astillero usage collector on onboarded repositories. `/astillero:usage [status|enable|disable]`. Use when you want to install the hook on a new repo, check which repos are reporting, refresh an outdated hook, or remove the collector cleanly.

Jak działa

  1. Status
  2. Questions
  3. Enable
  4. Disable
  5. Safety
Sekcje z nagłówków SKILL.md, w oryginale · 130 linii, 768 słów
Podgląd SKILL.md
---
name: usage
description: Enable, check or disable the Astillero usage collector on onboarded repositories. `/astillero:usage [status|enable|disable]`. Use when you want to install the hook on a new repo, check which repos are reporting, refresh an outdated hook, or remove the collector cleanly.
---

# usage — manage the Astillero usage collector

Install, refresh, check or remove the usage-collector hook that feeds the
board's Consumo tab. This skill owns the procedure; `pipeline-setup` and
`upgrade` refer here instead of repeating it.

## Status

*Default when no argument is given.*

For every repository in `~/.astillero/config.json`:

1. Check whether `.claude/hooks/usage-collector.mjs` is on the base branch
   (`gh api repos/<slug>/contents/.claude/hooks/usage-collector.mjs`).
2. If present, read its `HOOK_VERSION` constant (first line that exports it)
   and compare with the version in
   `${CLAUDE_PLUGIN_ROOT}/templates/repo/hooks/usage-collector.mjs`.
3. Check `usage.source.url` in `~/.astillero/config.json`.
4. Report whether the Consumo tab is therefore active (hook present + settings
   entry present + `usage.source.url` set).

Output one line per repo: hook absent / present (version, current or stale) /
hook version, board source URL if set, Consumo active or inactive. Read-only;
no changes made.

## Questions

*Asked once, not per repository, before Enable or any refresh that needs them.*

1. **Base URL** — the endpoint that receives usage records. Must be `https://…`;
   `http://localhost` is accepted only for local development.
2. **Mechanism** — how the hook authenticates:
   - **API credential through the agent proxy** (Pro/Max accounts): the hook
     runs with `NODE_USE_ENV_PROXY=1`; the credential for the receiver's host
     lives in the environment's API credentials.
   - **`--key-env NAME`** (Team/Enterprise or self-hosted): the credential is
     an environment variable injected into the session; the host must be in
     the network allowlist.
3. **Read key for the board** — the key the board uses to read usage records;
   obtain it from your receiver's setup guide.

Skip these questions when the `usage` block in `~/.astillero/config.json`
already has `source.url` and the operator confirms it is correct.

## Enable

1. List the configured repositories (from `~/.astillero/config.json`). Let the
   operator pick: all, some or one.
2. Ask the Questions section above (once, not per repo) unless already answered.
3. Confirm before opening any pull request. Every pull request targets the
   repository's `base` branch from `~/.astillero/config.json` — the branch the
   routines check out — never the default branch when the two differ.
4. For each chosen repository:
   - **Hook absent** → one pull request titled
     `chore: add Astillero usage collector hook` with two files:
     - `.claude/hooks/usage-collector.mjs` — copied verbatim from
       `${CLAUDE_PLUGIN_ROOT}/templates/repo/hooks/usage-collector.mjs`.
     - `.claude/settings.json` — generated with:
       ```
       node "$CLAUDE_PLUGIN_ROOT/scripts/usage-hook.mjs" settings \
         --url <url> \
         --repo <owner/repo> \
         [--key-env <keyEnv>] \
         [--existing <path to current .claude/settings.json or ->]
       ```
       If the repo already has `.claude/settings.json`, pass it as
       `--existing`; otherwise omit the flag (or pass `-` with empty stdin).
       The result preserves all existing hooks and permissions.
   - **Hook present with older `HOOK_VERSION`** → one pull request titled
     `chore: refresh Astillero usage collector hook`: replace
     `.claude/hooks/usage-collector.mjs` verbatim; leave
     `.claude/settings.json` and the config block untouched.
   - **Hook already at current version** → no pull request; report as current.
5. **Config block** — write the `usage` block in `~/.astillero/config.json`:
   ```json
   {
     "usage": {
       "source": {
         "url": "<url>",
         "readKey": "<read key>"
       }
     }
   }
   ```
   Idempotency rule:
   - Same URL already present → leave it as-is.
   - Different URL already present → ask before replacing.
6. **Manual steps by mechanism** (report; never automate):
   - **API credential (one step):** add the credential for the receiver's host
     in the environment's API credentials (Settings → Environments → your
     environment → API credentials → Add).
   - **`--key-env` (two steps):**
     1. Define the variable `<keyEnv>` in the environment (Settings →
        Environments → your environment → Environment variables).
     2. Add the receiver's hostname to the network allowlist (Settings →
        Environments → your environment → Network access → Add allowed host).
7. Report each pull request opened (title + URL) and remind the operator to
   restart the board with `/astillero:board` after merging — the Consumo tab
   appears on the next start.

## Disable

1. List repositories that have the collector hook (from Status). Let the
   operator pick: all, some or one.
2. Confirm before opening any pull request.
3. For each chosen repository, one pull request titled
   `chore: remove Astillero usage collector hook`:
   - Delete `.claude/hooks/usage-collector.mjs`.
   - Rewrite `.claude/settings.json` through:
     ```
     node "$CLAUDE_PLUGIN_ROOT/scripts/usage-hook.mjs" remove \
       --existing .claude/settings.json
     ```
     Other hooks in the file are kept. When the output is empty (nothing
     remains), remove `.claude/settings.json` entirely.
4. Ask whether to drop the `usage` block from `~/.astillero/config.json`.
   Dropping it makes the Consumo tab disappear on the next board restart; the
   receiver's records are not touched.
5. Remind the operator that the credential or environment variable is theirs
   to delete from the environment settings.
6. Report each pull request opened and remind to restart the board.

## Safety

- Confirm before opening any pull request.
- Never commit directly to the base branch.
- Never modify cloud routines or webhooks.
- Never add a dependency.

Wersje

RepozytoriumWynikLicencja
Ta strona · astillero-ai/astillero100Apache-2.0
Canner/WrenAI100Apache-2.0
stxrmik/antigravity-plus100MIT
crisandrews/clawcode100MIT
socialwifi/kubeyard100BSD-3-Clause
Intenzi/hermes-butler85MIT

Migawka bazy z 13.11.2026 · wersja paczki 7788b574ceb1 (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

  • 100telemetry
    Włącza, wyłącza i sprawdza status telemetrii oraz danych o użyciu power-automate.
  • 100hook
    Włącza, wyłącza i zarządza hookami Claude Code, w tym przy debugowaniu i konfiguracji.
  • 95skill-toggle
    Włącza, wyłącza i porządkuje skille Claude Code: sprawdza ich status, wypisuje listę, zarządza kolekcjami i czyści katalog skilli.
  • 100schedule-cron-jobs
    Zarządza zadaniami cron: wyświetla, dodaje, usuwa, włącza, wyłącza i uruchamia je od ręki oraz sprawdza status.
  • 90manage-lifecycle
    Zarządza potokami Azure DevOps skompilowanymi przez ado-aw: rejestruje, włącza, wyłącza i usuwa definicje, uruchamia przebiegi i raportuje status.
  • 100sc-git
    Ogranicza koszty GitHub Actions: audytuje zużycie workflowów, wyłącza hałaśliwe pliki YAML, uruchamia CI lokalnie, instaluje hook pre-push i self-hosted runner na VPS.

Uwagi i zgłoszenia

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