Skip to content

Commit 91285bc

Browse files
authored
Merge pull request #1 from snissn/add-foc-cli-wrapper-skills
2 parents 451cd5a + 8b43b8d commit 91285bc

4 files changed

Lines changed: 169 additions & 0 deletions

File tree

skills/foc-cli/SKILL.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: foc-cli
3+
description: Use when working with Filecoin Onchain Cloud, foc-cli, Synapse SDK, storing files on Filecoin, PDP datasets, USDFC payments, wallets, deposits, uploads, providers, datasets, pieces, or decentralized cloud storage on Filecoin.
4+
---
5+
6+
# foc-cli — Filecoin Onchain Cloud CLI
7+
8+
Use the upstream `foc-cli` as the source of truth for Filecoin Onchain Cloud operations.
9+
10+
Source: https://github.com/FIL-Builders/foc-cli
11+
12+
## Operating Principle
13+
14+
This store skill is a lightweight catalog wrapper. Do not rely on hardcoded command details here. The upstream `FIL-Builders/foc-cli` repository and the published `foc-cli` package are the source of truth.
15+
16+
## Upstream Skill Location and Sync
17+
18+
If the host agent supports installing external skills, install the upstream skill from GitHub rather than copying its contents into this store skill:
19+
20+
```bash
21+
npx --yes skills add FIL-Builders/foc-cli --skill foc-cli --yes
22+
npx --yes skills add FIL-Builders/foc-cli --skill foc-docs --yes
23+
```
24+
25+
Use `--global --yes` only when a user-level install is desired. Store the installed upstream skill in the agent's normal skills directory as managed by `skills.sh` / the host agent. Do not vendor a second copy inside project repositories unless the user explicitly asks.
26+
27+
Refresh the upstream skill:
28+
29+
- at the start of a new long-running FOC task,
30+
- whenever a command appears missing or behavior differs from this wrapper,
31+
- after upstream `FIL-Builders/foc-cli` releases or documentation changes,
32+
- at least weekly for active projects.
33+
34+
Preferred refresh commands:
35+
36+
```bash
37+
npx --yes skills update foc-cli --yes
38+
npx --yes skills update foc-docs --yes
39+
```
40+
41+
For user-level installs, add `--global`; for project-level installs, add `--project` if the host agent needs an explicit scope.
42+
43+
## CLI Version and Update Cadence
44+
45+
Prefer `npx --yes foc-cli ...` so commands resolve through the current published package instead of a stale global install.
46+
47+
For active FOC work, check the CLI interface at the start of each session. If using a global install, update it at least weekly and whenever command help/schema disagrees with docs:
48+
49+
```bash
50+
npm install -g foc-cli@latest
51+
foc-cli --help
52+
```
53+
54+
## Discovery First
55+
56+
Always inspect help or schema before running an operational command:
57+
58+
```bash
59+
npx --yes foc-cli --help
60+
npx --yes foc-cli <command> -h
61+
npx --yes foc-cli <command> --schema
62+
```
63+
64+
Prefer structured output when an agent needs to parse results:
65+
66+
```bash
67+
npx --yes foc-cli <command> --json
68+
```
69+
70+
## Common Starting Points
71+
72+
```bash
73+
npx --yes foc-cli wallet init --auto
74+
npx --yes foc-cli wallet balance --json
75+
npx --yes foc-cli wallet fund
76+
npx --yes foc-cli wallet deposit <amount>
77+
npx --yes foc-cli upload <path>
78+
npx --yes foc-cli dataset list --json
79+
npx --yes foc-cli provider list --json
80+
```
81+
82+
## Documentation
83+
84+
For current Filecoin Onchain Cloud docs, use the companion `foc-docs` skill or query the CLI docs command:
85+
86+
```bash
87+
npx --yes foc-cli docs --prompt "upload files"
88+
npx --yes foc-cli docs --prompt "payments"
89+
npx --yes foc-cli docs --prompt "PDP"
90+
```
91+
92+
## Safety
93+
94+
Wallet, deposit, withdrawal, upload, dataset termination, and mainnet actions can affect funds or persisted data. Explain the intended action and get explicit user confirmation before executing state-changing commands, especially with `--chain 314` mainnet.

skills/foc-cli/skill.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"version": 1,
3+
"name": "foc-cli",
4+
"emoji": "☁️",
5+
"description": "Use Filecoin Onchain Cloud through the upstream foc-cli for decentralized storage, PDP datasets, USDFC payments, wallets, uploads, and Synapse workflows.",
6+
"category": "developer-tools",
7+
"author": "FIL-Builders"
8+
}

skills/foc-docs/SKILL.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: foc-docs
3+
description: Use when looking up current Filecoin Onchain Cloud documentation, Synapse SDK APIs, storage guides, payments, PDP concepts, Filecoin Pay, session keys, React integration, or FOC reference material.
4+
---
5+
6+
# foc-docs — Filecoin Onchain Cloud Documentation
7+
8+
Use the upstream `foc-cli docs` command as the source of truth for Filecoin Onchain Cloud documentation.
9+
10+
Source: https://github.com/FIL-Builders/foc-cli
11+
12+
## Upstream Skill Location and Sync
13+
14+
If the host agent supports installing external skills, install the upstream docs skill from GitHub:
15+
16+
```bash
17+
npx --yes skills add FIL-Builders/foc-cli --skill foc-docs --yes
18+
```
19+
20+
Use `--global --yes` only when a user-level install is desired. Store it in the agent's normal skills directory as managed by `skills.sh` / the host agent. This store skill should remain a lightweight catalog wrapper, not a copied documentation bundle.
21+
22+
Refresh the upstream docs skill:
23+
24+
- at the start of a new long-running FOC documentation or implementation task,
25+
- whenever docs output seems stale or incomplete,
26+
- after upstream `FIL-Builders/foc-cli` or Filecoin Onchain Cloud docs changes,
27+
- at least weekly for active projects.
28+
29+
Preferred refresh command:
30+
31+
```bash
32+
npx --yes skills update foc-docs --yes
33+
```
34+
35+
For user-level installs, add `--global`; for project-level installs, add `--project` if the host agent needs an explicit scope. Use `npx --yes foc-cli docs ...` for live documentation lookup so results track the current published CLI/docs integration.
36+
37+
## Search First
38+
39+
Search by prompt when you need current docs:
40+
41+
```bash
42+
npx --yes foc-cli docs --prompt "upload files"
43+
npx --yes foc-cli docs --prompt "payments"
44+
npx --yes foc-cli docs --prompt "PDP"
45+
npx --yes foc-cli docs --prompt "Synapse SDK"
46+
```
47+
48+
When a specific page is known, fetch it directly:
49+
50+
```bash
51+
npx --yes foc-cli docs --url <url>
52+
npx --yes foc-cli docs --url <url> --maxDepth 6
53+
```
54+
55+
## Agent Guidance
56+
57+
- Treat the docs command output as authoritative over this wrapper.
58+
- Use `--maxDepth 6` when API details or full examples are needed.
59+
- Use `foc-cli` for operational commands after documentation lookup.

skills/foc-docs/skill.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"version": 1,
3+
"name": "foc-docs",
4+
"emoji": "📚",
5+
"description": "Search and fetch current Filecoin Onchain Cloud documentation through the upstream foc-cli docs command.",
6+
"category": "developer-tools",
7+
"author": "FIL-Builders"
8+
}

0 commit comments

Comments
 (0)