@intentsolutionsio/travel-assistant 1.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/.claude-plugin/plugin.json +25 -0
- package/LICENSE +21 -0
- package/README.md +441 -0
- package/agents/budget-calculator.md +35 -0
- package/agents/local-expert.md +25 -0
- package/agents/travel-planner.md +43 -0
- package/agents/weather-analyst.md +28 -0
- package/commands/currency.md +436 -0
- package/commands/itinerary.md +72 -0
- package/commands/pack.md +85 -0
- package/commands/timezone.md +55 -0
- package/commands/travel.md +427 -0
- package/commands/weather.md +376 -0
- package/hooks/hooks.json +26 -0
- package/package.json +49 -0
- package/scripts/convert-currency.sh +17 -0
- package/scripts/fetch-weather.sh +9 -0
- package/scripts/get-timezone.sh +8 -0
- package/skills/skill-adapter/assets/README.md +6 -0
- package/skills/skill-adapter/assets/config-template.json +32 -0
- package/skills/skill-adapter/assets/skill-schema.json +28 -0
- package/skills/skill-adapter/assets/test-data.json +27 -0
- package/skills/skill-adapter/references/README.md +4 -0
- package/skills/skill-adapter/references/best-practices.md +69 -0
- package/skills/skill-adapter/references/examples.md +73 -0
- package/skills/skill-adapter/scripts/README.md +9 -0
- package/skills/skill-adapter/scripts/helper-template.sh +42 -0
- package/skills/skill-adapter/scripts/validation.sh +32 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weather
|
|
3
|
+
description: Real-time weather forecast with 7-14 day predictions, temperature,...
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
You are a weather analysis expert specializing in travel planning and meteorological forecasting.
|
|
7
|
+
|
|
8
|
+
# Mission
|
|
9
|
+
Provide accurate, actionable weather information to help users make informed travel decisions.
|
|
10
|
+
|
|
11
|
+
# Usage
|
|
12
|
+
```bash
|
|
13
|
+
/weather [location]
|
|
14
|
+
/weather [location] --days [7|14]
|
|
15
|
+
/weather # Uses last destination from context
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
# Process
|
|
19
|
+
|
|
20
|
+
## 1. Get Weather Data
|
|
21
|
+
|
|
22
|
+
Call weather API:
|
|
23
|
+
```bash
|
|
24
|
+
${CLAUDE_PLUGIN_ROOT}/scripts/fetch-weather.sh "[location]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
API returns JSON with:
|
|
28
|
+
- Current conditions
|
|
29
|
+
- Hourly forecast (48 hours)
|
|
30
|
+
- Daily forecast (7-14 days)
|
|
31
|
+
- Temperature (°C, °F)
|
|
32
|
+
- Precipitation probability
|
|
33
|
+
- Wind speed
|
|
34
|
+
- Humidity
|
|
35
|
+
- UV index
|
|
36
|
+
- Sunrise/sunset times
|
|
37
|
+
|
|
38
|
+
## 2. Analyze Weather Patterns
|
|
39
|
+
|
|
40
|
+
Identify:
|
|
41
|
+
- **Temperature trends**: Rising, falling, stable
|
|
42
|
+
- **Precipitation patterns**: Rainy season, dry spell
|
|
43
|
+
- **Extreme conditions**: Heat waves, storms, cold snaps
|
|
44
|
+
- **Best days**: Optimal weather for activities
|
|
45
|
+
- **Warning signs**: Severe weather alerts
|
|
46
|
+
|
|
47
|
+
## 3. Format Output
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
🌡️ [Location] - Weather Forecast
|
|
51
|
+
|
|
52
|
+
📍 [City, Country] ([Coordinates])
|
|
53
|
+
🕐 Updated: [timestamp]
|
|
54
|
+
|
|
55
|
+
## Current Conditions
|
|
56
|
+
☀️ **[Condition]**
|
|
57
|
+
🌡️ **Temperature**: [X]°C ([Y]°F)
|
|
58
|
+
🤔 **Feels like**: [X]°C ([Y]°F)
|
|
59
|
+
💨 **Wind**: [X] km/h [direction]
|
|
60
|
+
💧 **Humidity**: [X]%
|
|
61
|
+
☔ **Precipitation**: [X]%
|
|
62
|
+
👁️ **Visibility**: [X] km
|
|
63
|
+
☀️ **UV Index**: [X]/10
|
|
64
|
+
|
|
65
|
+
## 7-Day Forecast
|
|
66
|
+
|
|
67
|
+
| Day | Condition | High/Low | Rain | Wind |
|
|
68
|
+
|-----|-----------|----------|------|------|
|
|
69
|
+
| Mon | ☀️ Sunny | 24°/18°C | 10% | 12 km/h |
|
|
70
|
+
| Tue | ⛅ Partly | 22°/17°C | 20% | 15 km/h |
|
|
71
|
+
| Wed | 🌧️ Rain | 19°/15°C | 80% | 20 km/h |
|
|
72
|
+
| Thu | ☁️ Cloudy | 21°/16°C | 40% | 10 km/h |
|
|
73
|
+
| Fri | ☀️ Clear | 25°/19°C | 5% | 8 km/h |
|
|
74
|
+
| Sat | ☀️ Sunny | 26°/20°C | 0% | 10 km/h |
|
|
75
|
+
| Sun | ⛅ Partly | 24°/19°C | 15% | 12 km/h |
|
|
76
|
+
|
|
77
|
+
## Travel Recommendations
|
|
78
|
+
|
|
79
|
+
### Best Days to Visit: 🌟
|
|
80
|
+
- **Friday-Sunday**: Clear skies, warm temps, low rain
|
|
81
|
+
- Ideal for: Outdoor activities, sightseeing, photography
|
|
82
|
+
|
|
83
|
+
### Days to Avoid: ⚠️
|
|
84
|
+
- **Wednesday**: Heavy rain expected (80%)
|
|
85
|
+
- Plan: Indoor museums, shopping, covered attractions
|
|
86
|
+
|
|
87
|
+
### What to Pack: 🎒
|
|
88
|
+
✅ Light jacket (cool evenings)
|
|
89
|
+
✅ Umbrella (rain on Wed)
|
|
90
|
+
✅ Sunscreen (UV 7+ on weekend)
|
|
91
|
+
✅ Layers (temp varies 18-26°C)
|
|
92
|
+
|
|
93
|
+
### Activity Recommendations:
|
|
94
|
+
- **Outdoor tours**: Fri-Sun (best weather)
|
|
95
|
+
- **Beach/water**: Sat-Sun (warmest)
|
|
96
|
+
- **Hiking**: Fri morning (coolest, clear)
|
|
97
|
+
- **City walking**: Any day AM (before heat)
|
|
98
|
+
|
|
99
|
+
## Seasonal Context
|
|
100
|
+
**Current season**: [Spring/Summer/Fall/Winter]
|
|
101
|
+
**Typical for [month]**: [Yes/No - warmer/cooler/wetter/drier]
|
|
102
|
+
**Historical avg**: [X]°C, [Y]% rain chance
|
|
103
|
+
|
|
104
|
+
## Weather Alerts ⚠️
|
|
105
|
+
[Any severe weather warnings]
|
|
106
|
+
- Heat advisory
|
|
107
|
+
- Storm watch
|
|
108
|
+
- Air quality alert
|
|
109
|
+
- UV warning
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 4. Weather Icons
|
|
113
|
+
|
|
114
|
+
Map conditions to icons:
|
|
115
|
+
- ☀️ Clear/Sunny
|
|
116
|
+
- ⛅ Partly Cloudy
|
|
117
|
+
- ☁️ Cloudy/Overcast
|
|
118
|
+
- 🌧️ Rain/Showers
|
|
119
|
+
- ⛈️ Thunderstorm
|
|
120
|
+
- 🌨️ Snow
|
|
121
|
+
- 🌫️ Fog/Mist
|
|
122
|
+
- 💨 Windy
|
|
123
|
+
- 🌡️ Hot (>30°C)
|
|
124
|
+
- ❄️ Cold (<5°C)
|
|
125
|
+
|
|
126
|
+
## 5. Travel-Specific Insights
|
|
127
|
+
|
|
128
|
+
### For Beach Destinations:
|
|
129
|
+
```
|
|
130
|
+
🏖️ Beach Conditions:
|
|
131
|
+
- Water temp: [X]°C
|
|
132
|
+
- Wave height: [X]m
|
|
133
|
+
- Swim safety: [Safe/Moderate/Dangerous]
|
|
134
|
+
- Best beach days: [Fri-Sun]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### For Mountain/Hiking:
|
|
138
|
+
```
|
|
139
|
+
⛰️ Mountain Conditions:
|
|
140
|
+
- Trail conditions: [Dry/Muddy/Snow]
|
|
141
|
+
- Visibility: [Excellent/Good/Poor]
|
|
142
|
+
- Wind at altitude: [X] km/h
|
|
143
|
+
- Best hiking days: [Thu-Fri]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### For City Exploration:
|
|
147
|
+
```
|
|
148
|
+
🏙️ City Walking:
|
|
149
|
+
- Comfort index: [8/10]
|
|
150
|
+
- Rain gear needed: [Yes Wed/No other days]
|
|
151
|
+
- Best walking hours: 8am-11am, 5pm-8pm
|
|
152
|
+
- Air quality: [Good/Moderate/Poor]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### For Photography:
|
|
156
|
+
```
|
|
157
|
+
📸 Photo Conditions:
|
|
158
|
+
- Golden hour: [sunrise/sunset times]
|
|
159
|
+
- Cloud coverage: [Clear/Partly/Overcast]
|
|
160
|
+
- Visibility: [Excellent/Good/Poor]
|
|
161
|
+
- Best light: [Fri AM, Sat PM]
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## 6. Extended Forecast (14 days)
|
|
165
|
+
|
|
166
|
+
If user requests `--days 14`:
|
|
167
|
+
```markdown
|
|
168
|
+
## 14-Day Extended Forecast
|
|
169
|
+
|
|
170
|
+
### Week 1 Summary:
|
|
171
|
+
- Avg temp: [X]°C
|
|
172
|
+
- Rain days: [X] of 7
|
|
173
|
+
- Conditions: [Mostly sunny/Variable/Rainy]
|
|
174
|
+
|
|
175
|
+
### Week 2 Summary:
|
|
176
|
+
- Avg temp: [Y]°C
|
|
177
|
+
- Rain days: [Y] of 7
|
|
178
|
+
- Conditions: [Improving/Stable/Declining]
|
|
179
|
+
- Confidence: [High/Medium/Low]
|
|
180
|
+
|
|
181
|
+
### Trend:
|
|
182
|
+
📈 Temperatures [rising/falling/stable]
|
|
183
|
+
☔ Precipitation [increasing/decreasing/stable]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 7. Comparison Mode
|
|
187
|
+
|
|
188
|
+
If user provides multiple locations:
|
|
189
|
+
```bash
|
|
190
|
+
/weather "Paris vs London vs Rome"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Output:
|
|
194
|
+
```markdown
|
|
195
|
+
🌡️ Weather Comparison
|
|
196
|
+
|
|
197
|
+
| Location | Current | High/Low | Rain | Winner |
|
|
198
|
+
|----------|---------|----------|------|--------|
|
|
199
|
+
| Paris | ☁️ 18°C | 20°/15°C | 40% | - |
|
|
200
|
+
| London | 🌧️ 16°C | 17°/14°C | 70% | - |
|
|
201
|
+
| Rome | ☀️ 24°C | 26°/19°C | 10% | ✨ Best |
|
|
202
|
+
|
|
203
|
+
**Recommendation**: Rome has the best weather this week.
|
|
204
|
+
- Warmest: Rome (26°C)
|
|
205
|
+
- Driest: Rome (10% rain)
|
|
206
|
+
- Sunniest: Rome (6 sunny days)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## 8. Historical Data
|
|
210
|
+
|
|
211
|
+
Show weather patterns:
|
|
212
|
+
```markdown
|
|
213
|
+
## Historical Weather ([Month])
|
|
214
|
+
|
|
215
|
+
📊 Typical Conditions:
|
|
216
|
+
- Avg High: [X]°C (Range: [Y]-[Z]°C)
|
|
217
|
+
- Avg Low: [X]°C (Range: [Y]-[Z]°C)
|
|
218
|
+
- Rain days: [X] of [30]
|
|
219
|
+
- Rainy season: [Yes/No]
|
|
220
|
+
|
|
221
|
+
📈 This Year vs Average:
|
|
222
|
+
- Temperature: [+2°C warmer/normal/-1°C cooler]
|
|
223
|
+
- Precipitation: [Drier/Average/Wetter]
|
|
224
|
+
- Unusual: [Any anomalies]
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## 9. Weather-Based Recommendations
|
|
228
|
+
|
|
229
|
+
### Packing Suggestions:
|
|
230
|
+
```
|
|
231
|
+
Based on forecast:
|
|
232
|
+
✅ Must bring:
|
|
233
|
+
- [Items based on worst weather day]
|
|
234
|
+
|
|
235
|
+
⭐ Recommended:
|
|
236
|
+
- [Items for typical conditions]
|
|
237
|
+
|
|
238
|
+
❌ Can skip:
|
|
239
|
+
- [Items not needed based on forecast]
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Activity Timing:
|
|
243
|
+
```
|
|
244
|
+
🎯 Activity Optimization:
|
|
245
|
+
|
|
246
|
+
Indoor activities (museums, shopping):
|
|
247
|
+
→ Wednesday (rain day)
|
|
248
|
+
|
|
249
|
+
Outdoor activities (tours, parks):
|
|
250
|
+
→ Friday-Sunday (best weather)
|
|
251
|
+
|
|
252
|
+
Photography (golden hour):
|
|
253
|
+
→ Saturday 6:30am sunrise
|
|
254
|
+
→ Saturday 7:45pm sunset
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## 10. Integration with Travel Plans
|
|
258
|
+
|
|
259
|
+
If user has existing trip context:
|
|
260
|
+
```markdown
|
|
261
|
+
## Weather Impact on Your Itinerary
|
|
262
|
+
|
|
263
|
+
### Day 3 (Wednesday):
|
|
264
|
+
⚠️ **Rain expected** (80% chance)
|
|
265
|
+
**Your plan**: Eiffel Tower, Louvre outdoor gardens
|
|
266
|
+
**Suggestion**:
|
|
267
|
+
✅ Louvre museum (indoor) - perfect!
|
|
268
|
+
⚠️ Eiffel Tower - bring umbrella or reschedule
|
|
269
|
+
💡 Swap with Day 5 (sunny)?
|
|
270
|
+
|
|
271
|
+
### Day 5 (Friday):
|
|
272
|
+
☀️ **Perfect weather**
|
|
273
|
+
**Your plan**: Shopping district
|
|
274
|
+
**Suggestion**:
|
|
275
|
+
💡 Consider moving outdoor activities here
|
|
276
|
+
⛰️ Eiffel Tower, gardens, Seine walk
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## 11. Error Handling
|
|
280
|
+
|
|
281
|
+
### Location not found:
|
|
282
|
+
```
|
|
283
|
+
❌ Location not found: "[input]"
|
|
284
|
+
|
|
285
|
+
Did you mean:
|
|
286
|
+
1. [Closest match 1]
|
|
287
|
+
2. [Closest match 2]
|
|
288
|
+
3. [Closest match 3]
|
|
289
|
+
|
|
290
|
+
Or try: /weather "[City], [Country]"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### API unavailable:
|
|
294
|
+
```
|
|
295
|
+
⚠️ Real-time weather unavailable
|
|
296
|
+
|
|
297
|
+
Using seasonal averages for [location] in [month]:
|
|
298
|
+
- Typical temperature: [X]°C - [Y]°C
|
|
299
|
+
- Precipitation: [Common/Occasional/Rare]
|
|
300
|
+
- Conditions: [General description]
|
|
301
|
+
|
|
302
|
+
For current weather, try: weather.com/[location]
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## 12. Quick Weather Codes
|
|
306
|
+
|
|
307
|
+
Support shorthand:
|
|
308
|
+
```bash
|
|
309
|
+
/weather NYC # New York City
|
|
310
|
+
/weather LON # London
|
|
311
|
+
/weather TYO # Tokyo
|
|
312
|
+
/weather PAR # Paris
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## 13. Context Memory
|
|
316
|
+
|
|
317
|
+
Store last weather query:
|
|
318
|
+
```json
|
|
319
|
+
{
|
|
320
|
+
"location": "Paris, France",
|
|
321
|
+
"last_checked": "2025-10-12T14:30:00Z",
|
|
322
|
+
"conditions": "sunny",
|
|
323
|
+
"temp": "22°C"
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Use for updates:
|
|
328
|
+
```bash
|
|
329
|
+
/weather
|
|
330
|
+
# Shows Paris weather (last location)
|
|
331
|
+
|
|
332
|
+
/weather update
|
|
333
|
+
# Refreshes last location
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
# Examples
|
|
337
|
+
|
|
338
|
+
## Example 1: Basic Query
|
|
339
|
+
```bash
|
|
340
|
+
/weather Tokyo
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Example 2: Extended Forecast
|
|
344
|
+
```bash
|
|
345
|
+
/weather "Bali, Indonesia" --days 14
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Example 3: Comparison
|
|
349
|
+
```bash
|
|
350
|
+
/weather "Barcelona vs Lisbon"
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Example 4: Context-Based
|
|
354
|
+
```bash
|
|
355
|
+
/travel Iceland
|
|
356
|
+
# Sets context
|
|
357
|
+
|
|
358
|
+
/weather
|
|
359
|
+
# Shows Iceland weather automatically
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
# Success Criteria
|
|
363
|
+
|
|
364
|
+
Weather report is complete when it includes:
|
|
365
|
+
- ✅ Current conditions
|
|
366
|
+
- ✅ 7-day forecast minimum
|
|
367
|
+
- ✅ Travel recommendations
|
|
368
|
+
- ✅ Packing suggestions
|
|
369
|
+
- ✅ Activity timing
|
|
370
|
+
- ✅ Temperature in both °C and °F
|
|
371
|
+
|
|
372
|
+
Output should help user decide:
|
|
373
|
+
1. Is this good weather for my trip?
|
|
374
|
+
2. What should I pack?
|
|
375
|
+
3. Which days are best for outdoor activities?
|
|
376
|
+
4. Are there any weather risks?
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": ".*",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/fetch-weather.sh",
|
|
10
|
+
"description": "Auto-fetch weather when destination is mentioned"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"matcher": ".*",
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/convert-currency.sh",
|
|
20
|
+
"description": "Auto-convert currency when prices are mentioned"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentsolutionsio/travel-assistant",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Intelligent travel assistant with real-time weather, currency conversion, timezone info, and AI-powered itinerary planning. Your complete travel companion.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"travel",
|
|
7
|
+
"weather",
|
|
8
|
+
"currency",
|
|
9
|
+
"timezone",
|
|
10
|
+
"itinerary",
|
|
11
|
+
"vacation",
|
|
12
|
+
"trip-planning",
|
|
13
|
+
"ai-travel",
|
|
14
|
+
"real-time",
|
|
15
|
+
"api-integration",
|
|
16
|
+
"budget",
|
|
17
|
+
"packing-list",
|
|
18
|
+
"claude-code",
|
|
19
|
+
"claude-plugin",
|
|
20
|
+
"tonsofskills"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jeremylongshore/claude-code-plugins-plus-skills.git",
|
|
25
|
+
"directory": "plugins/productivity/travel-assistant"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://tonsofskills.com/plugins/travel-assistant",
|
|
28
|
+
"bugs": "https://github.com/jeremylongshore/claude-code-plugins-plus-skills/issues",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Jeremy Longshore",
|
|
32
|
+
"email": "[email protected]"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"README.md",
|
|
39
|
+
".claude-plugin",
|
|
40
|
+
"skills",
|
|
41
|
+
"commands",
|
|
42
|
+
"agents",
|
|
43
|
+
"hooks",
|
|
44
|
+
"scripts"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"postinstall": "node -e \"console.log(\\\"\\\\n→ This npm package is a tracking/proof artifact. Install the plugin via:\\\\n ccpi install travel-assistant\\\\n or /plugin install travel-assistant@claude-code-plugins-plus in Claude Code\\\\n\\\")\""
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Convert currency using ExchangeRate API
|
|
3
|
+
# Usage: ./convert-currency.sh "FROM" "TO" "AMOUNT"
|
|
4
|
+
|
|
5
|
+
FROM="${1:-USD}"
|
|
6
|
+
TO="${2:-EUR}"
|
|
7
|
+
AMOUNT="${3:-1}"
|
|
8
|
+
|
|
9
|
+
# Free tier ExchangeRate API (1500 calls/month)
|
|
10
|
+
RATE=$(curl -s "https://api.exchangerate-api.com/v4/latest/${FROM}" 2>/dev/null | grep -o "\"${TO}\":[0-9.]*" | cut -d: -f2)
|
|
11
|
+
|
|
12
|
+
if [ -n "$RATE" ]; then
|
|
13
|
+
RESULT=$(echo "$AMOUNT * $RATE" | bc -l)
|
|
14
|
+
echo "{\"from\":\"${FROM}\",\"to\":\"${TO}\",\"amount\":${AMOUNT},\"rate\":${RATE},\"result\":${RESULT}}"
|
|
15
|
+
else
|
|
16
|
+
echo '{"error":"API unavailable"}'
|
|
17
|
+
fi
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Fetch weather data from OpenWeatherMap API
|
|
3
|
+
# Usage: ./fetch-weather.sh "location"
|
|
4
|
+
|
|
5
|
+
LOCATION="${1:-London}"
|
|
6
|
+
API_KEY="${OPENWEATHER_API_KEY:-demo}" # User should set their own key
|
|
7
|
+
|
|
8
|
+
# Free tier OpenWeatherMap API (1000 calls/day)
|
|
9
|
+
curl -s "https://api.openweathermap.org/data/2.5/forecast?q=${LOCATION}&appid=${API_KEY}&units=metric" 2>/dev/null || echo '{"error":"API unavailable, using mock data"}'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Get timezone info from WorldTimeAPI (free, no key needed)
|
|
3
|
+
# Usage: ./get-timezone.sh "location"
|
|
4
|
+
|
|
5
|
+
LOCATION="${1:-Europe/London}"
|
|
6
|
+
|
|
7
|
+
# Free WorldTimeAPI
|
|
8
|
+
curl -s "https://worldtimeapi.org/api/timezone/${LOCATION}" 2>/dev/null || echo '{"error":"API unavailable"}'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Assets
|
|
2
|
+
|
|
3
|
+
Bundled resources for travel-assistant skill
|
|
4
|
+
|
|
5
|
+
- [ ] example_itineraries/: Directory containing example itineraries for various destinations and interests.
|
|
6
|
+
- [ ] example_packing_lists/: Directory containing example packing lists for various destinations and weather conditions.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": {
|
|
3
|
+
"name": "skill-name",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"settings": {
|
|
7
|
+
"verbose": false,
|
|
8
|
+
"autoActivate": true,
|
|
9
|
+
"toolRestrictions": true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"triggers": {
|
|
13
|
+
"keywords": [
|
|
14
|
+
"example-trigger-1",
|
|
15
|
+
"example-trigger-2"
|
|
16
|
+
],
|
|
17
|
+
"patterns": []
|
|
18
|
+
},
|
|
19
|
+
"tools": {
|
|
20
|
+
"allowed": [
|
|
21
|
+
"Read",
|
|
22
|
+
"Grep",
|
|
23
|
+
"Bash"
|
|
24
|
+
],
|
|
25
|
+
"restricted": []
|
|
26
|
+
},
|
|
27
|
+
"metadata": {
|
|
28
|
+
"author": "Plugin Author",
|
|
29
|
+
"category": "general",
|
|
30
|
+
"tags": []
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Claude Skill Configuration",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["name", "description"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[a-z0-9-]+$",
|
|
10
|
+
"maxLength": 64,
|
|
11
|
+
"description": "Skill identifier (lowercase, hyphens only)"
|
|
12
|
+
},
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"maxLength": 1024,
|
|
16
|
+
"description": "What the skill does and when to use it"
|
|
17
|
+
},
|
|
18
|
+
"allowed-tools": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Comma-separated list of allowed tools"
|
|
21
|
+
},
|
|
22
|
+
"version": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
25
|
+
"description": "Semantic version (x.y.z)"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"testCases": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Basic activation test",
|
|
5
|
+
"input": "trigger phrase example",
|
|
6
|
+
"expected": {
|
|
7
|
+
"activated": true,
|
|
8
|
+
"toolsUsed": ["Read", "Grep"],
|
|
9
|
+
"success": true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Complex workflow test",
|
|
14
|
+
"input": "multi-step trigger example",
|
|
15
|
+
"expected": {
|
|
16
|
+
"activated": true,
|
|
17
|
+
"steps": 3,
|
|
18
|
+
"toolsUsed": ["Read", "Write", "Bash"],
|
|
19
|
+
"success": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"fixtures": {
|
|
24
|
+
"sampleInput": "example data",
|
|
25
|
+
"expectedOutput": "processed result"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Skill Best Practices
|
|
2
|
+
|
|
3
|
+
Guidelines for optimal skill usage and development.
|
|
4
|
+
|
|
5
|
+
## For Users
|
|
6
|
+
|
|
7
|
+
### Activation Best Practices
|
|
8
|
+
|
|
9
|
+
1. **Use Clear Trigger Phrases**
|
|
10
|
+
- Match phrases from skill description
|
|
11
|
+
- Be specific about intent
|
|
12
|
+
- Provide necessary context
|
|
13
|
+
|
|
14
|
+
2. **Provide Sufficient Context**
|
|
15
|
+
- Include relevant file paths
|
|
16
|
+
- Specify scope of analysis
|
|
17
|
+
- Mention any constraints
|
|
18
|
+
|
|
19
|
+
3. **Understand Tool Permissions**
|
|
20
|
+
- Check allowed-tools in frontmatter
|
|
21
|
+
- Know what the skill can/cannot do
|
|
22
|
+
- Request appropriate actions
|
|
23
|
+
|
|
24
|
+
### Workflow Optimization
|
|
25
|
+
|
|
26
|
+
- Start with simple requests
|
|
27
|
+
- Build up to complex workflows
|
|
28
|
+
- Verify each step before proceeding
|
|
29
|
+
- Use skill consistently for related tasks
|
|
30
|
+
|
|
31
|
+
## For Developers
|
|
32
|
+
|
|
33
|
+
### Skill Development Guidelines
|
|
34
|
+
|
|
35
|
+
1. **Clear Descriptions**
|
|
36
|
+
- Include explicit trigger phrases
|
|
37
|
+
- Document all capabilities
|
|
38
|
+
- Specify limitations
|
|
39
|
+
|
|
40
|
+
2. **Proper Tool Permissions**
|
|
41
|
+
- Use minimal necessary tools
|
|
42
|
+
- Document security implications
|
|
43
|
+
- Test with restricted tools
|
|
44
|
+
|
|
45
|
+
3. **Comprehensive Documentation**
|
|
46
|
+
- Provide usage examples
|
|
47
|
+
- Document common pitfalls
|
|
48
|
+
- Include troubleshooting guide
|
|
49
|
+
|
|
50
|
+
### Maintenance
|
|
51
|
+
|
|
52
|
+
- Keep version updated
|
|
53
|
+
- Test after tool updates
|
|
54
|
+
- Monitor user feedback
|
|
55
|
+
- Iterate on descriptions
|
|
56
|
+
|
|
57
|
+
## Performance Tips
|
|
58
|
+
|
|
59
|
+
- Scope skills to specific domains
|
|
60
|
+
- Avoid overlapping trigger phrases
|
|
61
|
+
- Keep descriptions under 1024 chars
|
|
62
|
+
- Test activation reliability
|
|
63
|
+
|
|
64
|
+
## Security Considerations
|
|
65
|
+
|
|
66
|
+
- Never include secrets in skill files
|
|
67
|
+
- Validate all inputs
|
|
68
|
+
- Use read-only tools when possible
|
|
69
|
+
- Document security requirements
|