@sanity-labs/oclif-plugin-skills-flag 0.2.1 → 0.3.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.
- package/README.md +19 -19
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -57,13 +57,13 @@ behavior:
|
|
|
57
57
|
}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
| Option
|
|
61
|
-
|
|
|
62
|
-
| `flag`
|
|
63
|
-
| `aliases`
|
|
64
|
-
| `directory`
|
|
65
|
-
| `fallThroughOnMissingSkill` | boolean
|
|
66
|
-
| `missingSkillMessage`
|
|
60
|
+
| Option | Type | Default | Description |
|
|
61
|
+
| --------------------------- | -------- | ---------------------------------------------------- | ------------------------------------------------------------ |
|
|
62
|
+
| `flag` | string | `"llms"` | Main flag name, without leading dashes |
|
|
63
|
+
| `aliases` | string[] | `["skill"]` | Additional names; one-character aliases use a single dash |
|
|
64
|
+
| `directory` | string | `"skills"` | Skills directory relative to the CLI package root |
|
|
65
|
+
| `fallThroughOnMissingSkill` | boolean | `false` | Let oclif continue processing when the skill file is missing |
|
|
66
|
+
| `missingSkillMessage` | string | Command-specific message with the expected file path | Error shown when the skill file is missing |
|
|
67
67
|
|
|
68
68
|
Configuration belongs to the CLI package that owns the command. If one oclif CLI is installed as a
|
|
69
69
|
plugin in another, each CLI can use different flag names and directories for its own commands.
|
|
@@ -83,14 +83,14 @@ To advertise the default `--llms` flag, add the exported definition to the CLI's
|
|
|
83
83
|
command and set `hidden` to `false`:
|
|
84
84
|
|
|
85
85
|
```ts
|
|
86
|
-
import {Command, Flags} from
|
|
87
|
-
import {llmsFlagConfig} from
|
|
86
|
+
import { Command, Flags } from "@oclif/core";
|
|
87
|
+
import { llmsFlagConfig } from "@sanity-labs/oclif-plugin-skills-flag";
|
|
88
88
|
|
|
89
89
|
export abstract class BaseCommand extends Command {
|
|
90
90
|
static baseFlags = {
|
|
91
91
|
...super.baseFlags,
|
|
92
|
-
llms: Flags.boolean({...llmsFlagConfig, hidden: false}),
|
|
93
|
-
}
|
|
92
|
+
llms: Flags.boolean({ ...llmsFlagConfig, hidden: false }),
|
|
93
|
+
};
|
|
94
94
|
}
|
|
95
95
|
```
|
|
96
96
|
|
|
@@ -99,25 +99,25 @@ The plugin handles the flag, so command implementations do not need to read `fla
|
|
|
99
99
|
For custom names, create a matching definition:
|
|
100
100
|
|
|
101
101
|
```ts
|
|
102
|
-
import {Command, Flags} from
|
|
103
|
-
import {createSkillsFlagDefinition} from
|
|
102
|
+
import { Command, Flags } from "@oclif/core";
|
|
103
|
+
import { createSkillsFlagDefinition } from "@sanity-labs/oclif-plugin-skills-flag";
|
|
104
104
|
|
|
105
105
|
const skillsFlag = createSkillsFlagDefinition(
|
|
106
106
|
{
|
|
107
|
-
flag:
|
|
108
|
-
aliases: [
|
|
107
|
+
flag: "agents",
|
|
108
|
+
aliases: ["agent-help"],
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
description:
|
|
111
|
+
description: "Show instructions for coding agents",
|
|
112
112
|
hidden: false,
|
|
113
113
|
},
|
|
114
|
-
)
|
|
114
|
+
);
|
|
115
115
|
|
|
116
116
|
export abstract class BaseCommand extends Command {
|
|
117
117
|
static baseFlags = {
|
|
118
118
|
...super.baseFlags,
|
|
119
119
|
[skillsFlag.name]: Flags.boolean(skillsFlag.definition),
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
121
|
}
|
|
122
122
|
```
|
|
123
123
|
|
|
@@ -127,7 +127,7 @@ plugin behavior.
|
|
|
127
127
|
|
|
128
128
|
## Limitations
|
|
129
129
|
|
|
130
|
-
- The plugin targets oclif
|
|
130
|
+
- The plugin targets oclif v5.
|
|
131
131
|
- When a matching skill exists, configured flag names take precedence over same-named host flags.
|
|
132
132
|
- When a matching skill exists, the init hook writes it and exits immediately. Later oclif
|
|
133
133
|
lifecycle hooks do not run.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity-labs/oclif-plugin-skills-flag",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Expose per-command Markdown to coding agents through an oclif flag",
|
|
5
5
|
"author": "Sanity",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"node": ">=22"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@oclif/core": "^
|
|
33
|
+
"@oclif/core": "^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@biomejs/biome": "2.5.
|
|
37
|
-
"@oclif/core": "^
|
|
38
|
-
"@types/node": "^22.
|
|
36
|
+
"@biomejs/biome": "2.5.14",
|
|
37
|
+
"@oclif/core": "^5.0.0",
|
|
38
|
+
"@types/node": "^22.20.3",
|
|
39
39
|
"typescript": "^7.0.2"
|
|
40
40
|
},
|
|
41
41
|
"oclif": {
|