transskill 0.3.1 → 0.4.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 CHANGED
@@ -1,316 +1,176 @@
1
1
  # TransSkill
2
2
 
3
- > **Write once, run on any agent.**
4
-
5
- TransSkill is a CLI tool that converts AI agent skill files between different platforms.
6
- Stop manually rewriting skills for every agent — convert with one command.
3
+ > **Write once, run on any agent. Search, audit, and install from 1,000+ skills.**
7
4
 
5
+ [![npm](https://img.shields.io/npm/v/transskill)](https://www.npmjs.com/package/transskill)
8
6
  [![中文文档](https://img.shields.io/badge/文档-中文-blue)](README.zh.md)
9
7
 
10
8
  ---
11
9
 
12
- ## The Problem
13
-
14
- Every AI coding agent has its own skill format.
15
- Claude Code uses SKILL.md, Cursor uses .cursorrules,
16
- OpenClaw uses AGENTS.md, and MCP servers use JSON Schema.
17
- A skill written for one platform is useless on another without manual rewriting.
18
-
19
- ## The Solution
10
+ ## What Makes TransSkill Different
20
11
 
21
- ```
22
- $ transskill convert .cursorrules --to skill.md
23
- $ transskill convert gh:user/weather-skill --to .cursorrules
24
- $ transskill convert ./my-skill/ --to .mdc --glob "**/*.ts"
25
- ```
12
+ ### 🗂️ Universal Skill Search — 1,115+ Skills, One Command
26
13
 
27
- One command. Any platform.
28
-
29
- ---
30
-
31
- ## Install
14
+ Stop hunting across GitHub repos. TransSkill indexes **1,115+ real-world agent skills** from the [awesome-agent-skills](https://github.com/VoltAgent/awesome-agent-skills) ecosystem — curated skills from **Anthropic, Stripe, Google Gemini, Vercel, Cloudflare, Angular, Supabase, and more**.
32
15
 
33
16
  ```bash
34
- npm install -g transskill
35
- ```
17
+ # Interactive search — type to filter, enter to install
18
+ npx transskill search
36
19
 
37
- Or run directly:
38
-
39
- ```bash
40
- npx transskill convert .cursorrules --to skill.md
20
+ # Fast CLI search
21
+ npx transskill search docx --json
22
+ npx transskill search python --tag linter
41
23
  ```
42
24
 
43
- ## Quick Start
44
-
45
- ```bash
46
- # SKILL.md → .cursorrules
47
- transskill convert my-skill.skill.md --to .cursorrules
25
+ Every skill is fetched directly from its **original source** — no copies, no stale mirrors.
48
26
 
49
- # .cursorrules SKILL.md
50
- transskill convert .cursorrules --to skill.md
27
+ ### 🛡️ Built-in Security Audit
51
28
 
52
- # .cursorrules .mdc (Cursor 2.3+ with file scoping)
53
- transskill convert .cursorrules --to .mdc --glob "src/**/*.ts"
29
+ Before you install any skill, TransSkill automatically scans it for security risks:
54
30
 
55
- # Full skill directory Cursor rules
56
- transskill convert ./weather-skill/ --to .cursorrules
31
+ | Level | What It Catches |
32
+ |-------|----------------|
33
+ | **L1 — Instructions** | `rm -rf`, `curl\|sh`, base64 obfuscation, prompt injection |
34
+ | **L2 — Permissions** | Overly broad globs, dangerous MCP tool names |
35
+ | **L3 — MCP** | Suspicious server commands (`sudo`, `kill`, `rm`) |
57
36
 
58
- # GitHub repo → Claude Code skill (direct install)
59
- transskill convert gh:user/weather-skill --to skill.md \
60
- --install-to ~/.claude/skills/
37
+ ```bash
38
+ # Audit any skill file
39
+ npx transskill audit ./skill.skill.md
61
40
 
62
- # Preview without writing
63
- transskill convert .cursorrules --to skill.md --dry-run
41
+ # Install with automatic audit (blocks if score < 90)
42
+ npx transskill install python-linter
64
43
  ```
65
44
 
66
- ## Input Sources
45
+ ### 🔄 Cross-Platform Conversion
67
46
 
68
- | Format | Example | Description |
69
- |--------|---------|-------------|
70
- | Local file | `./rules.cursorrules` | Single skill file |
71
- | Local directory | `./weather-skill/` | Full skill directory with scripts and assets |
72
- | GitHub repo | `gh:user/repo` | Shallow clone + convert |
73
- | GitHub subpath | `gh:user/repo/path` | Clone specific subdirectory |
74
- | GitHub URL | `https://github.com/user/repo` | Full URL support |
47
+ Convert between every major agent skill format — **without manual rewriting**.
75
48
 
76
- ## Supported Formats
49
+ ```bash
50
+ npx transskill convert .cursorrules --to skill.md
51
+ npx transskill convert gh:user/weather-skill --to .mdc
52
+ npx transskill convert ./my-skill/ --to .cursorrules --glob "src/**/*.ts"
53
+ ```
77
54
 
78
- | Format | Platforms | Input | Output |
79
- |--------|-----------|:-----:|:------:|
55
+ | Format | Platforms | In | Out |
56
+ |--------|-----------|:--:|:---:|
80
57
  | SKILL.md | Claude Code, Codex CLI, OpenClaw, Cursor | ✅ | ✅ |
81
58
  | .cursorrules | Cursor IDE | ✅ | ✅ |
82
59
  | .mdc | Cursor 2.3+ | ✅ | ✅ |
83
- | MCP JSON | Any MCP-compatible client | ✅ | — |
60
+ | MCP JSON | Any MCP client | ✅ | — |
84
61
  | SOUL.md | OpenClaw | ✅ | — |
85
62
 
86
- ## How It Works
87
-
88
- ```
89
- Input (file/dir/GitHub)
90
-
91
-
92
- InputResolver ──► Parser ──► Mapper ──► Renderer ──► Output
93
- (Local/GitHub) (read) (map) (write)
94
- ```
95
-
96
- TransSkill uses a pipeline architecture:
97
-
98
- 1. **InputResolver** — resolves your input (local path or GitHub URL) to a local file path
99
- 2. **Parser** — reads platform-specific format and converts to a universal intermediate representation
100
- 3. **Mapper** — maps fields between platforms, reporting what's preserved and what's lost
101
- 4. **Renderer** — writes the result in the target platform's format
102
-
103
- ## Examples
63
+ ---
104
64
 
105
- ### Convert a local file
65
+ ## Install
106
66
 
107
67
  ```bash
108
- $ cat .cursorrules
109
- # My TypeScript Rules
110
- Always use strict mode
111
- Prefer named exports
112
-
113
- $ transskill convert .cursorrules --to skill.md -o typescript-rule.md
114
- ✅ Conversion complete
115
- output: ./typescript-rule.md
68
+ npm install -g transskill
69
+ # or run directly:
70
+ npx transskill --help
116
71
  ```
117
72
 
118
- ### Convert from GitHub to Cursor rules
73
+ ## Commands
119
74
 
120
- ```bash
121
- $ transskill convert gh:anthropics/skills/weather --to .cursorrules \
122
- --install-to .cursor/rules/
75
+ ### 🔍 Search & Install (Marketplace)
123
76
 
124
- ⬇️ Cloning: gh:anthropics/skills
125
- Installed: .cursor/rules/weather.cursorrules
126
- ```
77
+ ```bash
78
+ # Interactive search — browse 1,115+ skills
79
+ npx transskill search
127
80
 
128
- ### Directory conversion with loss report
81
+ # JSON output (scripts/CI)
82
+ npx transskill search react --json
129
83
 
130
- ```bash
131
- $ transskill convert ./weather-skill/ --to .cursorrules
132
- Directory conversion complete
133
- weather-skill/SKILL.md weather-skill.cursorrules
134
- weather-skill/scripts/ → ./scripts/ (copied)
135
- weather-skill/references/ → ./references/ (copied)
136
- ⚠️ SKILL.md scripts reference will not work in .cursorrules
84
+ # Install directly from registry → download → audit → convert → write
85
+ npx transskill install docx
86
+ npx transskill install python-linter --to .mdc
87
+ npx transskill install claude-api --to skill.md --dir ~/.claude/skills/
137
88
  ```
138
89
 
139
- ## Commands
90
+ ### 🔄 Convert
140
91
 
141
92
  ```bash
142
- # Convert a skill to another format
143
- transskill convert <input> --to <format> [options]
144
-
145
- # List all supported formats
146
- transskill list-formats
93
+ # Single file
94
+ npx transskill convert .cursorrules --to skill.md
147
95
 
148
- # Validate a skill file or directory
149
- transskill validate <input>
96
+ # GitHub repo
97
+ npx transskill convert gh:anthropics/skills/docx --to .cursorrules
150
98
 
151
- # Security audit a skill file or directory
152
- transskill audit <input> [options]
99
+ # Skill directory with assets
100
+ npx transskill convert ./skill-dir/ --to .cursorrules
153
101
 
154
- # See all options
155
- transskill --help
102
+ # Preview what would be lost
103
+ npx transskill diff .cursorrules --to skill.md
156
104
  ```
157
105
 
158
- ### Options for `convert`
159
-
160
- | Flag | Description |
161
- |------|-------------|
162
- | `-t, --to <format>` | Target format (required) |
163
- | `-o, --output <path>` | Output directory (default: current dir) |
164
- | `--install-to <path>` | Install directly to agent config dir |
165
- | `--glob <pattern>` | File glob pattern (for .mdc output) |
166
- | `--always-apply` | Always apply rule (for .mdc output) |
167
- | `--dry-run` | Preview without writing files |
168
- | `-v, --verbose` | Detailed conversion report |
169
-
170
- ### Options for `audit`
171
-
172
- | Flag | Description |
173
- |------|-------------|
174
- | `--format <type>` | Output format: `console` or `json` (default: console) |
175
- | `--quiet` | Only show summary score |
176
- | `--min-severity <level>` | Minimum severity: `info`, `low`, `medium`, `high`, `critical` (default: info) |
177
- | `--auditor <id>` | Run only specific auditor (can be repeated) |
178
- | `-v, --verbose` | Show detailed findings |
179
-
180
- ---
181
-
182
- ## Security Audit
183
-
184
- TransSkill includes a built-in security scanner that analyzes skill files for potential security risks before you install or use them.
106
+ ### 🛡️ Audit
185
107
 
186
108
  ```bash
187
- # Quick scan a skill file
188
- transskill audit my-skill.skill.md
189
-
190
- # JSON output for programmatic use
191
- transskill audit ./skill-dir/ --format json
192
-
193
- # Quiet mode — just the score
194
- transskill audit my-skill.skill.md --quiet
195
-
196
- # Only show high and critical issues
197
- transskill audit .cursorrules --min-severity high
198
-
199
- # Run a specific auditor only
200
- transskill audit mcp.json --auditor permission-scanner
109
+ npx transskill audit ./skill.skill.md
110
+ npx transskill audit ./skill-dir/ --format json --quiet
201
111
  ```
202
112
 
203
- ### Audit Levels
113
+ ### 📤 Publish
204
114
 
205
- The scanner checks three layers of security concerns:
206
-
207
- | Level | Scanner | What It Checks |
208
- |-------|---------|----------------|
209
- | **L1 — Instructions** | `instruction-scanner` | Dangerous shell commands (`rm -rf`, `sudo`, `curl|sh`), prompt injection patterns, base64/hex obfuscation, suspicious URLs, remote code execution |
210
- | **L2 — Permissions** | `permission-scanner` | Overly broad `.mdc` globs, `alwaysApply` without scope, dangerous MCP tool names (shell/exec), filesystem access, network access, Claude `disableModelInvocation` settings |
211
- | **L3 — MCP** | `permission-scanner` | MCP server commands (`rm`, `sudo`, `kill`), MCP tool capabilities that could be abused |
212
-
213
- > Note: L3 checks are handled by the same PermissionScanner that handles L2. They are reported together in a single scan pass.
214
-
215
- ### Scoring System
216
-
217
- The audit engine computes a numeric score (0–100) with an A–F letter grade:
218
-
219
- | Level | Score Range | Meaning |
220
- |-------|-------------|---------|
221
- | **A** | 90–100 | Excellent — minimal or no issues |
222
- | **B** | 70–89 | Good — minor low-severity findings |
223
- | **C** | 50–69 | Fair — moderate issues, review recommended |
224
- | **D** | 30–49 | Poor — significant issues, use with caution |
225
- | **F** | 0–29 | Critical — unsafe, do not use without remediation |
226
-
227
- Each finding carries a severity weight that reduces the score:
228
-
229
- | Severity | Weight |
230
- |----------|--------|
231
- | 🔴 Critical | −25 pts |
232
- | 🟠 High | −10 pts |
233
- | 🟡 Medium | −4 pts |
234
- | 🟢 Low | −1 pt |
235
- | ℹ️ Info | 0 pts |
236
-
237
- ### Output Formats
238
-
239
- **Console** (default): Human-readable report with colored severity labels, line numbers, and context snippets.
115
+ ```bash
116
+ # Submit a skill link to the registry (PR)
117
+ npx transskill publish ./my-skill/
240
118
 
119
+ # Batch publish skills from a directory
120
+ npx transskill publish-all ./skills/ --dry-run
241
121
  ```
242
- $ transskill audit my-skill.skill.md
243
122
 
244
- ╔══════════════════════════════════════════════╗
245
- ║ TransSkill Security Audit ║
246
- ║ Target: my-skill.skill.md ║
247
- ╚══════════════════════════════════════════════╝
248
-
249
- Audit Level: L1 + L2 + L3
250
-
251
- Findings (3):
252
-
253
- 🔴 Critical | L2-003b | MCP server 使用危险命令: rm
254
- → ./my-skill.skill.md
255
-
256
- 🟠 High | L1-001 | Detected dangerous command: rm -rf /
257
- → ./my-skill.skill.md:24
258
- → run: rm -rf /tmp/cache
123
+ ---
259
124
 
260
- 🟡 Medium | L2-001b | alwaysApply 规则 globs 范围过宽
261
- → ./my-skill.skill.md
125
+ ## How It Works
262
126
 
263
- Score: 65/100 — Level C
264
- 3 findings (1 critical, 1 high, 1 medium)
265
127
  ```
128
+ Input (file/dir/GitHub/Registry)
129
+
130
+
131
+ InputResolver ──► Parser ──► Mapper ──► Renderer ──► Output
132
+ (Local/GitHub) (read) (map) (write)
266
133
 
267
- **JSON**: Machine-readable for CI/CD pipelines and programmatic consumption.
268
-
269
- ```bash
270
- transskill audit ./skills/ --format json
134
+ Registry ──► Search ──► Install ──► Audit ──► Convert ──► Write
135
+ (1,115+) (TUI/JSON) (auto)
271
136
  ```
272
137
 
273
- **Quiet**: One-line summary, ideal for quick checks.
138
+ TransSkill's pipeline:
139
+ 1. **InputResolver** — resolves local/GitHub/registry sources
140
+ 2. **Parser** — reads 6 formats into a universal intermediate representation
141
+ 3. **Mapper** — cross-platform field mapping with loss reporting
142
+ 4. **Renderer** — writes in the target format
143
+ 5. **AuditEngine** — security scanning at every level
144
+ 6. **Marketplace** — search, install, and publish via the registry
274
145
 
275
- ```bash
276
- transskill audit .cursorrules --quiet
277
- # 📊 C (65/100) — 3 findings (1🔴 1🟠 1🟡)
278
- ```
146
+ ---
279
147
 
280
- ### CI/CD Integration
148
+ ## Security Audit Scoring
281
149
 
282
- Use the JSON flag to integrate audit results into your CI pipeline:
150
+ | Score | Grade | Meaning |
151
+ |-------|-------|---------|
152
+ | 90–100 | **A** | Excellent |
153
+ | 70–89 | **B** | Good — minor issues |
154
+ | 50–69 | **C** | Fair — review recommended |
155
+ | 30–49 | **D** | Poor — significant issues |
156
+ | 0–29 | **F** | Critical — do not use |
283
157
 
284
- ```bash
285
- #!/bin/bash
286
- # Fail build if score drops below B (70)
287
- RESULT=$(transskill audit ./skills/ --format json)
288
- SCORE=$(echo $RESULT | jq '.score.total')
289
- if [ "$SCORE" -lt 70 ]; then
290
- echo "❌ Security score $SCORE is below threshold (70)"
291
- exit 1
292
- fi
293
- echo "✅ Security score $SCORE — passing"
294
- ```
158
+ ---
295
159
 
296
160
  ## Project Status
297
161
 
298
- **v0.2.1 — Active development.** See [tasks.md](specs/tasks.md) for current progress.
162
+ **v0.4.0** — Active development.
299
163
 
300
- | Phase | Status |
301
- |-------|--------|
302
- | Phase 0: Project scaffold | Complete |
303
- | Phase 1: InputResolver + types | Complete |
304
- | Phase 2: Parser layer | Complete |
305
- | Phase 3: Mapper + Renderer | Complete |
306
- | Phase 4: CLI pipeline | Complete |
307
- | Phase 5: Tests | In Progress |
308
- | Phase 6: CI + publish | ⬜ Pending |
309
- | Phase A: Security audit | ✅ Complete |
164
+ | Feature | Status |
165
+ |---------|--------|
166
+ | Format conversion (6 formats) | Complete |
167
+ | Security audit (L1–L3) | Complete |
168
+ | Marketplace search (1,115+ skills) | Complete |
169
+ | Install (download audit → convert) | Complete |
170
+ | Publish (link submission) | Complete |
171
+ | Tests | In progress |
310
172
 
311
- ## Contributing
312
-
313
- See [CONTRIBUTING.md](CONTRIBUTING.md) for how to add a new format.
173
+ ---
314
174
 
315
175
  ## License
316
176