@poolzin/pool-bot 2026.3.7 → 2026.3.10
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/CHANGELOG.md +40 -0
- package/README.md +147 -69
- package/dist/.buildstamp +1 -1
- package/dist/agents/error-classifier.js +251 -0
- package/dist/agents/skills/security.js +211 -0
- package/dist/build-info.json +3 -3
- package/dist/cli/cron-cli/register.cron-dashboard.js +339 -0
- package/dist/cli/cron-cli/register.js +2 -0
- package/dist/cli/errors.js +187 -0
- package/dist/cli/lazy-commands.example.js +113 -0
- package/dist/cli/lazy-commands.js +329 -0
- package/dist/cli/program/command-registry.js +26 -0
- package/dist/cli/program/register.maintenance.js +21 -0
- package/dist/cli/program/register.skills.js +4 -0
- package/dist/cli/program/register.subclis.js +9 -0
- package/dist/cli/swarm-cli/register.js +8 -0
- package/dist/cli/swarm-cli/register.swarm-status.js +488 -0
- package/dist/cli/telemetry-cli/register.js +10 -0
- package/dist/cli/telemetry-cli/register.telemetry-alerts.js +176 -0
- package/dist/cli/telemetry-cli/register.telemetry-metrics.js +323 -0
- package/dist/cli/telemetry-cli/register.telemetry-status.js +179 -0
- package/dist/commands/doctor-checks.js +498 -0
- package/dist/config/config.js +1 -0
- package/dist/config/secrets-integration.js +88 -0
- package/dist/context-engine/index.js +33 -0
- package/dist/context-engine/legacy.js +179 -0
- package/dist/context-engine/registry.js +86 -0
- package/dist/context-engine/summarizing.js +290 -0
- package/dist/context-engine/types.js +7 -0
- package/dist/cron/service/timer.js +18 -0
- package/dist/gateway/protocol/index.js +5 -2
- package/dist/gateway/protocol/schema/error-codes.js +1 -0
- package/dist/gateway/protocol/schema/swarm.js +80 -0
- package/dist/gateway/protocol/schema.js +1 -0
- package/dist/gateway/server-close.js +4 -0
- package/dist/gateway/server-constants.js +1 -0
- package/dist/gateway/server-cron.js +29 -0
- package/dist/gateway/server-maintenance.js +35 -2
- package/dist/gateway/server-methods/swarm.js +58 -0
- package/dist/gateway/server-methods/telemetry.js +71 -0
- package/dist/gateway/server-methods-list.js +8 -0
- package/dist/gateway/server-methods.js +9 -2
- package/dist/gateway/server.impl.js +33 -16
- package/dist/infra/abort-pattern.js +106 -0
- package/dist/infra/retry.js +96 -0
- package/dist/secrets/index.js +28 -0
- package/dist/secrets/resolver.js +185 -0
- package/dist/secrets/runtime.js +142 -0
- package/dist/secrets/types.js +11 -0
- package/dist/security/dangerous-tools.js +80 -0
- package/dist/security/types.js +12 -0
- package/dist/skills/commands.js +333 -0
- package/dist/skills/index.js +164 -0
- package/dist/skills/loader.js +282 -0
- package/dist/skills/parser.js +446 -0
- package/dist/skills/registry.js +394 -0
- package/dist/skills/security.js +312 -0
- package/dist/skills/types.js +21 -0
- package/dist/swarm/service.js +247 -0
- package/dist/telemetry/alert-engine.js +258 -0
- package/dist/telemetry/cron-instrumentation.js +49 -0
- package/dist/telemetry/gateway-instrumentation.js +80 -0
- package/dist/telemetry/instrumentation.js +66 -0
- package/dist/telemetry/service.js +345 -0
- package/dist/test-utils/index.js +219 -0
- package/dist/tui/components/assistant-message.js +6 -2
- package/dist/tui/components/hyperlink-markdown.js +32 -0
- package/dist/tui/components/searchable-select-list.js +12 -1
- package/dist/tui/components/user-message.js +6 -2
- package/dist/tui/index.js +611 -0
- package/dist/tui/theme/theme-detection.js +226 -0
- package/dist/tui/tui-command-handlers.js +20 -0
- package/dist/tui/tui-formatters.js +4 -3
- package/dist/tui/utils/ctrl-c-handler.js +67 -0
- package/dist/tui/utils/osc8-hyperlinks.js +208 -0
- package/dist/tui/utils/safe-stop.js +180 -0
- package/dist/tui/utils/session-key-utils.js +81 -0
- package/dist/tui/utils/text-sanitization.js +284 -0
- package/dist/utils/lru-cache.js +116 -0
- package/dist/utils/performance.js +199 -0
- package/dist/utils/retry.js +240 -0
- package/docs/INTEGRATION_PLAN.md +475 -0
- package/docs/INTEGRATION_SUMMARY.md +215 -0
- package/docs/MELHORIAS_IMPLEMENTADAS.md +228 -0
- package/docs/MELHORIAS_PROFISSIONAIS.md +282 -0
- package/docs/PLANO_ACAO_TUI.md +357 -0
- package/docs/PROGRESSO_TUI.md +66 -0
- package/docs/RELATORIO_FINAL.md +217 -0
- package/docs/diagnostico-shell-completion.md +265 -0
- package/docs/features/advanced-memory.md +585 -0
- package/docs/features/discord-components-v2.md +277 -0
- package/docs/features/swarm.md +100 -0
- package/docs/features/telemetry.md +284 -0
- package/docs/integrations/HEXSTRIKE_PLAN.md +796 -0
- package/docs/integrations/INTEGRATION_PLAN.md +744 -0
- package/docs/integrations/PAGE_AGENT_PLAN.md +370 -0
- package/docs/integrations/XYOPS_PLAN.md +978 -0
- package/docs/models/provider-infrastructure.md +400 -0
- package/docs/security/exec-approvals.md +294 -0
- package/docs/skills/IMPLEMENTATION_SUMMARY.md +145 -0
- package/docs/skills/SKILL.md +524 -0
- package/docs/skills.md +405 -0
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hexstrike-bridge/README.md +119 -0
- package/extensions/hexstrike-bridge/index.test.ts +247 -0
- package/extensions/hexstrike-bridge/index.ts +487 -0
- package/extensions/hexstrike-bridge/package.json +17 -0
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +5 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/mcp-server/index.ts +14 -0
- package/extensions/mcp-server/package.json +11 -0
- package/extensions/mcp-server/src/service.ts +540 -0
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +5 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +5 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai-codex-auth/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +5 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +5 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +5 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +5 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +8 -1
- package/skills/example-skill/SKILL.md +195 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# PoolBot Skills System - Implementation Summary
|
|
2
|
+
|
|
3
|
+
## Completed Work
|
|
4
|
+
|
|
5
|
+
### Phase 1: Core Skills System ✅
|
|
6
|
+
|
|
7
|
+
We have successfully implemented a complete modular skill management system in `src/skills/` with the following components:
|
|
8
|
+
|
|
9
|
+
| File | Purpose | Lines | Status |
|
|
10
|
+
|------|---------|-------|--------|
|
|
11
|
+
| `types.ts` | Type definitions (agentskills.io compatible) | 287 | ✅ Complete |
|
|
12
|
+
| `parser.ts` | SKILL.md parser with YAML frontmatter | 211 | ✅ Complete |
|
|
13
|
+
| `registry.ts` | Skills registry with EventEmitter | 205 | ✅ Complete |
|
|
14
|
+
| `loader.ts` | Progressive disclosure loader | 284 | ✅ Complete |
|
|
15
|
+
| `security.ts` | Security scanner (prompt injection, etc.) | 287 | ✅ Complete |
|
|
16
|
+
| `commands.ts` | CLI commands (`poolbot mods`) | 462 | ✅ Complete |
|
|
17
|
+
| `index.ts` | Public API exports | 295 | ✅ Complete |
|
|
18
|
+
| `index.test.ts` | Comprehensive tests | 803 | ✅ 52/52 Passing |
|
|
19
|
+
|
|
20
|
+
### Key Features Implemented
|
|
21
|
+
|
|
22
|
+
1. **SKILL.md Parser**
|
|
23
|
+
- YAML frontmatter parsing
|
|
24
|
+
- Section-based content extraction
|
|
25
|
+
- Linked file resolution
|
|
26
|
+
- Metadata validation
|
|
27
|
+
|
|
28
|
+
2. **Skills Registry**
|
|
29
|
+
- CRUD operations for skills
|
|
30
|
+
- Event-driven architecture
|
|
31
|
+
- Search with filtering
|
|
32
|
+
- Statistics and health monitoring
|
|
33
|
+
|
|
34
|
+
3. **Progressive Disclosure Loader**
|
|
35
|
+
- Multiple disclosure levels: `metadata`, `summary`, `standard`, `full`
|
|
36
|
+
- Token-aware content loading
|
|
37
|
+
- Query-based content selection
|
|
38
|
+
- Linked file inclusion
|
|
39
|
+
|
|
40
|
+
4. **Security Scanner**
|
|
41
|
+
- Prompt injection detection
|
|
42
|
+
- Command injection detection
|
|
43
|
+
- Path traversal detection
|
|
44
|
+
- Hardcoded credential detection
|
|
45
|
+
- Pattern-based vulnerability scanning
|
|
46
|
+
|
|
47
|
+
5. **CLI Commands**
|
|
48
|
+
- `poolbot mods list` - List all skills
|
|
49
|
+
- `poolbot mods view <id>` - View skill details
|
|
50
|
+
- `poolbot mods search <query>` - Search skills
|
|
51
|
+
- `poolbot mods enable <id>` - Enable a skill
|
|
52
|
+
- `poolbot mods disable <id>` - Disable a skill
|
|
53
|
+
- `poolbot mods scan` - Scan for new skills
|
|
54
|
+
- `poolbot mods stats` - Show statistics
|
|
55
|
+
|
|
56
|
+
### Test Coverage
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
✓ Parser (13 tests)
|
|
60
|
+
- YAML parsing
|
|
61
|
+
- Metadata validation
|
|
62
|
+
- Skill file detection
|
|
63
|
+
|
|
64
|
+
✓ Registry (17 tests)
|
|
65
|
+
- Scanning
|
|
66
|
+
- CRUD operations
|
|
67
|
+
- Enable/disable
|
|
68
|
+
- Search
|
|
69
|
+
- Statistics
|
|
70
|
+
- Events
|
|
71
|
+
|
|
72
|
+
✓ Loader (10 tests)
|
|
73
|
+
- Disclosure levels
|
|
74
|
+
- Context preparation
|
|
75
|
+
- Token limits
|
|
76
|
+
- Linked files
|
|
77
|
+
- Query-based loading
|
|
78
|
+
|
|
79
|
+
✓ Security (10 tests)
|
|
80
|
+
- Full scanning
|
|
81
|
+
- Quick checks
|
|
82
|
+
- Summary generation
|
|
83
|
+
|
|
84
|
+
✓ Integration (2 tests)
|
|
85
|
+
- Full workflow
|
|
86
|
+
- Security workflow
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Build Status
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
$ pnpm build
|
|
93
|
+
✅ TypeScript compilation successful
|
|
94
|
+
✅ All build steps completed
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Integration Architecture Plan
|
|
98
|
+
|
|
99
|
+
Created comprehensive integration plan at `docs/integrations/INTEGRATION_PLAN.md` covering:
|
|
100
|
+
|
|
101
|
+
1. **Page Agent Integration** - Browser automation enhancement
|
|
102
|
+
2. **HexStrike AI Integration** - Security platform (150+ tools)
|
|
103
|
+
3. **xyOps Integration** - Workflow automation platform
|
|
104
|
+
|
|
105
|
+
The plan includes:
|
|
106
|
+
- Architecture diagrams
|
|
107
|
+
- Implementation phases (6 weeks)
|
|
108
|
+
- Configuration schemas
|
|
109
|
+
- Security considerations
|
|
110
|
+
- Risk mitigation strategies
|
|
111
|
+
|
|
112
|
+
### Files Created
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
src/skills/
|
|
116
|
+
├── types.ts # Core type definitions
|
|
117
|
+
├── parser.ts # SKILL.md parser
|
|
118
|
+
├── registry.ts # Skills registry
|
|
119
|
+
├── loader.ts # Progressive disclosure loader
|
|
120
|
+
├── security.ts # Security scanner
|
|
121
|
+
├── commands.ts # CLI commands
|
|
122
|
+
├── index.ts # Public API
|
|
123
|
+
└── index.test.ts # Tests
|
|
124
|
+
|
|
125
|
+
docs/skills/
|
|
126
|
+
└── SKILL.md # Skill authoring guide
|
|
127
|
+
|
|
128
|
+
docs/integrations/
|
|
129
|
+
└── INTEGRATION_PLAN.md # Integration architecture plan
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Next Steps
|
|
133
|
+
|
|
134
|
+
The skills system is production-ready. To proceed with integrations:
|
|
135
|
+
|
|
136
|
+
1. Review `docs/integrations/INTEGRATION_PLAN.md`
|
|
137
|
+
2. Prioritize which integration to implement first
|
|
138
|
+
3. Begin Phase 1 of the integration plan
|
|
139
|
+
|
|
140
|
+
### Notes
|
|
141
|
+
|
|
142
|
+
- Context engine integration was removed to avoid circular dependencies
|
|
143
|
+
- This will be implemented in a future phase as a separate module
|
|
144
|
+
- All existing PoolBot functionality remains intact
|
|
145
|
+
- No breaking changes introduced
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: poolbot-skills-system
|
|
3
|
+
name: PoolBot Skills System
|
|
4
|
+
description: |
|
|
5
|
+
Comprehensive documentation for the PoolBot skills system.
|
|
6
|
+
Covers creating, managing, and using skills with the new modular architecture.
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
author: PoolBot Team
|
|
9
|
+
categories:
|
|
10
|
+
- documentation
|
|
11
|
+
- skills
|
|
12
|
+
tags:
|
|
13
|
+
- reference
|
|
14
|
+
- guide
|
|
15
|
+
metadata:
|
|
16
|
+
poolbot:
|
|
17
|
+
emoji: 📖
|
|
18
|
+
always: false
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# PoolBot Skills System
|
|
22
|
+
|
|
23
|
+
The PoolBot Skills System provides a modular way to extend PoolBot's capabilities through declarative SKILL.md files.
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
Skills are self-contained capabilities defined in markdown files following the [agentskills.io](https://agentskills.io) specification. They support:
|
|
28
|
+
|
|
29
|
+
- **Progressive Disclosure**: Content loads incrementally (metadata → summary → full)
|
|
30
|
+
- **Security Scanning**: Automatic detection of prompt injection, command injection, etc.
|
|
31
|
+
- **Context Integration**: Skills can be injected into LLM prompts
|
|
32
|
+
- **CLI Management**: List, search, enable/disable skills via `poolbot mods`
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### Listing Skills
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# List all skills
|
|
40
|
+
poolbot mods list
|
|
41
|
+
|
|
42
|
+
# Filter by category
|
|
43
|
+
poolbot mods list --category=productivity
|
|
44
|
+
|
|
45
|
+
# Show only enabled/disabled
|
|
46
|
+
poolbot mods list --enabled
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Viewing Skills
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# View skill summary (default)
|
|
53
|
+
poolbot mods view coding-agent
|
|
54
|
+
|
|
55
|
+
# View full content
|
|
56
|
+
poolbot mods view coding-agent --full
|
|
57
|
+
|
|
58
|
+
# View just metadata
|
|
59
|
+
poolbot mods view coding-agent --metadata
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Searching Skills
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Search by text
|
|
66
|
+
poolbot mods search git
|
|
67
|
+
|
|
68
|
+
# Search with filters
|
|
69
|
+
poolbot mods search api --category=development
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Managing Skills
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Enable a skill
|
|
76
|
+
poolbot mods enable github
|
|
77
|
+
|
|
78
|
+
# Disable a skill
|
|
79
|
+
poolbot mods disable spotify
|
|
80
|
+
|
|
81
|
+
# Security scan
|
|
82
|
+
poolbot mods scan
|
|
83
|
+
|
|
84
|
+
# Statistics
|
|
85
|
+
poolbot mods stats
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Creating Skills
|
|
89
|
+
|
|
90
|
+
### File Structure
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
skills/
|
|
94
|
+
└── my-skill/
|
|
95
|
+
└── SKILL.md # Main skill definition
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### SKILL.md Format
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
---
|
|
102
|
+
id: my-skill # Unique kebab-case identifier
|
|
103
|
+
name: My Skill # Human-readable name
|
|
104
|
+
description: | # Multi-line description
|
|
105
|
+
What this skill does.
|
|
106
|
+
Can span multiple lines.
|
|
107
|
+
version: 1.0.0 # Semver version
|
|
108
|
+
author: Your Name # Author attribution
|
|
109
|
+
categories: # Classification
|
|
110
|
+
- category1
|
|
111
|
+
- category2
|
|
112
|
+
tags: # Searchable tags
|
|
113
|
+
- tag1
|
|
114
|
+
- tag2
|
|
115
|
+
metadata:
|
|
116
|
+
poolbot: # PoolBot-specific settings
|
|
117
|
+
emoji: 🚀
|
|
118
|
+
always: false # Load on every session?
|
|
119
|
+
requires: # Dependencies
|
|
120
|
+
bins: [gh, jq]
|
|
121
|
+
env: [GITHUB_TOKEN]
|
|
122
|
+
install: # Auto-install specs
|
|
123
|
+
- kind: brew
|
|
124
|
+
formula: gh
|
|
125
|
+
bins: [gh]
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
# My Skill
|
|
129
|
+
|
|
130
|
+
## When to Use
|
|
131
|
+
|
|
132
|
+
✅ **USE this skill when:**
|
|
133
|
+
- Condition 1
|
|
134
|
+
- Condition 2
|
|
135
|
+
|
|
136
|
+
❌ **DON'T use this skill when:**
|
|
137
|
+
- Condition 3
|
|
138
|
+
- Condition 4
|
|
139
|
+
|
|
140
|
+
## Overview
|
|
141
|
+
|
|
142
|
+
Description of what this skill does.
|
|
143
|
+
|
|
144
|
+
## Common Commands
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Example command
|
|
148
|
+
command here
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Templates
|
|
152
|
+
|
|
153
|
+
Provide reusable templates.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Required Sections
|
|
157
|
+
|
|
158
|
+
1. **Frontmatter** (YAML between `---` markers)
|
|
159
|
+
2. **When to Use** - Clear usage guidelines
|
|
160
|
+
3. **Overview** - What the skill does
|
|
161
|
+
|
|
162
|
+
### Optional Sections
|
|
163
|
+
|
|
164
|
+
- **Common Commands** - Practical examples
|
|
165
|
+
- **Templates** - Reusable code snippets
|
|
166
|
+
- **Configuration** - Setup instructions
|
|
167
|
+
- **Troubleshooting** - Common issues
|
|
168
|
+
|
|
169
|
+
## Security
|
|
170
|
+
|
|
171
|
+
Skills are automatically scanned for:
|
|
172
|
+
|
|
173
|
+
- **Prompt injection** attempts
|
|
174
|
+
- **Command injection** patterns
|
|
175
|
+
- **Path traversal** attacks
|
|
176
|
+
- **Hardcoded credentials**
|
|
177
|
+
- **Suspicious encoding**
|
|
178
|
+
- **Data exfiltration** endpoints
|
|
179
|
+
|
|
180
|
+
### Security Levels
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
enum SecurityLevel {
|
|
184
|
+
STRICT = "strict", // Reject any suspicious patterns
|
|
185
|
+
BALANCED = "balanced", // Warn but allow with review
|
|
186
|
+
PERMISSIVE = "permissive" // Minimal checks
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Best Practices
|
|
191
|
+
|
|
192
|
+
1. Never include hardcoded credentials
|
|
193
|
+
2. Use environment variables for secrets
|
|
194
|
+
3. Validate all user inputs
|
|
195
|
+
4. Review skills before enabling
|
|
196
|
+
5. Run `poolbot mods scan` regularly
|
|
197
|
+
|
|
198
|
+
## Progressive Disclosure
|
|
199
|
+
|
|
200
|
+
Skills load content incrementally to manage token usage:
|
|
201
|
+
|
|
202
|
+
### Disclosure Levels
|
|
203
|
+
|
|
204
|
+
1. **Metadata** (~50-200 tokens)
|
|
205
|
+
- ID, name, description
|
|
206
|
+
- Categories and tags
|
|
207
|
+
- Basic info
|
|
208
|
+
|
|
209
|
+
2. **Summary** (~200-1000 tokens)
|
|
210
|
+
- "When to Use" section
|
|
211
|
+
- "Overview" section
|
|
212
|
+
- Key commands
|
|
213
|
+
|
|
214
|
+
3. **Full** (all content)
|
|
215
|
+
- Complete markdown
|
|
216
|
+
- All sections
|
|
217
|
+
- Linked files
|
|
218
|
+
|
|
219
|
+
### Loading for Queries
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
// Load skills relevant to a query
|
|
223
|
+
const skills = await loader.loadForQuery("How do I create a GitHub PR?", {
|
|
224
|
+
maxSkills: 3,
|
|
225
|
+
maxTokens: 2000
|
|
226
|
+
});
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Context Integration
|
|
230
|
+
|
|
231
|
+
Skills can be injected into LLM prompts:
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
import { prepareSkillsForContext } from "./skills/index.js";
|
|
235
|
+
|
|
236
|
+
// Prepare skills for context injection
|
|
237
|
+
const context = await prepareSkillsForContext({
|
|
238
|
+
skillIds: ["github", "git"],
|
|
239
|
+
disclosure: "summary",
|
|
240
|
+
maxTokens: 2000
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// Inject into prompt
|
|
244
|
+
const prompt = `${context}\n\nUser: How do I create a PR?`;
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Auto-Loading
|
|
248
|
+
|
|
249
|
+
Skills with `metadata.poolbot.always: true` are automatically loaded in every session.
|
|
250
|
+
|
|
251
|
+
## CLI Reference
|
|
252
|
+
|
|
253
|
+
### Commands
|
|
254
|
+
|
|
255
|
+
| Command | Description |
|
|
256
|
+
|---------|-------------|
|
|
257
|
+
| `poolbot mods list` | List all skills |
|
|
258
|
+
| `poolbot mods view <id>` | View skill details |
|
|
259
|
+
| `poolbot mods search <query>` | Search skills |
|
|
260
|
+
| `poolbot mods enable <id>` | Enable a skill |
|
|
261
|
+
| `poolbot mods disable <id>` | Disable a skill |
|
|
262
|
+
| `poolbot mods scan [path]` | Security scan |
|
|
263
|
+
| `poolbot mods stats` | Show statistics |
|
|
264
|
+
|
|
265
|
+
### Options
|
|
266
|
+
|
|
267
|
+
**List:**
|
|
268
|
+
- `--category <cat>` - Filter by category
|
|
269
|
+
- `--tag <tag>` - Filter by tag
|
|
270
|
+
- `--enabled` - Show only enabled
|
|
271
|
+
- `--disabled` - Show only disabled
|
|
272
|
+
|
|
273
|
+
**View:**
|
|
274
|
+
- `--metadata` - Show only metadata
|
|
275
|
+
- `--summary` - Show metadata + summary
|
|
276
|
+
- `--full` - Show full content
|
|
277
|
+
|
|
278
|
+
**Search:**
|
|
279
|
+
- `--category <cat>` - Filter by category
|
|
280
|
+
- `--tag <tag>` - Filter by tag
|
|
281
|
+
|
|
282
|
+
## Architecture
|
|
283
|
+
|
|
284
|
+
### Components
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
skills/
|
|
288
|
+
├── types.ts # Type definitions
|
|
289
|
+
├── parser.ts # SKILL.md parser
|
|
290
|
+
├── registry.ts # Skills registry
|
|
291
|
+
├── loader.ts # Progressive disclosure loader
|
|
292
|
+
├── security.ts # Security scanner
|
|
293
|
+
├── commands.ts # CLI commands
|
|
294
|
+
└── index.ts # Public API
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Data Flow
|
|
298
|
+
|
|
299
|
+
1. **Discovery**: Registry scans `skills/` directory
|
|
300
|
+
2. **Parsing**: Parser extracts metadata and content
|
|
301
|
+
3. **Security**: Scanner checks for vulnerabilities
|
|
302
|
+
4. **Loading**: Loader provides progressive disclosure
|
|
303
|
+
5. **Integration**: Skills injected into context
|
|
304
|
+
|
|
305
|
+
### Registry Events
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
registry.on("skillLoaded", ({ skill }) => {
|
|
309
|
+
console.log(`Loaded: ${skill.name}`);
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
registry.on("skillEnabled", ({ skillId }) => {
|
|
313
|
+
console.log(`Enabled: ${skillId}`);
|
|
314
|
+
});
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## API Reference
|
|
318
|
+
|
|
319
|
+
### Types
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
interface Skill {
|
|
323
|
+
id: string;
|
|
324
|
+
name: string;
|
|
325
|
+
description: string;
|
|
326
|
+
version: string;
|
|
327
|
+
author?: string;
|
|
328
|
+
categories: string[];
|
|
329
|
+
tags: string[];
|
|
330
|
+
metadata?: SkillMetadata;
|
|
331
|
+
content: SkillContent;
|
|
332
|
+
source: SkillSource;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
interface SkillContent {
|
|
336
|
+
full: string;
|
|
337
|
+
summary?: string;
|
|
338
|
+
sections: SkillSection[];
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Functions
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
// Initialize
|
|
346
|
+
import { initSkills } from "./skills/index.js";
|
|
347
|
+
await initSkills();
|
|
348
|
+
|
|
349
|
+
// Registry
|
|
350
|
+
import { getRegistry } from "./skills/index.js";
|
|
351
|
+
const registry = getRegistry();
|
|
352
|
+
|
|
353
|
+
// Loading
|
|
354
|
+
import { createSkillLoader } from "./skills/index.js";
|
|
355
|
+
const loader = createSkillLoader(registry);
|
|
356
|
+
|
|
357
|
+
// Security
|
|
358
|
+
import { scanSkill } from "./skills/index.js";
|
|
359
|
+
const report = await scanSkill(skill);
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Examples
|
|
363
|
+
|
|
364
|
+
### Basic Skill
|
|
365
|
+
|
|
366
|
+
```markdown
|
|
367
|
+
---
|
|
368
|
+
id: hello-world
|
|
369
|
+
name: Hello World
|
|
370
|
+
description: A simple example skill
|
|
371
|
+
version: 1.0.0
|
|
372
|
+
categories:
|
|
373
|
+
- examples
|
|
374
|
+
tags:
|
|
375
|
+
- demo
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
# Hello World
|
|
379
|
+
|
|
380
|
+
## When to Use
|
|
381
|
+
|
|
382
|
+
Use this skill to learn the basics.
|
|
383
|
+
|
|
384
|
+
## Overview
|
|
385
|
+
|
|
386
|
+
This is a minimal example.
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Skill with Dependencies
|
|
390
|
+
|
|
391
|
+
```markdown
|
|
392
|
+
---
|
|
393
|
+
id: github-pr
|
|
394
|
+
name: GitHub PR Helper
|
|
395
|
+
description: Create and manage GitHub PRs
|
|
396
|
+
version: 1.2.0
|
|
397
|
+
categories:
|
|
398
|
+
- development
|
|
399
|
+
- git
|
|
400
|
+
tags:
|
|
401
|
+
- github
|
|
402
|
+
- pr
|
|
403
|
+
- automation
|
|
404
|
+
metadata:
|
|
405
|
+
poolbot:
|
|
406
|
+
emoji: 🔄
|
|
407
|
+
requires:
|
|
408
|
+
bins: [gh]
|
|
409
|
+
env: [GITHUB_TOKEN]
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
# GitHub PR Helper
|
|
413
|
+
|
|
414
|
+
## When to Use
|
|
415
|
+
|
|
416
|
+
✅ Creating PRs, reviewing code, managing branches
|
|
417
|
+
❌ Non-Git repositories
|
|
418
|
+
|
|
419
|
+
## Overview
|
|
420
|
+
|
|
421
|
+
Streamlines GitHub PR workflows.
|
|
422
|
+
|
|
423
|
+
## Common Commands
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
# Create PR
|
|
427
|
+
gh pr create --title "feat: add feature" --body "Description"
|
|
428
|
+
|
|
429
|
+
# List PRs
|
|
430
|
+
gh pr list
|
|
431
|
+
```
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### Skill with Linked Files
|
|
435
|
+
|
|
436
|
+
```markdown
|
|
437
|
+
---
|
|
438
|
+
id: advanced-api
|
|
439
|
+
name: Advanced API
|
|
440
|
+
description: Complex API integration
|
|
441
|
+
version: 2.0.0
|
|
442
|
+
categories:
|
|
443
|
+
- api
|
|
444
|
+
tags:
|
|
445
|
+
- advanced
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
# Advanced API
|
|
449
|
+
|
|
450
|
+
See [Authentication](./auth.md) for setup.
|
|
451
|
+
Check [Examples](./examples/) for more.
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
## Troubleshooting
|
|
455
|
+
|
|
456
|
+
### Skill Not Found
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Check if file exists
|
|
460
|
+
ls skills/my-skill/SKILL.md
|
|
461
|
+
|
|
462
|
+
# Verify frontmatter
|
|
463
|
+
head -20 skills/my-skill/SKILL.md
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Parse Errors
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
# Validate YAML frontmatter
|
|
470
|
+
poolbot mods scan skills/my-skill
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Security Warnings
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# Review security report
|
|
477
|
+
poolbot mods scan skills/my-skill --verbose
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
## Migration Guide
|
|
481
|
+
|
|
482
|
+
### From Legacy Skills
|
|
483
|
+
|
|
484
|
+
1. Rename `skill.md` to `SKILL.md`
|
|
485
|
+
2. Add YAML frontmatter
|
|
486
|
+
3. Update to agentskills.io format
|
|
487
|
+
4. Run security scan
|
|
488
|
+
5. Test with `poolbot mods view`
|
|
489
|
+
|
|
490
|
+
## Best Practices
|
|
491
|
+
|
|
492
|
+
1. **Clear IDs**: Use descriptive kebab-case IDs
|
|
493
|
+
2. **Versioning**: Use semantic versioning
|
|
494
|
+
3. **Categories**: Choose from standard categories
|
|
495
|
+
4. **Tags**: Add relevant searchable tags
|
|
496
|
+
5. **When to Use**: Always define clear usage guidelines
|
|
497
|
+
6. **Security**: Review before enabling
|
|
498
|
+
7. **Testing**: Test skills in isolation
|
|
499
|
+
|
|
500
|
+
## Standard Categories
|
|
501
|
+
|
|
502
|
+
- `api` - API integrations
|
|
503
|
+
- `automation` - Task automation
|
|
504
|
+
- `communication` - Messaging, email
|
|
505
|
+
- `data` - Data processing
|
|
506
|
+
- `development` - Coding, Git, dev tools
|
|
507
|
+
- `media` - Images, audio, video
|
|
508
|
+
- `productivity` - Task management
|
|
509
|
+
- `system` - System administration
|
|
510
|
+
- `web` - Web scraping, browsing
|
|
511
|
+
|
|
512
|
+
## Contributing
|
|
513
|
+
|
|
514
|
+
1. Create skill in `skills/`
|
|
515
|
+
2. Follow format guidelines
|
|
516
|
+
3. Run security scan
|
|
517
|
+
4. Test thoroughly
|
|
518
|
+
5. Submit PR
|
|
519
|
+
|
|
520
|
+
## Resources
|
|
521
|
+
|
|
522
|
+
- [agentskills.io](https://agentskills.io) - Specification
|
|
523
|
+
- `skills/example-skill/` - Template
|
|
524
|
+
- `src/skills/` - Implementation
|