Add OpenStock agent CLI skill
CI / test (push) Successful in 37s

This commit is contained in:
2026-06-09 17:22:59 +09:00
parent 9e4d6aecc7
commit 347c9546ed
34 changed files with 1005 additions and 0 deletions
@@ -0,0 +1,39 @@
# `openstock cache`
## Purpose
Inspect and prune local cache under `~/.config/openstock/cache`.
## Subcommands
| Command | Purpose |
| --- | --- |
| `openstock cache status` | Show cache size and namespace summary. |
| `openstock cache prune [--dry-run]` | Apply cache retention policy. |
## IO
| Direction | Data |
| --- | --- |
| File read | Cache directories. |
| File delete | Old cache files unless `--dry-run` is used. |
| External IO | none |
| Side effect | `prune` deletes files unless dry-run. |
## Output Fields
| Field | Meaning |
| --- | --- |
| `root` | Cache root path. |
| `exists` | Whether cache root exists. |
| `total_files` | Number of cache files. |
| `total_bytes` | Total cache size. |
| `namespaces` | Cache namespace summaries. |
| `dry_run` | Whether prune only reported actions. |
| `deleted_files` | Number of deleted files. |
| `deleted_bytes` | Bytes removed. |
| `reports` | Prune reports by namespace. |
## Agent Notes
Run `cache prune --dry-run` before destructive pruning unless the user clearly asks to clean cache.
@@ -0,0 +1,18 @@
# `openstock cache prune`
Purpose: apply cache retention policy.
Usage:
```bash
openstock cache prune --dry-run
openstock cache prune
```
Reads: `~/.config/openstock/cache`.
Deletes: old cache files unless `--dry-run` is set.
Output fields: `dry_run`, `deleted_files`, `deleted_bytes`, `reports`.
Agent rule: run `--dry-run` first unless the user explicitly requests cleanup.
@@ -0,0 +1,15 @@
# `openstock cache status`
Purpose: inspect local cache size and namespace summary.
Usage:
```bash
openstock cache status
```
Reads: `~/.config/openstock/cache`.
Output fields: `root`, `exists`, `total_files`, `total_bytes`, `namespaces`.
Agent rule: use before cache cleanup or when diagnosing stale local data.