fss-link 1.9.1 → 1.9.3

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/README.md CHANGED
@@ -33,6 +33,16 @@ npm run bundle
33
33
  sudo npm install -g .
34
34
  ```
35
35
 
36
+ ### First run — bootstrap the database
37
+
38
+ The database (`~/.fss-link/fss-link.db`) is created on the **first command that needs it**, not during `npm install`. If `fss-link` fails with "Database directory not found" or "Cannot save database", run:
39
+
40
+ ```bash
41
+ fss-link --version
42
+ ```
43
+
44
+ This is the quickest way to bootstrap everything — it creates the directory, initialises the schema, and inserts default model configs. After that, `fss-link` (interactive) and `fss-link -p "..."` will work normally.
45
+
36
46
  ## Usage
37
47
 
38
48
  ```bash
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: edit-link-skill
3
+ description: >
4
+ Skills folder management guide — conventions, validation, authoring,
5
+ and the /skills slash command. Use when creating, editing, or managing
6
+ FSS Link skills.
7
+ category: reference
8
+ triggers: [skill management, skill authoring, skills folder, skill validation]
9
+ version: 1
10
+ ---
11
+
12
+ # Skills Folder — Management Guide
13
+
14
+ **Use when:** Creating, editing, or managing FSS Link skills.
15
+
16
+ ## Directory Structure (New Format)
17
+
18
+ ```
19
+ skill-name/
20
+ ├── SKILL.md ← Entry point (~100-150 lines: decision table, core commands, safety, index)
21
+ └── references/
22
+ ├── capabilities.md ← Full command catalogue, flags, options, return formats
23
+ ├── workflows.md ← Step-by-step procedures, common patterns, examples
24
+ └── troubleshooting.md ← Edge cases, known bugs, anti-patterns (if applicable)
25
+ └── scripts/ ← Scripts referenced by the skill (if any)
26
+ ```
27
+
28
+ The loader scans subdirectories for `SKILL.md` files. Flat `.md` files at the top level are **ignored** (old format, migration leftovers).
29
+
30
+ ## File Contract
31
+
32
+ ### Directory Name
33
+ - Lowercase, hyphen-separated
34
+ - The directory name **must equal** the `name` field in frontmatter
35
+ - Example: `image-draw/` → `name: image-draw`
36
+
37
+ ### SKILL.md Frontmatter (YAML, required)
38
+
39
+ ```yaml
40
+ ---
41
+ name: skill-name # required, must match directory name
42
+ description: One-line summary surfaced in the discovery list
43
+ category: tooling # required: tooling | workflow | reference | persona
44
+ triggers: [keyword, hint] # optional, string array
45
+ external_cli: fss-img-gen # optional, names the CLI this documents
46
+ version: 1 # optional, integer or semver string
47
+ ---
48
+ ```
49
+
50
+ **Only those six fields are read by the loader.** Anything else is ignored.
51
+
52
+ ### Categories
53
+
54
+ | Category | Use when | Examples |
55
+ |----------|----------|----------|
56
+ | `tooling` | External CLI or library — commands, flags, examples | `fss-parse-pdf`, `image-draw`, `chatterbox` |
57
+ | `workflow` | Repeatable multi-step procedure or methodology | `deep-context-extraction`, `covert-ops` |
58
+ | `reference` | Format, protocol, or data reference the agent looks up | `pdf-navigation-protocol`, `math-instruction` |
59
+ | `persona` | Behavioural instructions for sub-agents or role contracts | `sub-agent`, `project-structure-specialist` |
60
+
61
+ ## /skills Slash Commands
62
+
63
+ | Command | Effect |
64
+ |---------|--------|
65
+ | `/skills` or `/skills list` | Grouped listing of currently loaded skills |
66
+ | `/skills reload` | Re-scan this directory and rebuild the registry |
67
+ | `/skills show <name>` | Preview a skill locally without spending model context |
68
+ | `/skills lint` | Show the load report — rejections with reasons, collisions |
69
+
70
+ ## Adding a New Skill
71
+
72
+ 1. Create the directory: `mkdir -p skill-name/references`
73
+ 2. Write `SKILL.md` with required frontmatter. Directory name must match `name`
74
+ 3. Write `references/capabilities.md` (full command catalogue, flags, options)
75
+ 4. Write `references/workflows.md` (step-by-step procedures) — only if the skill has multi-step procedures
76
+ 5. Write `references/troubleshooting.md` (edge cases, bugs) — only if applicable
77
+ 6. Write `scripts/` files (if the skill references scripts)
78
+ 7. Run `/skills reload`, then `/skills show <name>` to verify
79
+ 8. Optionally `/skills lint` to confirm zero rejections
80
+
81
+ ## Validation Rules (Rejection Reasons)
82
+
83
+ The loader rejects any `SKILL.md` that:
84
+ - Has no YAML frontmatter block
85
+ - Has unparseable YAML
86
+ - Is missing `name`, `description`, or `category`
87
+ - Has a `category` outside the allowed set
88
+ - Has `name` that does not match the directory name
89
+ - Has `name` that collides with a built-in tool doc
90
+ - Has `triggers` that is not an array of strings
91
+ - Has `external_cli` that is not a string
92
+ - Has `version` that is neither an integer nor a string
93
+ - Is a duplicate of an already-loaded skill name (first-seen alphabetical wins)
94
+
95
+ ## Organisation Rules
96
+
97
+ - **Subdirectories only.** The loader scans `*.md` at the top level — flat files are ignored.
98
+ - **No `.md.backup` files.** They will be parsed and rejected as noise.
99
+ - **Split, don't bloat.** If an ability grows past ~500 lines, split into focused siblings.
100
+ - **Line targets:** SKILL.md ~100-150 lines, each reference file max 200 lines.
101
+
102
+ ## Pre-commit Checklist
103
+
104
+ - [ ] Directory name equals `name` in frontmatter
105
+ - [ ] `category` is one of `tooling | workflow | reference | persona`
106
+ - [ ] `description` is a single useful line
107
+ - [ ] No fictional frontmatter fields
108
+ - [ ] CLI examples are real and runnable
109
+ - [ ] No secrets in the body
110
+ - [ ] `/skills reload` followed by `/skills lint` shows no rejections
111
+
112
+ ## Global Flags
113
+
114
+ N/A — this is a workflow skill, not a CLI tool.
115
+
116
+ ---
117
+
118
+ *This skill is part of the FSS Parsers collection.*
119
+
120
+ **References:**
121
+ - Full authoring guidance → `references/capabilities.md`