@devxiyang/agent-skill 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/LICENSE +21 -0
- package/README.md +187 -0
- package/dist/builtin.d.ts +20 -0
- package/dist/builtin.d.ts.map +1 -0
- package/dist/builtin.js +25 -0
- package/dist/builtin.js.map +1 -0
- package/dist/copy.d.ts +30 -0
- package/dist/copy.d.ts.map +1 -0
- package/dist/copy.js +73 -0
- package/dist/copy.js.map +1 -0
- package/dist/discovery/discovery.d.ts +40 -0
- package/dist/discovery/discovery.d.ts.map +1 -0
- package/dist/discovery/discovery.js +111 -0
- package/dist/discovery/discovery.js.map +1 -0
- package/dist/discovery/frontmatter.d.ts +27 -0
- package/dist/discovery/frontmatter.d.ts.map +1 -0
- package/dist/discovery/frontmatter.js +123 -0
- package/dist/discovery/frontmatter.js.map +1 -0
- package/dist/discovery/index.d.ts +4 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +3 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +38 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validator.d.ts +14 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +2 -0
- package/dist/validator.js.map +1 -0
- package/dist/validators/index.d.ts +2 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +2 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/node.d.ts +9 -0
- package/dist/validators/node.d.ts.map +1 -0
- package/dist/validators/node.js +43 -0
- package/dist/validators/node.js.map +1 -0
- package/package.json +58 -0
- package/skills/git/SKILL.md +87 -0
- package/skills/github/SKILL.md +54 -0
- package/skills/skill-creator/SKILL.md +73 -0
- package/skills/tmux/SKILL.md +76 -0
- package/skills/weather/SKILL.md +39 -0
- package/skills/web/SKILL.md +50 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tmux
|
|
3
|
+
description: Remote-control tmux sessions for interactive CLIs by sending keystrokes and reading pane output. Use when a command requires an interactive TTY.
|
|
4
|
+
requires: bin:tmux
|
|
5
|
+
os: darwin,linux
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# tmux Skill
|
|
9
|
+
|
|
10
|
+
Use tmux only when you need an interactive TTY. For non-interactive long-running tasks, prefer background execution instead.
|
|
11
|
+
|
|
12
|
+
## Quickstart
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
SOCKET=/tmp/agent-tmux.sock
|
|
16
|
+
SESSION=agent
|
|
17
|
+
|
|
18
|
+
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
|
|
19
|
+
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'python3 -q' Enter
|
|
20
|
+
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
After starting a session, always print monitor commands for the user:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
To monitor:
|
|
27
|
+
tmux -S "$SOCKET" attach -t "$SESSION"
|
|
28
|
+
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Socket convention
|
|
32
|
+
|
|
33
|
+
Use a dedicated socket file per agent instance to avoid conflicts:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
SOCKET="${AGENT_TMUX_SOCKET:-/tmp/agent-tmux.sock}"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Sending input
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Literal send (safe for special chars)
|
|
43
|
+
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -l -- "$cmd"
|
|
44
|
+
|
|
45
|
+
# With Enter
|
|
46
|
+
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "$cmd" Enter
|
|
47
|
+
|
|
48
|
+
# Control keys
|
|
49
|
+
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 C-c
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Reading output
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Capture recent history
|
|
56
|
+
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Session management
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# List sessions
|
|
63
|
+
tmux -S "$SOCKET" list-sessions
|
|
64
|
+
|
|
65
|
+
# Kill session
|
|
66
|
+
tmux -S "$SOCKET" kill-session -t "$SESSION"
|
|
67
|
+
|
|
68
|
+
# Kill server (all sessions on socket)
|
|
69
|
+
tmux -S "$SOCKET" kill-server
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Tips
|
|
73
|
+
|
|
74
|
+
- Target format: `session:window.pane` (default `:0.0`)
|
|
75
|
+
- Set `PYTHON_BASIC_REPL=1` for Python REPLs to avoid readline issues
|
|
76
|
+
- Poll for shell prompt (`$` or `❯`) to detect command completion
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weather
|
|
3
|
+
description: Get current weather and forecasts for any location. No API key required.
|
|
4
|
+
requires: bin:curl
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Weather Skill
|
|
8
|
+
|
|
9
|
+
Two free services, no API keys needed.
|
|
10
|
+
|
|
11
|
+
## wttr.in (primary)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# One-liner
|
|
15
|
+
curl -s "wttr.in/London?format=3"
|
|
16
|
+
# London: ⛅️ +8°C
|
|
17
|
+
|
|
18
|
+
# Compact format
|
|
19
|
+
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
|
|
20
|
+
|
|
21
|
+
# Full 3-day forecast
|
|
22
|
+
curl -s "wttr.in/London?T"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Format codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location
|
|
26
|
+
|
|
27
|
+
Tips:
|
|
28
|
+
- URL-encode spaces: `wttr.in/New+York`
|
|
29
|
+
- Airport codes work: `wttr.in/JFK`
|
|
30
|
+
- Units: `?m` metric · `?u` imperial
|
|
31
|
+
- Today only: `?1` · Current only: `?0`
|
|
32
|
+
|
|
33
|
+
## Open-Meteo (fallback, JSON, no key)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Get coordinates first, then query. Returns JSON with temperature, windspeed, and weather code.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web
|
|
3
|
+
description: Fetch web pages, call REST APIs, download files, and extract content from URLs using curl.
|
|
4
|
+
requires: bin:curl
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Web Skill
|
|
8
|
+
|
|
9
|
+
## Fetch a web page
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
curl -sL "https://example.com"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## REST API calls
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# GET with JSON response
|
|
19
|
+
curl -s "https://api.example.com/users" | jq .
|
|
20
|
+
|
|
21
|
+
# POST JSON
|
|
22
|
+
curl -s -X POST "https://api.example.com/items" \
|
|
23
|
+
-H "Content-Type: application/json" \
|
|
24
|
+
-d '{"name": "foo"}'
|
|
25
|
+
|
|
26
|
+
# With auth header
|
|
27
|
+
curl -s "https://api.example.com/data" \
|
|
28
|
+
-H "Authorization: Bearer $TOKEN"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Download a file
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -sL "https://example.com/file.zip" -o /tmp/file.zip
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Extract text from a page
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Strip HTML tags
|
|
41
|
+
curl -sL "https://example.com" | sed 's/<[^>]*>//g' | sed '/^[[:space:]]*$/d'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Tips
|
|
45
|
+
|
|
46
|
+
- `-s` silences progress output
|
|
47
|
+
- `-L` follows redirects
|
|
48
|
+
- `-I` fetches headers only
|
|
49
|
+
- `--max-time 10` sets a timeout in seconds
|
|
50
|
+
- `--compressed` requests gzip encoding automatically
|