opencode-nju-cli 1.3.6 → 1.3.8
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 +15 -4
- package/bin/linux-aarch64/nju-cli +0 -0
- package/bin/linux-x86_64/nju-cli +0 -0
- package/bin/macos-aarch64/nju-cli +0 -0
- package/bin/windows-x86_64/nju-cli.exe +0 -0
- package/package.json +1 -1
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NJU CLI OpenCode Plugin
|
|
2
2
|
|
|
3
|
-
This package provides an OpenCode plugin for `nju-cli`,
|
|
3
|
+
This package provides an OpenCode plugin for `nju-cli`, with bundled OpenCode-compatible skill docs for Nanjing University workflows.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -15,12 +15,14 @@ Add the npm plugin to `opencode.json`:
|
|
|
15
15
|
|
|
16
16
|
OpenCode installs npm plugins automatically at startup with Bun.
|
|
17
17
|
|
|
18
|
+
That is the full install path. Users do not need to copy skill files manually.
|
|
19
|
+
|
|
18
20
|
## Tools
|
|
19
21
|
|
|
20
22
|
The plugin exposes two tools:
|
|
21
23
|
|
|
22
24
|
- `nju_cli`: runs the bundled `nju-cli` binary.
|
|
23
|
-
- `nju_cli_docs`: reads bundled skill guidance before choosing a subcommand.
|
|
25
|
+
- `nju_cli_docs`: reads the bundled skill guidance before choosing a subcommand.
|
|
24
26
|
|
|
25
27
|
Example prompt:
|
|
26
28
|
|
|
@@ -30,9 +32,18 @@ Example prompt:
|
|
|
30
32
|
|
|
31
33
|
## Optional Native OpenCode Skill
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
The npm package already contains `skills/nju-cli/SKILL.md`, and the plugin exposes it through `nju_cli_docs`.
|
|
36
|
+
|
|
37
|
+
OpenCode's native `skill` tool only discovers skills from configured skill directories:
|
|
38
|
+
|
|
39
|
+
- `.opencode/skills/<name>/SKILL.md`
|
|
40
|
+
- `~/.config/opencode/skills/<name>/SKILL.md`
|
|
41
|
+
- `.claude/skills/<name>/SKILL.md`
|
|
42
|
+
- `~/.claude/skills/<name>/SKILL.md`
|
|
43
|
+
- `.agents/skills/<name>/SKILL.md`
|
|
44
|
+
- `~/.agents/skills/<name>/SKILL.md`
|
|
34
45
|
|
|
35
|
-
|
|
46
|
+
Only copy `skills/nju-cli` if you specifically want `nju-cli` to appear in that native `skill` tool list:
|
|
36
47
|
|
|
37
48
|
```bash
|
|
38
49
|
mkdir -p ~/.config/opencode/skills
|
|
Binary file
|
package/bin/linux-x86_64/nju-cli
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export const NjuCliPlugin = async ({ directory }) => {
|
|
|
68
68
|
tool: {
|
|
69
69
|
nju_cli: tool({
|
|
70
70
|
description:
|
|
71
|
-
"Run the bundled nju-cli binary for Nanjing University services.
|
|
71
|
+
"Run the bundled nju-cli binary for Nanjing University services: academic affairs notices/calendar, ehall grades/course schedule/training program/courses, exchange-system news/projects, and youth-league notices. For unfamiliar NJU workflows, call nju_cli_docs first to read the bundled skill guidance, then pass command-line arguments as an array, for example [\"academic-affairs\", \"notices\", \"--help\"].",
|
|
72
72
|
args: {
|
|
73
73
|
args: tool.schema.array(tool.schema.string()).describe("Arguments to pass to nju-cli."),
|
|
74
74
|
cwd: tool.schema.string().optional().describe("Working directory. Defaults to the current OpenCode project directory."),
|
|
@@ -79,7 +79,7 @@ export const NjuCliPlugin = async ({ directory }) => {
|
|
|
79
79
|
}),
|
|
80
80
|
nju_cli_docs: tool({
|
|
81
81
|
description:
|
|
82
|
-
"Read bundled nju-cli skill
|
|
82
|
+
"Read the bundled nju-cli skill docs included in this OpenCode npm plugin. Use this before choosing nju-cli subcommands for Nanjing University academic affairs, ehall grades/course schedule/training program/courses, exchange-system news/projects, and youth-league workflows.",
|
|
83
83
|
args: {
|
|
84
84
|
topic: tool.schema
|
|
85
85
|
.string()
|