@cruxy/cli 0.2.0 → 0.4.0

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.
Files changed (47) hide show
  1. package/README.md +39 -1
  2. package/dist/agent/loop.js +2 -1
  3. package/dist/cli/commands/config.js +2 -3
  4. package/dist/cli/commands/index.js +5 -2
  5. package/dist/cli/commands/run.js +21 -13
  6. package/dist/cli/commands/skills.d.ts +8 -0
  7. package/dist/cli/commands/skills.js +51 -0
  8. package/dist/cli/program.js +26 -4
  9. package/dist/cli/repl.js +14 -1
  10. package/dist/config/manager.js +5 -4
  11. package/dist/constants.d.ts +13 -0
  12. package/dist/constants.js +13 -0
  13. package/dist/errors/boundary.d.ts +43 -0
  14. package/dist/errors/boundary.js +73 -0
  15. package/dist/errors/constructors.d.ts +27 -0
  16. package/dist/errors/constructors.js +246 -0
  17. package/dist/errors/format.d.ts +31 -0
  18. package/dist/errors/format.js +60 -0
  19. package/dist/errors/index.d.ts +4 -0
  20. package/dist/errors/index.js +4 -0
  21. package/dist/errors/types.d.ts +74 -0
  22. package/dist/errors/types.js +107 -0
  23. package/dist/index.js +8 -5
  24. package/dist/indexing/embedder.js +3 -3
  25. package/dist/indexing/service.js +4 -1
  26. package/dist/skills/index.d.ts +4 -0
  27. package/dist/skills/index.js +4 -0
  28. package/dist/skills/loader.d.ts +43 -0
  29. package/dist/skills/loader.js +0 -0
  30. package/dist/skills/parser.d.ts +31 -0
  31. package/dist/skills/parser.js +98 -0
  32. package/dist/skills/service.d.ts +41 -0
  33. package/dist/skills/service.js +92 -0
  34. package/dist/skills/types.d.ts +94 -0
  35. package/dist/skills/types.js +21 -0
  36. package/dist/tools/file/paths.d.ts +4 -2
  37. package/dist/tools/file/paths.js +5 -3
  38. package/dist/tools/index.d.ts +2 -0
  39. package/dist/tools/index.js +2 -0
  40. package/dist/tools/list-skills.d.ts +9 -0
  41. package/dist/tools/list-skills.js +34 -0
  42. package/dist/tools/load-skill.d.ts +21 -0
  43. package/dist/tools/load-skill.js +49 -0
  44. package/dist/tools/registry.js +4 -0
  45. package/package.json +3 -2
  46. package/skills/git-commit/SKILL.md +60 -0
  47. package/skills/using-skills/SKILL.md +62 -0
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: using-skills
3
+ description: How cruxy skills work and how to author a SKILL.md. Use when the user asks about skills or wants to create or edit one.
4
+ ---
5
+
6
+ # Skills in cruxy
7
+
8
+ A **skill** is a directory containing a `SKILL.md` — YAML frontmatter plus a
9
+ markdown instructions body — that packages reusable, task-specific know-how for
10
+ the agent. Discover skills with the `list_skills` tool and pull a skill's full
11
+ instructions with `load_skill` when a task matches its description.
12
+
13
+ ## Progressive disclosure
14
+
15
+ Only each skill's `name` and `description` are visible by default (a cheap
16
+ catalog). The full body is loaded **on demand** via `load_skill`, so a large
17
+ library of skills costs almost nothing until one is actually used. Write the
18
+ `description` so the agent can tell, from one line, _when_ to reach for the
19
+ skill.
20
+
21
+ ## Authoring a SKILL.md
22
+
23
+ Create `skills/<name>/SKILL.md`:
24
+
25
+ ```
26
+ ---
27
+ name: <name>
28
+ description: <one line — what it does and when to use it>
29
+ ---
30
+
31
+ # instructions
32
+ …the body the agent reads after load_skill…
33
+ ```
34
+
35
+ Rules (all enforced, fail-loud):
36
+
37
+ - `name` is kebab-case (`^[a-z0-9][a-z0-9-]*$`) and **must equal the directory
38
+ name**.
39
+ - `description` is required and non-empty.
40
+ - Frontmatter is strict: unknown keys, missing fields, or malformed YAML are
41
+ reported in `cruxy skills --status` and the skill is excluded from the
42
+ catalog.
43
+
44
+ ## Sources and precedence
45
+
46
+ Skills are discovered from three layers; on a name collision the higher layer
47
+ wins:
48
+
49
+ 1. **project** — `<cwd>/.cruxy/skills/`
50
+ 2. **user** — `~/.cruxy/skills/`
51
+ 3. **builtin** — shipped with the CLI
52
+
53
+ Run `cruxy skills` to see the resolved catalog, or `cruxy skills --status` to see
54
+ the source directories and any validation errors.
55
+
56
+ ## Bundled assets
57
+
58
+ A skill may include `scripts/` and `reference/` subdirectories. `load_skill`
59
+ returns their paths, but **nothing is auto-executed** — the agent runs a script
60
+ through `run_command` (which goes through the normal approval gate) and reads a
61
+ reference through `read_file`. Skills are data, not a privileged execution path,
62
+ and may only reference files inside their own directory.