@rayul/kordis 0.0.1

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 ADDED
@@ -0,0 +1,53 @@
1
+ # @rayul/kordis
2
+
3
+ > The CLI binary is **`kordis`** — only the npm package name is scoped.
4
+
5
+ Public registry CLI for agentic-coding packages — skills, project rules, MCP servers, hooks, custom agents.
6
+
7
+ ## Quick start
8
+
9
+ ```bash
10
+ npx @rayul/kordis@latest setup # one-time: register kordis with Claude Code / Codex / Gemini CLI
11
+ npx @rayul/kordis@latest search sql # find a skill
12
+ npx @rayul/kordis@latest read rayul/sql-reviewer # JIT-load into your agent context
13
+ ```
14
+
15
+ Or install globally:
16
+
17
+ ```bash
18
+ npm install -g @rayul/kordis
19
+ kordis setup
20
+ ```
21
+
22
+ `kordis setup` injects a guide block into your agent tools' global instruction files (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`) so the agent recognises `kordis` automatically in future sessions. The injection is idempotent — safe to re-run.
23
+
24
+ ## Commands
25
+
26
+ | command | purpose |
27
+ |---|---|
28
+ | `kordis search <query>` | search the registry |
29
+ | `kordis info <slug>` | inspect a package |
30
+ | `kordis read <slug>` | JIT-fetch body into agent context (skill / project-rules / custom-agent only) |
31
+ | `kordis pull <slug>` | install into the current project (mcp-server / hook) |
32
+ | `kordis push <file>` | publish a new package or version |
33
+ | `kordis login` / `logout` / `whoami` | identity |
34
+ | `kordis setup` | inject usage guide into Claude Code / Codex / Gemini CLI globals |
35
+
36
+ Pass `--json` on any command to get machine-readable output.
37
+
38
+ ## Configuration
39
+
40
+ | env var | purpose | default |
41
+ |---|---|---|
42
+ | `KORDIS_API_URL` | registry endpoint | `https://api.kordis.dev` |
43
+ | `KORDIS_HOME` | config + token fallback dir | `~/.kordis` |
44
+
45
+ Refresh and access tokens are stored in the OS keychain via `keytar` (with a file-based fallback at `~/.kordis/.tokens.json`, mode `0600`, when keytar is unavailable).
46
+
47
+ ## Docs
48
+
49
+ The agent guide that `setup` injects is also shipped as `assets/KORDIS.md` in this package.
50
+
51
+ ## License
52
+
53
+ MIT
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: kordis
3
+ description: Use Kordis to discover, install, and publish agentic-coding packages (skills, project rules, MCP servers, custom agents, hooks). Invoke whenever the user says "find a skill for X", "install Y", "publish this as a skill", "share this prompt", or mentions a `{username}/{slug}` package identifier.
4
+ version: 0.0.1
5
+ ---
6
+
7
+ # Kordis Skill
8
+
9
+ Kordis is the public registry for agentic-coding packages. You install and publish by shelling out to the `kordis` CLI — never by editing tool-specific files (CLAUDE.md, `.cursorrules`, `.mcp.json`, etc.) manually.
10
+
11
+ ## When to invoke
12
+
13
+ - User asks to find / try / install a skill, rule, agent, MCP server, or hook.
14
+ - User references a `{username}/{slug}` identifier.
15
+ - User says "publish this", "share this to Kordis", "push this rule".
16
+ - User asks what packages they have installed or what's trending.
17
+
18
+ ## Primary verbs
19
+
20
+ | verb | purpose | sub-skill |
21
+ |------|---------|-----------|
22
+ | `kordis search <query>` | find packages | `SEARCH` |
23
+ | `kordis info <full_slug>` | inspect a package | `READ` |
24
+ | `kordis read <full_slug>` | **JIT** — fetch body into your context, no install | `READ` |
25
+ | `kordis pull <full_slug>` | install into the current project | `READ` |
26
+ | `kordis push <file>` | publish a new package or version | `WRITE` |
27
+ | `kordis whoami` / `login` / `logout` | identity + session | `SOCIAL` |
28
+
29
+ Always pass `--json` when you need the response programmatically. Human output is for the user; agent parsing lives behind `--json`.
30
+
31
+ ## JIT read vs install — choose deliberately
32
+
33
+ Two ways to use a package's guidance. Pick the one that matches the user's intent, not your own convenience.
34
+
35
+ | Mode | Use when | Effect |
36
+ |------|----------|--------|
37
+ | `kordis read <slug>` | **One-shot sub-task.** You'll consult the skill once for the current task and move on. The user said "do X for me", "handle this file", "explain how Y works." | Body returned to your context (stdout). Nothing written to disk. |
38
+ | `kordis pull <slug>` | **Long-term adoption.** The user said "install Y", "make this project use Z", "set up A for ongoing work." The skill should keep working in future sessions. | Files written into the project's tool-specific path. |
39
+
40
+ **Default to `read`** when you spontaneously realize a Kordis skill exists for the task at hand. **Default to `pull`** when the user explicitly asks to adopt a package.
41
+
42
+ Restrictions on `read`:
43
+ - Eligible types: `skill`, `project-rules`, `custom-agent` (text-bearing).
44
+ - Ineligible: `mcp-server`, `hook`. The CLI errors with `jit_blocked` (exit 33, flag `type_ineligible`) — fall back to `kordis pull`.
45
+ - Trust gate: only `review_status=passed` versions are returned by default. For `pending_review`, re-run with `--allow-pending` only after telling the user the skill has not been AI-reviewed yet.
46
+
47
+ Pin a version when reproducibility matters: `kordis read foo/bar@1.2.0`. A bare slug fetches the latest passed version; the response always includes the resolved version so you can record it.
48
+
49
+ ## Attribution
50
+
51
+ The `read` response includes an `attribution` string (e.g. `"following rayul/hwp-reader@0.3.1"`). Including it in your reply to the user is **recommended**:
52
+ - It lets the user verify which guidance you followed.
53
+ - It's how creators see their work being used.
54
+ - It supports reproducibility (the user can repeat the workflow with the same version).
55
+
56
+ Skip it only if it would clutter a non-technical answer (e.g. the user asked a casual question and a one-line credit at the end is enough). When in doubt, include it.
57
+
58
+ ## Identity
59
+
60
+ `full_slug` is always `{username}/{slug}`. Usernames are immutable; slugs are lowercase-with-hyphens. Versions are semver.
61
+
62
+ ## Sub-skills
63
+
64
+ - `kordis read rayul/kordis-search` — searching / browsing / trending / rising
65
+ - `kordis read rayul/kordis-read` — info / content / pull / dependency handling
66
+ - `kordis read rayul/kordis-write` — authoring + publishing + updating
67
+ - `kordis read rayul/kordis-social` — comments, stars, notifications, mod actions
68
+
69
+ Load the sub-skill that matches the user's intent rather than repeating the detail here.
70
+
71
+ ## Error handling
72
+
73
+ The CLI's `--json` mode emits `{ error: { code, message, flags?, request_id? } }` on failure. Key codes:
74
+
75
+ | code | action |
76
+ |------|--------|
77
+ | `not_authenticated` (exit 10) | run `kordis login`, then retry |
78
+ | `validation_failed` (30) | fix the flags listed and retry |
79
+ | `ai_review_rejected` (32) | explain to the user; do not auto-retry |
80
+ | `conflict` (40) | slug taken → suggest a new name |
81
+ | `rate_limited` (31) | wait `retry_after_seconds` |
82
+ | `network_unreachable` (20) | retry with backoff |
83
+
84
+ ## Agent skills compliance
85
+
86
+ The skill files Kordis ships respect the Agent Skills open spec verbatim — no Kordis-specific extensions leak into your `SKILL.md`. Kordis-internal metadata lives on the registry entry, not in the skill file. Install `kordis/agent-skills` for the canonical workflow if the user is authoring their own skills.
package/bin/kordis.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js';