@powerformer/refly-cli 0.1.16 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerformer/refly-cli",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Refly CLI - Command-line interface for Refly workflow orchestration",
5
5
  "bin": {
6
6
  "refly": "./dist/bin/refly.js"
@@ -9,6 +9,7 @@
9
9
  "types": "dist/index.d.ts",
10
10
  "scripts": {
11
11
  "build": "tsup",
12
+ "build:dev": "REFLY_BUILD_ENV=dev tsup",
12
13
  "build:test": "REFLY_BUILD_ENV=test tsup",
13
14
  "build:staging": "REFLY_BUILD_ENV=staging tsup",
14
15
  "build:prod": "REFLY_BUILD_ENV=production tsup",
package/skill/SKILL.md CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refly
3
3
  description: |
4
4
  Base skill for Refly ecosystem: creates, discovers, and runs domain-specific skills bound to workflows.
5
- Routes user intent to matching domain skills via local registry, delegates execution to Refly backend.
5
+ Routes user intent to matching domain skills via symlinks in ~/.claude/skills/, delegates execution to Refly backend.
6
6
  Use when user asks to: create skills, run workflows, automate multi-step tasks, or manage pipelines.
7
7
  Triggers: refly, skill, workflow, run skill, create skill, automation, pipeline.
8
8
  Requires: @refly/cli installed and authenticated.
@@ -33,28 +33,30 @@ Tip: Get `installationId` from `refly skill installations` after installing a sk
33
33
  ## Directory Structure
34
34
 
35
35
  ```
36
- ~/.claude/skills/refly/
37
- |-- SKILL.md # Base skill (this file)
38
- |-- registry.json # Routing registry
39
- |-- references/ # Core CLI docs
40
- | |-- workflow.md
41
- | |-- node.md
42
- | |-- file.md
43
- | `-- skill.md
44
- `-- domain-skills/ # Domain skills (one directory per skill)
45
- `-- <skill-name>/
46
- |-- skill.md # Entry file
47
- `-- ... # Additional docs
36
+ ~/.refly/skills/
37
+ ├── base/ # Base skill files (this symlink target)
38
+ │ ├── SKILL.md
39
+ │ └── rules/
40
+ │ ├── workflow.md
41
+ │ ├── node.md
42
+ │ ├── file.md
43
+ │ └── skill.md
44
+ └── <skill-name>/ # Domain skill directories
45
+ └── SKILL.md
46
+
47
+ ~/.claude/skills/
48
+ ├── refly → ~/.refly/skills/base/ # Base skill symlink
49
+ └── <skill-name> → ~/.refly/skills/<name>/ # Domain skill symlinks
48
50
  ```
49
51
 
50
52
  ## Routing
51
53
 
52
- User intent -> match domain skill (name/trigger/description) -> read domain skill `.md`
53
- -> execute via `refly skill run` -> return CLI-verified result.
54
+ User intent -> match domain skill (name/trigger) in `~/.claude/skills/`
55
+ -> read domain skill `SKILL.md` -> execute via `refly skill run` -> return CLI-verified result.
54
56
 
55
57
  ## References
56
58
 
57
- - `references/workflow.md` - Workflow command reference
58
- - `references/node.md` - Node command reference
59
- - `references/file.md` - File command reference
60
- - `references/skill.md` - Customized Skill command reference
59
+ - `rules/workflow.md` - Workflow command reference
60
+ - `rules/node.md` - Node command reference
61
+ - `rules/file.md` - File command reference
62
+ - `rules/skill.md` - Customized Skill command reference
@@ -200,70 +200,34 @@ CLI will return `skill.create.needs_workflow` with suggested options and example
200
200
  ## Directory Structure
201
201
 
202
202
  ```
203
- ~/.claude/skills/refly/
204
- |-- SKILL.md # Base skill
205
- |-- registry.json # Skill index
206
- |-- references/ # Core CLI docs
207
- | |-- workflow.md
208
- | |-- node.md
209
- | |-- file.md
210
- | `-- skill.md
211
- `-- domain-skills/ # Domain skills (one directory per skill)
212
- `-- <skill-name>/
213
- |-- skill.md # Entry file
214
- |-- REFERENCE.md # API reference (optional)
215
- `-- EXAMPLES.md # Examples (optional)
203
+ ~/.refly/skills/
204
+ ├── base/ # Base skill files (symlink target for 'refly')
205
+ │ ├── SKILL.md
206
+ │ └── rules/
207
+ │ ├── workflow.md
208
+ │ ├── node.md
209
+ │ ├── file.md
210
+ │ └── skill.md
211
+ └── <skill-name>/ # Domain skill directories
212
+ └── SKILL.md
213
+
214
+ ~/.claude/skills/
215
+ ├── refly → ~/.refly/skills/base/ # Base skill symlink
216
+ └── <skill-name> → ~/.refly/skills/<name>/ # Domain skill symlinks
216
217
  ```
217
218
 
218
- ---
219
-
220
- ## Registry Schema
219
+ ### How Symlinks Work
221
220
 
222
- ```json
223
- {
224
- "version": 1,
225
- "updatedAt": "2025-01-14T00:00:00Z",
226
- "skills": [
227
- {
228
- "name": "pdf-processing",
229
- "description": "Extract text/tables from PDF, fill forms, merge documents.",
230
- "workflowId": "c-abc123xyz",
231
- "triggers": ["pdf extract", "process pdf", "fill pdf form"],
232
- "path": "domain-skills/pdf-processing",
233
- "createdAt": "2025-01-14T00:00:00Z",
234
- "updatedAt": "2025-01-14T00:00:00Z",
235
- "source": "local",
236
- "tags": ["pdf", "document"],
237
- "author": "team-refly",
238
- "version": "1.0.0",
239
- "skillId": "skp-abc123"
240
- }
241
- ]
242
- }
243
- ```
221
+ - **Base skill**: `~/.claude/skills/refly` → `~/.refly/skills/base/`
222
+ - **Domain skills**: `~/.claude/skills/<name>` → `~/.refly/skills/<name>/`
244
223
 
245
- ### Registry Fields
246
-
247
- | Field | Type | Required | Description |
248
- |------|------|----------|-------------|
249
- | name | string | Yes | Unique skill identifier (lowercase, hyphens) |
250
- | description | string | Yes | One-line summary for matching |
251
- | workflowId | string | Yes | Bound workflow ID in Refly backend |
252
- | triggers | string[] | Yes | Phrases that trigger this skill |
253
- | path | string | Yes | Relative path to skill directory |
254
- | createdAt | string | Yes | ISO 8601 timestamp |
255
- | source | string | Yes | `local` or `refly-cloud` |
256
- | updatedAt | string | No | ISO 8601 timestamp |
257
- | tags | string[] | No | Categorization tags |
258
- | author | string | No | Skill author |
259
- | version | string | No | Semantic version |
260
- | skillId | string | No | Cloud skill ID (if available) |
224
+ Claude Code discovers skills via symlinks in `~/.claude/skills/`. Each skill is a symlink pointing to the actual skill directory in `~/.refly/skills/`.
261
225
 
262
226
  ---
263
227
 
264
228
  ## Domain Skill Template
265
229
 
266
- Location: `~/.claude/skills/refly/domain-skills/<skill-name>/skill.md`
230
+ Location: `~/.refly/skills/<skill-name>/SKILL.md` (accessed via `~/.claude/skills/<skill-name>/SKILL.md`)
267
231
 
268
232
  ````markdown
269
233
  ---
@@ -323,14 +287,14 @@ refly skill run <installationId> --input '<json>'
323
287
 
324
288
  | Type | Location | Management | Use Case |
325
289
  |------|----------|------------|----------|
326
- | Local | `~/.claude/skills/refly/domain-skills/` | `registry.json` | Fast iteration |
290
+ | Local | `~/.refly/skills/<name>/` | Symlinks | Fast iteration |
327
291
  | Cloud | Backend `SkillPackage` | API | Distribution & versioning |
328
292
 
329
293
  Integration flow:
330
- 1. Write local `skill.md` -> run `refly skill sync` -> updates `registry.json`
331
- 2. Create cloud skill -> `refly skill create` (bind workflow) -> `refly skill publish`
332
- 3. Install to run -> `refly skill install` -> `refly skill run <installationId>`
333
- 4. Cloud skills can still match locally via `source: refly-cloud`
294
+ 1. Create cloud skill -> `refly skill create` (generates workflow + local symlink)
295
+ 2. Publish skill -> `refly skill publish` -> makes skill discoverable
296
+ 3. Install to run -> `refly skill install` -> creates local SKILL.md + symlink
297
+ 4. Run skill -> `refly skill run <installationId>`
334
298
 
335
299
  ---
336
300
 
@@ -419,10 +383,11 @@ Integration flow:
419
383
  ## Skill Sync Details
420
384
 
421
385
  `refly skill sync` will:
422
- - Scan local `domain-skills/` directories
423
- - Load frontmatter from each `skill.md`
424
- - Update `registry.json` with added/updated entries
425
- - Optionally prune orphan entries with `--prune`
386
+ - Validate existing symlinks in `~/.claude/skills/`
387
+ - Check for broken symlinks (pointing to non-existent directories)
388
+ - Check for orphan directories (directories without symlinks)
389
+ - With `--fix`: recreate broken symlinks
390
+ - With `--prune`: remove broken symlinks
426
391
 
427
392
  ---
428
393
 
@@ -1,15 +0,0 @@
1
- {
2
- "version": 1,
3
- "updatedAt": "2025-01-14T00:00:00Z",
4
- "skills": [
5
- {
6
- "name": "pdf-processing",
7
- "description": "从 PDF 文件中提取文本和表格、填充表单、合并文档。在处理 PDF 文件或用户提及 PDF、表单或文档提取时使用。",
8
- "workflowId": "wf_pdf_processing_v1",
9
- "triggers": ["pdf extract", "pdf 提取", "处理 pdf", "fill pdf form"],
10
- "path": "domain-skills/pdf-processing/",
11
- "createdAt": "2025-01-14T00:00:00Z",
12
- "source": "local"
13
- }
14
- ]
15
- }