Przejdź do treści
Biblioteka skilli
AI i agenci · Automatyzacja

artifact-path

/artifact-path

Wyznacza unikalną, bezkolizyjną ścieżkę dla artefaktów zapisywanych w katalogu .lets/, takich jak plany, przeglądy i raporty agentów, na wywołanie z poleceń.

Repozytorium
lets-workflow ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.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 27.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

Wyznacza unikalną, bezkolizyjną ścieżkę dla artefaktów zapisywanych w katalogu .lets/, takich jak plany, przeglądy i raporty agentów, na wywołanie z poleceń.

Oryginalny opis (EN)

Internal skill for commands. Resolve a unique, task-scoped, collision-safe path for an artifact written under .lets/ (plans, reviews, session snapshots, hand-off briefs, per-run agent report directories). Do not trigger on user conversation - only when a command is about to write an artifact.

Jak działa

  1. Name shape
  2. Step 1: Resolve the task id
  3. Step 2: Compute the path
  4. Return
  5. Rules
Sekcje z nagłówków SKILL.md, w oryginale · 76 linii, 558 słów
Podgląd SKILL.md
---
name: artifact-path
description: Internal skill for commands. Resolve a unique, task-scoped, collision-safe path for an artifact written under .lets/ (plans, reviews, session snapshots, hand-off briefs, per-run agent report directories). Do not trigger on user conversation - only when a command is about to write an artifact.
user-invocable: false
---

# Artifact Path

`.lets/` is ONE directory shared by every worktree of the repo (whole-dir symlink). Two sessions writing the same artifact kind on the same day used to overwrite each other (lets-05c4s - a plan review was lost). This skill is the single place that names an artifact and guarantees the path is free.

**Contract:** args `kind=<kind> ext=<md|json|dir> [task=<task-id>]`. Output: ONE echoed line `ARTIFACT_FILE=<absolute path>`. The caller writes to that path VERBATIM - never recomputes the stamp, never strips the `-vN` suffix, never writes anywhere else. `ext=dir` CREATES the directory (the `mkdir` is the claim) and echoes its path; a file kind only names a free path.

## Name shape

`{YYYY-MM-DD}-{HHMM}-{ID}-{KIND}[-vN].{EXT}` under the kind's directory:

| kind | directory |
|------|-----------|
| `plan` | `.lets/plans/` |
| `idea` | `.lets/plans/` |
| `review-local`, `review-branch`, `review-pr-<n>`, `review-plan` | `.lets/reviews/` |
| `snapshot` | `.lets/sessions/` |
| `handoff` | `.lets/handoffs/` |
| `reports-<command>` (with `ext=dir`) | `.lets/reports/` - one directory per dispatching run, filled by the `agent-report` skill |

`ID` is the task id when one is active (MANDATORY whenever a task exists - same rule as the branch named by the active tracker convention). With no task: `{branch-slug}-{6hex}`, 6hex = first 6 chars of `$CLAUDE_CODE_SESSION_ID`, so two taskless sessions on `main` still get distinct names. `-vN` (v2, v3, ...) is appended whenever the path already exists - for task and taskless alike.

## Step 1: Resolve the task id

If the caller passed `task=`, use it. Otherwise invoke `Skill(skill: "lets:detect-task", args: "fallback=no")` and use its result (may be empty). `fallback=no` is mandatory: the searched fallback asks a question, and a taskless snapshot on `/lets:end` must stay silent.

## Step 2: Compute the path

```bash
LETS_PROJECT_ROOT=$(git rev-parse --show-toplevel)
KIND="{kind}"; EXT="{ext}"; TASK_ID="{task-id or empty}"
case "$KIND" in
  plan|idea) DIR=plans ;;
  review-*) DIR=reviews ;;
  snapshot*) DIR=sessions ;;
  handoff) DIR=handoffs ;;
  reports-*) DIR=reports ;;
  *) echo "artifact-path: unknown kind '$KIND'"; exit 1 ;;
esac
mkdir -p "$LETS_PROJECT_ROOT/.lets/$DIR"
STAMP=$(date +%Y-%m-%d-%H%M)
if [ -n "$TASK_ID" ]; then
  ID="$TASK_ID"
else
  HEX=$(printf '%s' "${CLAUDE_CODE_SESSION_ID:-$$}" | cut -c1-6)   # session-id prefix; PID outside Claude Code
  ID="$(git branch --show-current | tr '/' '-')-${HEX}"
fi
BASE="$LETS_PROJECT_ROOT/.lets/$DIR/${STAMP}-${ID}-${KIND}"
N=2
if [ "$EXT" = dir ]; then
  # mkdir without -p is atomic: two sessions in the same minute get two directories, never one shared
  ARTIFACT_FILE="$BASE"
  until mkdir "$ARTIFACT_FILE" 2>/dev/null; do
    [ -e "$ARTIFACT_FILE" ] || { echo "artifact-path: cannot create $ARTIFACT_FILE"; exit 1; }
    ARTIFACT_FILE="${BASE}-v${N}"; N=$((N+1))
  done
else
  ARTIFACT_FILE="${BASE}.${EXT}"
  while [ -e "$ARTIFACT_FILE" ]; do ARTIFACT_FILE="${BASE}-v${N}.${EXT}"; N=$((N+1)); done
fi
echo "ARTIFACT_FILE=$ARTIFACT_FILE"
```

## Return

Return the echoed `ARTIFACT_FILE` to the caller. If the echo is missing or `exit 1` fired, the caller MUST NOT write anything - surface the error.

## Rules

- NEVER overwrite: the loop is the guard; the caller never "fixes" a path by hand.
- `ext=dir`: the directory exists when the echo returns; the caller never creates or renames it.
- NEVER compute a second `date` in the caller - the stamp is captured here once.
- Task id in the name is mandatory when a task is active.
- No tracker calls here beyond `detect-task`.
- Go-owned state files are NOT artifacts and never come through here: `.lets/sessions/.task-*` (`lets worktree task-state`), `.lets/sessions/peers/last/*.last` (`lets peers who` / `orchestrator`; a legacy `.lets/sessions/peers/*.role` is never read or written), `.lets/cache/released-*` (`lets worktree release`), and `.lets/cache/ask-ro-mcp-empty.json` - their owner writes them.

Wersje

W bazie nie ma innych skilli o nazwie artifact-path.

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

  • 100session-snapshot
    Zapisuje migawkę sesji do odzyskania po awarii w katalogu sesji, a przy wyraźnie aktywnym zadaniu dopisuje wskaźnik do niego.
  • 100member-run
    Wewnętrzny skill poleceń, który uruchamia, instruuje, koryguje i zwalnia jednego nazwanego członka zespołu lets:*, czeka na raport rundy i wybiera członka do zadania.
  • 100reviewing-artifact-conventions
    Sprawdza pliki artefaktów, na przykład definicje skilli, względem ich własnego standardu, zamiast traktować je jak kod aplikacji.
  • 100fs-handoff
    Uruchamia komendę /fs-handoff, która kończy sesję FoundationSkills jednym artefaktem przekazania odwołującym się do wszystkich artefaktów po ścieżkach, z zanonimizowanymi sekretami w notatkach.
  • 100artifact
    Tworzy i zarządza plikiem artifact.json, który śledzi pliki wynikowe zadań, takie jak kod i dokumentacja.
  • 90artifact-use
    Publikuje, udostępnia i sprawdza wyniki agentów przez Artifact Use, czyta komentarze recenzentów i statystyki linków.

Uwagi i zgłoszenia

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