@trusted-ai/xbot 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.txt +21 -0
- package/README.md +214 -0
- package/bin/xbot.js +50 -0
- package/docs/ARCHITECTURE.md +161 -0
- package/docs/HYBRID_MODELS.md +156 -0
- package/docs/INSTALLATION.md +78 -0
- package/docs/OPERATIONS.md +211 -0
- package/docs/USAGE.md +1002 -0
- package/docs/xbot.png +0 -0
- package/package.json +53 -0
- package/scripts/install.js +123 -0
- package/skills/README.md +10 -0
- package/skills/clawhub/SKILL.md +71 -0
- package/skills/cron/SKILL.md +64 -0
- package/skills/data-analyst/SKILL.md +31 -0
- package/skills/delivery-rules/SKILL.md +23 -0
- package/skills/github/SKILL.md +99 -0
- package/skills/github-cli/SKILL.md +35 -0
- package/skills/memory/SKILL.md +70 -0
- package/skills/memory-entry-writer/SKILL.md +26 -0
- package/skills/memory-hygiene/SKILL.md +34 -0
- package/skills/project-context/SKILL.md +23 -0
- package/skills/project-init/SKILL.md +84 -0
- package/skills/scheduled-ops/SKILL.md +24 -0
- package/skills/skill-creator/SKILL.md +202 -0
- package/skills/software-engineer/SKILL.md +44 -0
- package/skills/summarize/SKILL.md +72 -0
- package/skills/tmux/SKILL.md +122 -0
- package/skills/weather/SKILL.md +54 -0
- package/skills/workspace-operator/SKILL.md +24 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-init
|
|
3
|
+
description: "Analyze a project workspace and generate a comprehensive XBOT.md context file for all agent instances."
|
|
4
|
+
metadata: {"xbot":{"triggers":["init","initialize","project init","setup project"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Init
|
|
8
|
+
|
|
9
|
+
Generate or refresh the `XBOT.md` file at the workspace root. This file is the shared project-scope context that every agent instance loads automatically.
|
|
10
|
+
|
|
11
|
+
## When This Skill Is Used
|
|
12
|
+
|
|
13
|
+
This skill is invoked when the user sends `/init` or `init` (or the keyword `[init]`). The agent must analyze the full project and produce a concise, high-signal `XBOT.md`.
|
|
14
|
+
|
|
15
|
+
## Output Target
|
|
16
|
+
|
|
17
|
+
Write the result to `{workspace}/XBOT.md`. If the file already exists, overwrite it with a fresh analysis.
|
|
18
|
+
|
|
19
|
+
## XBOT.md Structure
|
|
20
|
+
|
|
21
|
+
The file MUST follow this structure and stay within **300 lines**:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
# {Project Name}
|
|
25
|
+
|
|
26
|
+
> One-line project summary.
|
|
27
|
+
|
|
28
|
+
## Tech Stack
|
|
29
|
+
- Language, framework, key libraries with versions
|
|
30
|
+
|
|
31
|
+
## Project Structure
|
|
32
|
+
- Top-level directory map with purpose of each directory
|
|
33
|
+
- Key files and their roles
|
|
34
|
+
|
|
35
|
+
## Architecture
|
|
36
|
+
- High-level component diagram (text-based)
|
|
37
|
+
- Data flow / request lifecycle
|
|
38
|
+
- Module boundaries and dependencies
|
|
39
|
+
|
|
40
|
+
## Key Components
|
|
41
|
+
- Core modules and their responsibilities
|
|
42
|
+
- Important traits / interfaces / abstractions
|
|
43
|
+
- Configuration system
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
### Build
|
|
47
|
+
- Build commands and prerequisites
|
|
48
|
+
### Test
|
|
49
|
+
- How to run tests, test structure
|
|
50
|
+
### Run
|
|
51
|
+
- How to start the application (all modes)
|
|
52
|
+
|
|
53
|
+
## Workflow
|
|
54
|
+
- Development workflow (branch strategy if visible)
|
|
55
|
+
- CI/CD if configured
|
|
56
|
+
- Deployment notes if available
|
|
57
|
+
|
|
58
|
+
## Key Facts
|
|
59
|
+
- Non-obvious conventions, gotchas, or constraints
|
|
60
|
+
- Important environment variables
|
|
61
|
+
- External service dependencies
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Rules
|
|
65
|
+
|
|
66
|
+
1. **300-line hard limit** — prioritize signal density over completeness.
|
|
67
|
+
2. **Accuracy over speculation** — only include facts verifiable from the codebase. If uncertain, omit rather than guess.
|
|
68
|
+
3. **Concrete over abstract** — use actual file paths, actual command names, actual module names.
|
|
69
|
+
4. **Stable references** — prefer paths and identifiers that won't change between commits.
|
|
70
|
+
5. **No code blocks longer than 10 lines** — this is a map, not a mirror.
|
|
71
|
+
6. **Skip empty sections** — if a section has no verifiable content, omit it entirely.
|
|
72
|
+
|
|
73
|
+
## Analysis Procedure
|
|
74
|
+
|
|
75
|
+
1. Read the project root: `Cargo.toml`, `package.json`, `pyproject.toml`, `go.mod`, or equivalent to identify the tech stack.
|
|
76
|
+
2. List the top-level directory structure.
|
|
77
|
+
3. Identify and read key entry points (`main`, `lib`, `index`, `app`).
|
|
78
|
+
4. Trace the primary architecture: modules, traits/interfaces, data flow.
|
|
79
|
+
5. Read build/test/run configuration files.
|
|
80
|
+
6. Scan for CI/CD config (`.github/workflows/`, `Makefile`, `Dockerfile`, etc.).
|
|
81
|
+
7. Check for existing documentation (`README.md`, `docs/`, `ARCHITECTURE.md`).
|
|
82
|
+
8. Synthesize findings into the XBOT.md structure above.
|
|
83
|
+
9. Count lines — if over 300, compress the least critical sections.
|
|
84
|
+
10. Write the final `XBOT.md` to the workspace root.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scheduled-ops
|
|
3
|
+
description: "Recurring automation, cron-backed tasks, and unattended long-running bot operations."
|
|
4
|
+
metadata: {"xbot":{"triggers":["schedule","cron","timer","periodic"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scheduled Operations
|
|
8
|
+
|
|
9
|
+
Use this workflow for unattended recurring work.
|
|
10
|
+
|
|
11
|
+
## Guidance
|
|
12
|
+
|
|
13
|
+
- Prefer descriptive job names.
|
|
14
|
+
- Make the message payload self-contained so the task can run without conversational context.
|
|
15
|
+
- For recurring reports, state where the report should be written or delivered.
|
|
16
|
+
- Avoid scheduling jobs from inside another cron execution unless the workflow explicitly requires it.
|
|
17
|
+
|
|
18
|
+
## Good Recurring Tasks
|
|
19
|
+
|
|
20
|
+
- repository health checks
|
|
21
|
+
- daily research reports
|
|
22
|
+
- backlog triage summaries
|
|
23
|
+
- dependency update scans
|
|
24
|
+
- regular status notifications
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-creator
|
|
3
|
+
description: Create or update xbot Agent Skills (SKILL.md format, metadata, layout, validation). Use when designing skills, authoring frontmatter, or packaging scripts, references, and assets.
|
|
4
|
+
metadata: {"xbot":{"emoji":"🛠️","triggers":["skill","skill creator","SKILL.md","frontmatter","metadata","packaging","agent skill"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Creator (xbot)
|
|
8
|
+
|
|
9
|
+
This skill guides creation of **xbot** skills: modular packages that extend the agent with workflows, tool usage, and domain knowledge.
|
|
10
|
+
|
|
11
|
+
## About Skills
|
|
12
|
+
|
|
13
|
+
Skills are self-contained directories with a required `SKILL.md`. They act as onboarding for specific tasks—procedural knowledge the model should not have to rediscover each time.
|
|
14
|
+
|
|
15
|
+
### What Skills Provide
|
|
16
|
+
|
|
17
|
+
1. **Workflows** — Multi-step procedures for a domain
|
|
18
|
+
2. **Tool integrations** — CLIs, APIs, file formats
|
|
19
|
+
3. **Domain expertise** — Project or org-specific rules
|
|
20
|
+
4. **Bundled resources** — Optional `scripts/`, `references/`, `assets/`
|
|
21
|
+
|
|
22
|
+
### Core Principle: Concise Is Key
|
|
23
|
+
|
|
24
|
+
The context window is shared with the system prompt, history, other skills, and the user request. **Default assumption: the agent is already capable.** Only add what is non-obvious or procedural. Prefer short examples over long prose.
|
|
25
|
+
|
|
26
|
+
### Degrees of Freedom
|
|
27
|
+
|
|
28
|
+
- **High** — Multiple valid approaches; use natural-language instructions
|
|
29
|
+
- **Medium** — Preferred pattern with parameters; pseudocode or parameterized scripts
|
|
30
|
+
- **Low** — Fragile or sequence-critical work; small scripts with few knobs
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## SKILL.md Format (YAML Frontmatter + Body)
|
|
35
|
+
|
|
36
|
+
Every `SKILL.md` **must** start with YAML between `---` delimiters, then Markdown body.
|
|
37
|
+
|
|
38
|
+
### Required keys
|
|
39
|
+
|
|
40
|
+
| Key | Meaning |
|
|
41
|
+
|-----|---------|
|
|
42
|
+
| `name` | Skill identifier. **Must match the parent directory name** (e.g. `my-skill` for `skills/my-skill/`). Lowercase letters, digits, hyphens only; ≤64 characters; no leading/trailing/double hyphens. |
|
|
43
|
+
| `description` | **Primary triggering signal.** Short, concrete summary of what the skill does and *when* to use it. This text is what agents see in the skills summary before loading the body—put “when to use” phrasing here, not only in the body. |
|
|
44
|
+
|
|
45
|
+
### Optional keys
|
|
46
|
+
|
|
47
|
+
| Key | Meaning |
|
|
48
|
+
|-----|---------|
|
|
49
|
+
| `metadata` | JSON object (often a single line). See **xbot metadata** below. |
|
|
50
|
+
| `always` | Boolean. If `true`, skill is treated as always-on (same effect can be set inside `metadata.xbot`). |
|
|
51
|
+
| `allowed-tools` | Comma-separated tool names; restricts which tools may be used with this skill when the runtime enforces it. |
|
|
52
|
+
| `homepage` | URL for humans or docs (optional). |
|
|
53
|
+
|
|
54
|
+
Example minimal frontmatter:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
---
|
|
58
|
+
name: pdf-tools
|
|
59
|
+
description: Extract and redact text from PDFs. Use when the user works with .pdf files, scanned documents, or asks for PDF text extraction or redaction.
|
|
60
|
+
metadata: {"xbot":{"emoji":"📄","triggers":["pdf","extract text","redact"],"requires":{"bins":["pdftotext"]}}}
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## xbot `metadata` JSON
|
|
67
|
+
|
|
68
|
+
The `metadata` frontmatter value is JSON. xbot reads a **`xbot`** object first (fallbacks exist for other hosts; prefer `xbot` for this project).
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"xbot": {
|
|
73
|
+
"always": false,
|
|
74
|
+
"triggers": ["keyword1", "keyword2"],
|
|
75
|
+
"requires": {
|
|
76
|
+
"bins": ["curl", "gh"],
|
|
77
|
+
"env": ["GITHUB_TOKEN"],
|
|
78
|
+
"os": ["darwin", "linux"]
|
|
79
|
+
},
|
|
80
|
+
"emoji": "📎"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Fields
|
|
86
|
+
|
|
87
|
+
- **`always`** (boolean) — When true, the skill is included in the “always” set (e.g. workspace-wide guardrails). Can also be set with top-level YAML `always: true`.
|
|
88
|
+
- **`triggers`** (array of strings) — Used for **suggestion matching**: if the user prompt (lowercased) **contains** any trigger substring, the skill may be suggested. Short, distinctive phrases work better than generic words.
|
|
89
|
+
- **`requires`** (object):
|
|
90
|
+
- **`bins`** — CLI names that must exist on `PATH` for the skill to be marked available.
|
|
91
|
+
- **`env`** — Environment variable names that must be set.
|
|
92
|
+
- **`os`** — Allowed OS names (e.g. `darwin`, `linux`); current OS must match one if the array is non-empty.
|
|
93
|
+
- **`emoji`** (string) — Optional; for display or quick scanning in UIs.
|
|
94
|
+
|
|
95
|
+
Nested values in `requires` are merged for availability checks as implemented by xbot.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Triggering: Description First, Triggers Second
|
|
100
|
+
|
|
101
|
+
1. **`description`** is shown in the skills list for every skill. It is the **main** hook—state clearly what the skill does and **exact situations** (user phrasing) when it applies.
|
|
102
|
+
2. **`triggers`** add substring matches against the user message for ranking or suggestions; they do **not** replace a bad description.
|
|
103
|
+
|
|
104
|
+
**Anti-pattern:** Putting the only copy of “when to use” inside the Markdown body. The body loads **after** the agent already chose the skill; the description must stand alone for selection.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Progressive Disclosure
|
|
109
|
+
|
|
110
|
+
xbot uses a layered model:
|
|
111
|
+
|
|
112
|
+
1. **Summary** — `name`, `description`, availability/requirements (lightweight).
|
|
113
|
+
2. **SKILL.md body** — Loaded when the skill is relevant; keep under a few thousand words; split if needed.
|
|
114
|
+
3. **`scripts/` / `references/` / `assets/`** — Loaded or executed on demand; keeps the main file small.
|
|
115
|
+
|
|
116
|
+
**Patterns**
|
|
117
|
+
|
|
118
|
+
- Keep **one workflow overview** in `SKILL.md`; move long API tables to `references/api.md` and link to it.
|
|
119
|
+
- **Scripts** can be run without reading every line into context.
|
|
120
|
+
- **References** are for material the agent reads when a sub-task needs it.
|
|
121
|
+
- **Assets** are files used in outputs (templates, images), not necessarily loaded as text.
|
|
122
|
+
|
|
123
|
+
Avoid duplicating the same facts in both `SKILL.md` and a reference file—link instead.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Directory Layout
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
skill-name/
|
|
131
|
+
├── SKILL.md # required
|
|
132
|
+
├── scripts/ # optional; helper scripts
|
|
133
|
+
├── references/ # optional; docs, specs, long examples
|
|
134
|
+
└── assets/ # optional; templates, images, binaries for outputs
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Rules enforced by xbot validation:
|
|
138
|
+
|
|
139
|
+
- **Only** these subdirectories are allowed at the skill root; no other folders or stray files (except `SKILL.md`).
|
|
140
|
+
- **No symlinks** in the skill directory or under allowed subdirectories.
|
|
141
|
+
- **`name` in frontmatter must equal the directory name.**
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Naming Conventions
|
|
146
|
+
|
|
147
|
+
- Lowercase **letters, digits, hyphens** only.
|
|
148
|
+
- **≤ 64** characters.
|
|
149
|
+
- **Directory name = `name` field** = how the skill is loaded (e.g. `skills/github-cli/SKILL.md` → `name: github-cli`).
|
|
150
|
+
- Prefer short, verb-led or tool-qualified names (`gh-pr-review`, `csv-transform`).
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Validation Rules (Checklist)
|
|
155
|
+
|
|
156
|
+
Before treating a skill as complete, verify:
|
|
157
|
+
|
|
158
|
+
1. `SKILL.md` exists and is readable, not a symlink.
|
|
159
|
+
2. YAML frontmatter is delimited by `---` at the top of the file.
|
|
160
|
+
3. `name` is non-empty, valid characters, length ≤ 64, **matches folder name**.
|
|
161
|
+
4. `description` is non-empty.
|
|
162
|
+
5. No forbidden extra files at skill root; only `scripts/`, `references/`, `assets/` besides `SKILL.md`.
|
|
163
|
+
6. `metadata` JSON parses and `xbot` object shape is intentional.
|
|
164
|
+
|
|
165
|
+
xbot exposes `validate_skill(skill_dir)` in code for programmatic checks; fix any reported issues before shipping.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Creation Workflow (Manual)
|
|
170
|
+
|
|
171
|
+
1. **Examples** — Collect 2–3 real user requests that should hit this skill.
|
|
172
|
+
2. **Resources** — Decide if you need `scripts/`, `references/`, or `assets/`.
|
|
173
|
+
3. **Create directory** — `skills/<skill-name>/`.
|
|
174
|
+
4. **Write `SKILL.md`** — Frontmatter first (name, description, metadata); then concise body; link out to references.
|
|
175
|
+
5. **Test** — Run suggested flows; tighten description and triggers from misses.
|
|
176
|
+
6. **Iterate** — Adjust triggers and body from real usage.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## What Not to Add
|
|
181
|
+
|
|
182
|
+
Do not add README-only clutter at the skill root (`README.md`, `CHANGELOG.md`, etc.) unless the product explicitly requires it—the skill should be agent-oriented, not a human-only doc dump.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Bundled Resources (Summary)
|
|
187
|
+
|
|
188
|
+
| Directory | Purpose |
|
|
189
|
+
|-----------|---------|
|
|
190
|
+
| `scripts/` | Deterministic helpers (shell, Python, …) |
|
|
191
|
+
| `references/` | Long docs, schemas, policies, deep examples |
|
|
192
|
+
| `assets/` | Output templates, images, boilerplate not meant to be fully inlined in context |
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Related Patterns (from Experience)
|
|
197
|
+
|
|
198
|
+
- **Multi-domain skills** — `SKILL.md` + `references/sales.md`, `references/finance.md`; only load the relevant reference.
|
|
199
|
+
- **Large reference files** — Add a table of contents at the top if longer than ~100 lines.
|
|
200
|
+
- **One level of indirection** — Link references from `SKILL.md` directly; avoid deep chains.
|
|
201
|
+
|
|
202
|
+
This structure aligns with how xbot lists skills, matches triggers, and loads full instructions on demand.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: software-engineer
|
|
3
|
+
description: "Software engineering workflow for planning, code changes, tests, CI-style validation, subagent delegation, and release hygiene."
|
|
4
|
+
metadata: {"xbot":{"triggers":["code","coding","vibe coding","implement","debug","bug","fix","test","tests","refactor","programming","repo","codebase"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Software Engineer
|
|
8
|
+
|
|
9
|
+
Apply this workflow for autonomous software development tasks.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. Establish scope from the request and current code state (find if there is a XBOT.md in the current workspace, use it if exists, otherwise ask user if we need to use /init command to create one).
|
|
14
|
+
2. Read the touched code paths before proposing or applying edits.
|
|
15
|
+
3. Prefer minimal coherent patches that preserve surrounding behavior.
|
|
16
|
+
4. Run focused verification first, then broader tests if needed.
|
|
17
|
+
5. If repository automation exists, inspect lint/build/test outputs and iterate on failures.
|
|
18
|
+
|
|
19
|
+
## Subagents
|
|
20
|
+
|
|
21
|
+
Use subagents when a task naturally splits into independent work streams, especially repository-wide investigation, per-directory review, independent bug hunts, parallel research, or broad test/failure triage. Keep the main agent responsible for coordination, final synthesis, and edits that require cross-cutting judgment.
|
|
22
|
+
|
|
23
|
+
Good delegation pattern:
|
|
24
|
+
|
|
25
|
+
1. Split work into concrete, bounded subtasks with clear ownership such as a folder, module, failing test group, or research question.
|
|
26
|
+
2. Spawn no more subagents than the concurrency limit allows. If more slices exist, batch them.
|
|
27
|
+
3. Give each subagent a self-contained instruction and expected output format.
|
|
28
|
+
4. After spawning subagents, call `wait_subagents` to receive their final text results before continuing the main task.
|
|
29
|
+
5. Synthesize subagent results in the main task context. Do not claim a subagent found or changed something unless its returned result supports it.
|
|
30
|
+
|
|
31
|
+
Use the main agent directly instead of subagents when the next step is tightly coupled, requires a single coherent edit across many files, or depends on immediate local context that would make delegation slower or less reliable.
|
|
32
|
+
|
|
33
|
+
## Engineering Standards
|
|
34
|
+
|
|
35
|
+
- Use the filesystem and shell tools to inspect, edit, and verify.
|
|
36
|
+
- Keep changes reviewable and grouped by behavior.
|
|
37
|
+
- Call out assumptions when external systems, credentials, or CI are unavailable.
|
|
38
|
+
- When working with git, inspect status/diff before making branching or commit decisions.
|
|
39
|
+
|
|
40
|
+
## Useful Patterns
|
|
41
|
+
|
|
42
|
+
- For bug fixes: reproduce, isolate, patch, verify regression coverage.
|
|
43
|
+
- For features: inspect existing patterns, implement incrementally, test the public behavior.
|
|
44
|
+
- For release readiness: run build/test/lint, inspect failures, and summarize blockers.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: summarize
|
|
3
|
+
description: Summarize or extract text/transcripts from URLs, podcasts, and local files; strong fallback when the user wants a video or article summarized without manual copy-paste.
|
|
4
|
+
homepage: https://summarize.sh
|
|
5
|
+
metadata: {"xbot":{"emoji":"🧾","requires":{"bins":["summarize"]},"triggers":["summarize","transcript","youtube","url","article","podcast","video"]}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Summarize
|
|
9
|
+
|
|
10
|
+
Fast CLI to summarize URLs, local files, and YouTube links.
|
|
11
|
+
|
|
12
|
+
Install the `summarize` CLI first if missing (for example `brew install steipete/tap/summarize` on macOS).
|
|
13
|
+
|
|
14
|
+
## When to use (trigger phrases)
|
|
15
|
+
|
|
16
|
+
Use this skill immediately when the user asks any of:
|
|
17
|
+
|
|
18
|
+
- “use summarize.sh”
|
|
19
|
+
- “what’s this link/video about?”
|
|
20
|
+
- “summarize this URL/article”
|
|
21
|
+
- “transcribe this YouTube/video” (best-effort transcript extraction; no `yt-dlp` needed)
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
summarize "https://example.com" --model google/gemini-3-flash-preview
|
|
27
|
+
summarize "/path/to/file.pdf" --model google/gemini-3-flash-preview
|
|
28
|
+
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## YouTube: summary vs transcript
|
|
32
|
+
|
|
33
|
+
Best-effort transcript (URLs only):
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto --extract-only
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.
|
|
40
|
+
|
|
41
|
+
## Model + keys
|
|
42
|
+
|
|
43
|
+
Set the API key for your chosen provider:
|
|
44
|
+
|
|
45
|
+
- OpenAI: `OPENAI_API_KEY`
|
|
46
|
+
- Anthropic: `ANTHROPIC_API_KEY`
|
|
47
|
+
- xAI: `XAI_API_KEY`
|
|
48
|
+
- Google: `GEMINI_API_KEY` (aliases: `GOOGLE_GENERATIVE_AI_API_KEY`, `GOOGLE_API_KEY`)
|
|
49
|
+
|
|
50
|
+
Default model is `google/gemini-3-flash-preview` if none is set.
|
|
51
|
+
|
|
52
|
+
## Useful flags
|
|
53
|
+
|
|
54
|
+
- `--length short|medium|long|xl|xxl|<chars>`
|
|
55
|
+
- `--max-output-tokens <count>`
|
|
56
|
+
- `--extract-only` (URLs only)
|
|
57
|
+
- `--json` (machine readable)
|
|
58
|
+
- `--firecrawl auto|off|always` (fallback extraction)
|
|
59
|
+
- `--youtube auto` (Apify fallback if `APIFY_API_TOKEN` set)
|
|
60
|
+
|
|
61
|
+
## Config
|
|
62
|
+
|
|
63
|
+
Optional config file: `~/.summarize/config.json`
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "model": "openai/gpt-5.2" }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Optional services:
|
|
70
|
+
|
|
71
|
+
- `FIRECRAWL_API_KEY` for blocked sites
|
|
72
|
+
- `APIFY_API_TOKEN` for YouTube fallback
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tmux
|
|
3
|
+
description: Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
|
|
4
|
+
metadata: {"xbot":{"emoji":"🧵","os":["darwin","linux"],"requires":{"bins":["tmux"]},"triggers":["tmux","terminal","pane","repl","interactive"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# tmux Skill
|
|
8
|
+
|
|
9
|
+
Use tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.
|
|
10
|
+
|
|
11
|
+
## Quickstart (isolated socket, exec tool)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
SOCKET_DIR="${XBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/xbot-tmux-sockets}"
|
|
15
|
+
mkdir -p "$SOCKET_DIR"
|
|
16
|
+
SOCKET="$SOCKET_DIR/xbot.sock"
|
|
17
|
+
SESSION=xbot-python
|
|
18
|
+
|
|
19
|
+
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
|
|
20
|
+
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter
|
|
21
|
+
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
After starting a session, always print monitor commands:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
To monitor:
|
|
28
|
+
tmux -S "$SOCKET" attach -t "$SESSION"
|
|
29
|
+
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Socket convention
|
|
33
|
+
|
|
34
|
+
- Use `XBOT_TMUX_SOCKET_DIR` environment variable.
|
|
35
|
+
- Default socket path: `"$XBOT_TMUX_SOCKET_DIR/xbot.sock"`.
|
|
36
|
+
|
|
37
|
+
## Targeting panes and naming
|
|
38
|
+
|
|
39
|
+
- Target format: `session:window.pane` (defaults to `:0.0`).
|
|
40
|
+
- Keep names short; avoid spaces.
|
|
41
|
+
- Inspect: `tmux -S "$SOCKET" list-sessions`, `tmux -S "$SOCKET" list-panes -a`.
|
|
42
|
+
|
|
43
|
+
## Finding sessions
|
|
44
|
+
|
|
45
|
+
- If the skill bundle includes helpers under `scripts/`, list sessions on your socket: `./scripts/find-sessions.sh -S "$SOCKET"`.
|
|
46
|
+
- Scan all sockets: `./scripts/find-sessions.sh --all` (uses `XBOT_TMUX_SOCKET_DIR`).
|
|
47
|
+
|
|
48
|
+
## Sending input safely
|
|
49
|
+
|
|
50
|
+
- Prefer literal sends: `tmux -S "$SOCKET" send-keys -t target -l -- "$cmd"`.
|
|
51
|
+
- Control keys: `tmux -S "$SOCKET" send-keys -t target C-c`.
|
|
52
|
+
|
|
53
|
+
## Watching output
|
|
54
|
+
|
|
55
|
+
- Capture recent history: `tmux -S "$SOCKET" capture-pane -p -J -t target -S -200`.
|
|
56
|
+
- Wait for prompts: `./scripts/wait-for-text.sh -t session:0.0 -p 'pattern'` (when bundled).
|
|
57
|
+
- Attaching is OK; detach with `Ctrl+b d`.
|
|
58
|
+
|
|
59
|
+
## Spawning processes
|
|
60
|
+
|
|
61
|
+
- For python REPLs, set `PYTHON_BASIC_REPL=1` (non-basic REPL breaks send-keys flows).
|
|
62
|
+
|
|
63
|
+
## Windows / WSL
|
|
64
|
+
|
|
65
|
+
- tmux is supported on macOS/Linux. On Windows, use WSL and install tmux inside WSL.
|
|
66
|
+
- This skill is gated to `darwin`/`linux` and requires `tmux` on PATH.
|
|
67
|
+
|
|
68
|
+
## Orchestrating Coding Agents (Codex, Claude Code)
|
|
69
|
+
|
|
70
|
+
tmux excels at running multiple coding agents in parallel:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
SOCKET="${TMPDIR:-/tmp}/codex-army.sock"
|
|
74
|
+
|
|
75
|
+
# Create multiple sessions
|
|
76
|
+
for i in 1 2 3 4 5; do
|
|
77
|
+
tmux -S "$SOCKET" new-session -d -s "agent-$i"
|
|
78
|
+
done
|
|
79
|
+
|
|
80
|
+
# Launch agents in different workdirs
|
|
81
|
+
tmux -S "$SOCKET" send-keys -t agent-1 "cd /tmp/project1 && codex --yolo 'Fix bug X'" Enter
|
|
82
|
+
tmux -S "$SOCKET" send-keys -t agent-2 "cd /tmp/project2 && codex --yolo 'Fix bug Y'" Enter
|
|
83
|
+
|
|
84
|
+
# Poll for completion (check if prompt returned)
|
|
85
|
+
for sess in agent-1 agent-2; do
|
|
86
|
+
if tmux -S "$SOCKET" capture-pane -p -t "$sess" -S -3 | grep -q "❯"; then
|
|
87
|
+
echo "$sess: DONE"
|
|
88
|
+
else
|
|
89
|
+
echo "$sess: Running..."
|
|
90
|
+
fi
|
|
91
|
+
done
|
|
92
|
+
|
|
93
|
+
# Get full output from completed session
|
|
94
|
+
tmux -S "$SOCKET" capture-pane -p -t agent-1 -S -500
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Tips:**
|
|
98
|
+
|
|
99
|
+
- Use separate git worktrees for parallel fixes (no branch conflicts)
|
|
100
|
+
- `pnpm install` first before running codex in fresh clones
|
|
101
|
+
- Check for shell prompt (`❯` or `$`) to detect completion
|
|
102
|
+
- Codex needs `--yolo` or `--full-auto` for non-interactive fixes
|
|
103
|
+
|
|
104
|
+
## Cleanup
|
|
105
|
+
|
|
106
|
+
- Kill a session: `tmux -S "$SOCKET" kill-session -t "$SESSION"`.
|
|
107
|
+
- Kill all sessions on a socket: `tmux -S "$SOCKET" list-sessions -F '#{session_name}' | xargs -r -n1 tmux -S "$SOCKET" kill-session -t`.
|
|
108
|
+
- Remove everything on the private socket: `tmux -S "$SOCKET" kill-server`.
|
|
109
|
+
|
|
110
|
+
## Helper: wait-for-text.sh
|
|
111
|
+
|
|
112
|
+
If present at `scripts/wait-for-text.sh` under this skill, it polls a pane for a regex (or fixed string) with a timeout.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
./scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- `-t`/`--target` pane target (required)
|
|
119
|
+
- `-p`/`--pattern` regex to match (required); add `-F` for fixed string
|
|
120
|
+
- `-T` timeout seconds (integer, default 15)
|
|
121
|
+
- `-i` poll interval seconds (default 0.5)
|
|
122
|
+
- `-l` history lines to search (integer, default 1000)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weather
|
|
3
|
+
description: Get current weather and forecasts with no API key (wttr.in and Open-Meteo).
|
|
4
|
+
homepage: https://wttr.in/:help
|
|
5
|
+
metadata: {"xbot":{"emoji":"🌤️","requires":{"bins":["curl"]},"triggers":["weather","forecast","temperature","wttr","rain"]}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Weather
|
|
9
|
+
|
|
10
|
+
Two free services, no API keys needed.
|
|
11
|
+
|
|
12
|
+
## wttr.in (primary)
|
|
13
|
+
|
|
14
|
+
Quick one-liner:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
curl -s "wttr.in/London?format=3"
|
|
18
|
+
# Output: London: ⛅️ +8°C
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Compact format:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
|
|
25
|
+
# Output: London: ⛅️ +8°C 71% ↙5km/h
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Full forecast:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
curl -s "wttr.in/London?T"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Format codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon
|
|
35
|
+
|
|
36
|
+
Tips:
|
|
37
|
+
|
|
38
|
+
- URL-encode spaces: `wttr.in/New+York`
|
|
39
|
+
- Airport codes: `wttr.in/JFK`
|
|
40
|
+
- Units: `?m` (metric) `?u` (USCS)
|
|
41
|
+
- Today only: `?1` · Current only: `?0`
|
|
42
|
+
- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png`
|
|
43
|
+
|
|
44
|
+
## Open-Meteo (fallback, JSON)
|
|
45
|
+
|
|
46
|
+
Free, no key, good for programmatic use:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.
|
|
53
|
+
|
|
54
|
+
Docs: https://open-meteo.com/en/docs
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workspace-operator
|
|
3
|
+
description: "Always-on operating guidance for workspace-safe execution, edits, and reporting."
|
|
4
|
+
metadata: {"xbot":{"always":true,"triggers":["workspace","files","directory","organize"]}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workspace Operator
|
|
8
|
+
|
|
9
|
+
Use this guidance whenever you are acting inside a repository or project workspace.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Inspect before editing.
|
|
14
|
+
- Prefer small, verifiable changes over broad speculative rewrites.
|
|
15
|
+
- Keep outputs durable: save reports, notes, and generated artifacts under the workspace when useful.
|
|
16
|
+
- When using shell commands, capture the result you need and avoid destructive operations unless explicitly requested.
|
|
17
|
+
- If a task is long-running or recurring, prefer cron-backed automation over manual repetition.
|
|
18
|
+
|
|
19
|
+
## Completion Pattern
|
|
20
|
+
|
|
21
|
+
1. Read the relevant files or gather the relevant evidence.
|
|
22
|
+
2. Make the change or run the analysis.
|
|
23
|
+
3. Verify using tests, commands, or structured checks.
|
|
24
|
+
4. Summarize the outcome and any remaining risk.
|