@asnd/skill-creator 0.1.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/LICENSE +21 -0
- package/README.md +169 -0
- package/dist/cli/main.d.ts +4 -0
- package/dist/cli/main.js +1619 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/package-4Q4VX3O2.js +90 -0
- package/dist/cli/package-4Q4VX3O2.js.map +1 -0
- package/package.json +84 -0
- package/prompts/generate-skill.md +22 -0
- package/skills/skill-creator/SKILL.md +260 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# skill-creator
|
|
2
|
+
|
|
3
|
+
TypeScript CLI for turning MCP servers, OpenAPI specs, and GraphQL endpoints into runtime CLIs with no codegen.
|
|
4
|
+
|
|
5
|
+
Built test-first with pnpm, TypeScript, Vitest, and Zod. Runtime: Node.js 20+ ESM.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
pnpm build
|
|
12
|
+
node dist/cli/main.js --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Development:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm dev -- --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Sources
|
|
22
|
+
|
|
23
|
+
Exactly one source is required:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# OpenAPI
|
|
27
|
+
skill-creator --spec ./openapi.json --list
|
|
28
|
+
skill-creator --spec https://petstore3.swagger.io/api/v3/openapi.json --list
|
|
29
|
+
|
|
30
|
+
# MCP over Streamable HTTP or SSE
|
|
31
|
+
skill-creator --mcp https://api.example.com/mcp --list
|
|
32
|
+
|
|
33
|
+
# MCP over stdio
|
|
34
|
+
skill-creator --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" --list
|
|
35
|
+
|
|
36
|
+
# GraphQL
|
|
37
|
+
skill-creator --graphql https://beta.pokeapi.co/graphql/v1beta --list
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Useful global options
|
|
41
|
+
|
|
42
|
+
```txt
|
|
43
|
+
--auth-header K:V HTTP header; values support env:NAME and file:/path
|
|
44
|
+
--transport TYPE MCP HTTP transport: auto|streamable|sse (default: auto)
|
|
45
|
+
--include GLOBS Include command globs, comma-separated
|
|
46
|
+
--exclude GLOBS Exclude command globs, comma-separated
|
|
47
|
+
--methods METHODS OpenAPI method filter, e.g. GET,POST
|
|
48
|
+
--graphql-schema SRC GraphQL SDL or introspection JSON schema FILE|URL
|
|
49
|
+
--cache-ttl SECONDS Cache TTL for remote specs, MCP tools, GraphQL schemas
|
|
50
|
+
--refresh Bypass cache
|
|
51
|
+
--search PATTERN Search commands/tools
|
|
52
|
+
--fields FIELDS GraphQL selection override
|
|
53
|
+
--selection-depth N GraphQL default selection depth (default: 2)
|
|
54
|
+
--stdin Read GraphQL variables from stdin JSON
|
|
55
|
+
--pretty Pretty-print JSON
|
|
56
|
+
--raw Print raw response body
|
|
57
|
+
--head N Limit arrays to first N records
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Recipes
|
|
61
|
+
|
|
62
|
+
### GitHub remote MCP
|
|
63
|
+
|
|
64
|
+
GitHub's hosted MCP endpoint works with PAT-style auth headers. Prefer `env:` so tokens are not passed literally in shell history or process listings.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
export GITHUB_MCP_PAT="Bearer $(gh auth token)"
|
|
68
|
+
|
|
69
|
+
node dist/cli/main.js \
|
|
70
|
+
--mcp https://api.githubcopilot.com/mcp/x/repos/readonly \
|
|
71
|
+
--auth-header Authorization:env:GITHUB_MCP_PAT \
|
|
72
|
+
--list
|
|
73
|
+
|
|
74
|
+
node dist/cli/main.js \
|
|
75
|
+
--mcp https://api.githubcopilot.com/mcp/x/repos/readonly \
|
|
76
|
+
--auth-header Authorization:env:GITHUB_MCP_PAT \
|
|
77
|
+
get-file-contents \
|
|
78
|
+
--owner github \
|
|
79
|
+
--repo github-mcp-server \
|
|
80
|
+
--path README.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Filesystem MCP over stdio
|
|
84
|
+
|
|
85
|
+
On some current npm installs the filesystem server needs `ajv` supplied explicitly:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pnpm dev -- --mcp-stdio \
|
|
89
|
+
"npx -y -p ajv -p @modelcontextprotocol/server-filesystem mcp-server-filesystem /tmp" \
|
|
90
|
+
--list
|
|
91
|
+
|
|
92
|
+
printf 'hello from filesystem mcp\n' > /tmp/skill-creator-test.txt
|
|
93
|
+
|
|
94
|
+
pnpm dev -- --mcp-stdio \
|
|
95
|
+
"npx -y -p ajv -p @modelcontextprotocol/server-filesystem mcp-server-filesystem /tmp" \
|
|
96
|
+
read-text-file --path /private/tmp/skill-creator-test.txt
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
On macOS, `/tmp` resolves to `/private/tmp`; use the resolved path if the server reports an allowed-directory error.
|
|
100
|
+
|
|
101
|
+
### PokeAPI GraphQL
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
node dist/cli/main.js \
|
|
105
|
+
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
106
|
+
--list
|
|
107
|
+
|
|
108
|
+
node dist/cli/main.js \
|
|
109
|
+
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
110
|
+
--fields "id name" \
|
|
111
|
+
pokemon-v2-pokemon \
|
|
112
|
+
--limit 3
|
|
113
|
+
|
|
114
|
+
node dist/cli/main.js \
|
|
115
|
+
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
116
|
+
--fields "id name height weight" \
|
|
117
|
+
pokemon-v2-pokemon-by-pk \
|
|
118
|
+
--id 25
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
GraphQL variables can also come from stdin:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
echo '{"limit": 3}' | node dist/cli/main.js \
|
|
125
|
+
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
126
|
+
pokemon-v2-pokemon \
|
|
127
|
+
--stdin
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### GraphQL endpoints without introspection
|
|
131
|
+
|
|
132
|
+
By default, `--graphql` introspects the endpoint to discover commands. If introspection is disabled, provide a schema SDL file or introspection JSON file/URL:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
node dist/cli/main.js \
|
|
136
|
+
--graphql https://api.example.com/graphql \
|
|
137
|
+
--graphql-schema ./schema.graphql \
|
|
138
|
+
--list
|
|
139
|
+
|
|
140
|
+
node dist/cli/main.js \
|
|
141
|
+
--graphql https://api.example.com/graphql \
|
|
142
|
+
--graphql-schema ./introspection.json \
|
|
143
|
+
users --limit 10
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If no schema is provided and introspection fails, skill-creator tries a stale cached schema for that endpoint. If no cache exists, it fails with an actionable `--graphql-schema` message.
|
|
147
|
+
|
|
148
|
+
### Filtering command lists
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Only list read operations from an OpenAPI spec
|
|
152
|
+
skill-creator --spec ./openapi.json --methods GET --list
|
|
153
|
+
|
|
154
|
+
# Include/exclude by command name
|
|
155
|
+
skill-creator --graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
156
|
+
--include 'pokemon-v2-pokemon*' \
|
|
157
|
+
--exclude '*aggregate' \
|
|
158
|
+
--list
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Checks
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
pnpm typecheck
|
|
165
|
+
pnpm test
|
|
166
|
+
pnpm lint
|
|
167
|
+
pnpm fmt:check
|
|
168
|
+
pnpm build
|
|
169
|
+
```
|