cue-ai 0.5.0 → 0.7.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/README.md +757 -110
- package/package.json +5 -5
- package/profiles/README.md +12 -12
- package/profiles/SCHEMA.md +31 -3
- package/profiles/_cache/README.md +1 -1
- package/profiles/_types.ts +26 -1
- package/profiles/backend/profile.yaml +1 -0
- package/profiles/career/profile.yaml +13 -0
- package/profiles/core/profile.yaml +76 -9
- package/profiles/creative-media/README.md +1 -1
- package/profiles/cybersecurity/profile.yaml +779 -756
- package/profiles/ecc/profile.yaml +39 -0
- package/profiles/event-design/profile.yaml +10 -0
- package/profiles/fleet-control/README.md +1 -1
- package/profiles/frontend/profile.yaml +14 -0
- package/profiles/full/README.md +1 -1
- package/profiles/go-api/profile.yaml +1 -0
- package/profiles/marketing/profile.yaml +12 -1
- package/profiles/predict-everything/profile.yaml +9 -0
- package/profiles/rust/profile.yaml +22 -3
- package/profiles/rust-cli/profile.yaml +14 -0
- package/profiles/rust-core/profile.yaml +35 -0
- package/profiles/rust-embedded/profile.yaml +11 -0
- package/profiles/rust-ffi/profile.yaml +13 -0
- package/profiles/rust-game/profile.yaml +11 -0
- package/profiles/rust-wasm/profile.yaml +11 -0
- package/profiles/rust-web/profile.yaml +17 -0
- package/profiles/schema.json +44 -4
- package/profiles/trendradar/profile.yaml +11 -0
- package/resources/mcps/README.md +39 -164
- package/resources/mcps/configs/claude.sanitized.json +55 -0
- package/resources/mcps/configs/claude_runtime.sanitized.json +47 -0
- package/resources/skills/README.md +70 -113
- package/resources/skills/skills/event-design/wedding-invitations/SKILL.md +43 -0
- package/resources/skills/skills/meta/acpx/SKILL.md +78 -0
- package/resources/skills/skills/meta/cue-usage/SKILL.md +24 -0
- package/resources/skills/skills/meta/profile-fit-monitor/SKILL.md +24 -0
- package/resources/skills/skills/predict-everything/mirofish/SKILL.md +75 -0
- package/resources/skills/skills/research/trendradar/SKILL.md +88 -0
- package/resources/skills/skills/rust/async-tokio/SKILL.md +27 -0
- package/resources/skills/skills/rust/axum-api/SKILL.md +38 -0
- package/resources/skills/skills/rust/bacon-watch/SKILL.md +24 -0
- package/resources/skills/skills/rust/bevy/SKILL.md +43 -0
- package/resources/skills/skills/rust/bindgen/SKILL.md +39 -0
- package/resources/skills/skills/rust/cargo-audit/SKILL.md +26 -0
- package/resources/skills/skills/rust/cargo-basics/SKILL.md +28 -0
- package/resources/skills/skills/rust/cargo-chef/SKILL.md +43 -0
- package/resources/skills/skills/rust/cargo-edit/SKILL.md +26 -0
- package/resources/skills/skills/rust/cargo-expand/SKILL.md +24 -0
- package/resources/skills/skills/rust/cargo-flamegraph/SKILL.md +26 -0
- package/resources/skills/skills/rust/cargo-fuzz/SKILL.md +34 -0
- package/resources/skills/skills/rust/cargo-hack/SKILL.md +26 -0
- package/resources/skills/skills/rust/cargo-msrv/SKILL.md +30 -0
- package/resources/skills/skills/rust/cargo-mutants/SKILL.md +26 -0
- package/resources/skills/skills/rust/cargo-nextest/SKILL.md +24 -0
- package/resources/skills/skills/rust/cargo-readme/SKILL.md +36 -0
- package/resources/skills/skills/rust/cbindgen/SKILL.md +41 -0
- package/resources/skills/skills/rust/chisel-tool/SKILL.md +32 -0
- package/resources/skills/skills/rust/clap-cli/SKILL.md +44 -0
- package/resources/skills/skills/rust/clippy-and-fmt/SKILL.md +25 -0
- package/resources/skills/skills/rust/cross-compile/SKILL.md +26 -0
- package/resources/skills/skills/rust/embedded/SKILL.md +33 -0
- package/resources/skills/skills/rust/error-handling/SKILL.md +32 -0
- package/resources/skills/skills/rust/just-runner/SKILL.md +26 -0
- package/resources/skills/skills/rust/mdbook/SKILL.md +25 -0
- package/resources/skills/skills/rust/napi-rs/SKILL.md +32 -0
- package/resources/skills/skills/rust/no-std/SKILL.md +42 -0
- package/resources/skills/skills/rust/property-testing/SKILL.md +35 -0
- package/resources/skills/skills/rust/pyo3/SKILL.md +40 -0
- package/resources/skills/skills/rust/ratatui-tui/SKILL.md +36 -0
- package/resources/skills/skills/rust/release-plz/SKILL.md +27 -0
- package/resources/skills/skills/rust/reqwest/SKILL.md +37 -0
- package/resources/skills/skills/rust/sccache/SKILL.md +28 -0
- package/resources/skills/skills/rust/serde/SKILL.md +30 -0
- package/resources/skills/skills/rust/snapshot-testing/SKILL.md +30 -0
- package/resources/skills/skills/rust/sqlx-cli/SKILL.md +33 -0
- package/resources/skills/skills/rust/tracing/SKILL.md +36 -0
- package/resources/skills/skills/rust/typos-spellcheck/SKILL.md +31 -0
- package/resources/skills/skills/rust/uniffi/SKILL.md +38 -0
- package/resources/skills/skills/rust/wasm-rust/SKILL.md +27 -0
- package/resources/skills/skills/security/agentshield/SKILL.md +119 -0
- package/src/commands/_index.ts +47 -3
- package/src/commands/cli.test.ts +192 -0
- package/src/commands/cli.ts +303 -0
- package/src/commands/current.ts +1 -1
- package/src/commands/debug.test.ts +62 -0
- package/src/commands/debug.ts +212 -0
- package/src/commands/discover.scoring.test.ts +216 -0
- package/src/commands/discover.test.ts +145 -0
- package/src/commands/discover.ts +2618 -0
- package/src/commands/eval-behavior.test.ts +56 -0
- package/src/commands/eval-behavior.ts +189 -0
- package/src/commands/eval.test.ts +102 -0
- package/src/commands/eval.ts +348 -0
- package/src/commands/evolve.ts +291 -0
- package/src/commands/failures.test.ts +78 -0
- package/src/commands/failures.ts +393 -0
- package/src/commands/feedback.ts +219 -0
- package/src/commands/init.ts +26 -0
- package/src/commands/launch.e2e.test.ts +9 -1
- package/src/commands/launch.ts +174 -11
- package/src/commands/lint-skill.ts +157 -0
- package/src/commands/marketplace.ts +763 -2
- package/src/commands/new.ts +1 -1
- package/src/commands/optimizer.ts +92 -28
- package/src/commands/profile-draft-skill.test.ts +96 -0
- package/src/commands/profile-draft-skill.ts +287 -0
- package/src/commands/profile-evolve.test.ts +126 -0
- package/src/commands/profile-evolve.ts +0 -0
- package/src/commands/profile-suggest.ts +223 -0
- package/src/commands/profile.ts +41 -0
- package/src/commands/quick.ts +2 -17
- package/src/commands/scan.ts +2 -2
- package/src/commands/score.ts +1 -1
- package/src/commands/share.ts +1 -1
- package/src/commands/sources.ts +2 -2
- package/src/commands/submit-profile.ts +262 -0
- package/src/commands/upgrade.ts +1 -1
- package/src/commands/use.ts +35 -5
- package/src/commands/validate.ts +1 -1
- package/src/index.ts +66 -0
- package/src/lib/analytics.ts +48 -2
- package/src/lib/claude-binary.ts +39 -0
- package/src/lib/cli-extractor.ts +77 -0
- package/src/lib/cluster-skills.test.ts +268 -0
- package/src/lib/cluster-skills.ts +290 -0
- package/src/lib/credentials-sync.test.ts +208 -0
- package/src/lib/credentials-sync.ts +205 -0
- package/src/lib/mcp-materializer.test.ts +1 -1
- package/src/lib/persona-playbooks.test.ts +111 -0
- package/src/lib/pr-poster.test.ts +243 -0
- package/src/lib/pr-poster.ts +285 -0
- package/src/lib/pr-throttle.test.ts +148 -0
- package/src/lib/pr-throttle.ts +209 -0
- package/src/lib/profile-generator.test.ts +1 -1
- package/src/lib/profile-generator.ts +2 -2
- package/src/lib/profile-linter.test.ts +6 -3
- package/src/lib/profile-linter.ts +71 -8
- package/src/lib/profile-loader.test.ts +1 -1
- package/src/lib/profile-loader.ts +16 -0
- package/src/lib/resolver-local.test.ts +1 -1
- package/src/lib/resolver-npx.test.ts +76 -1
- package/src/lib/resolver-npx.ts +35 -3
- package/src/lib/resolver-plugins.test.ts +1 -1
- package/src/lib/runtime-materializer.test.ts +191 -7
- package/src/lib/runtime-materializer.ts +310 -42
- package/src/lib/scan-plugins.test.ts +1 -1
- package/src/lib/skill-linter.test.ts +174 -0
- package/src/lib/skill-linter.ts +507 -0
- package/src/lib/skill-subset.test.ts +95 -0
- package/src/lib/skill-subset.ts +166 -0
- package/src/lib/star-prompt.ts +1 -1
- package/src/lib/uvx-installer.test.ts +229 -0
- package/src/lib/uvx-installer.ts +278 -0
|
@@ -127,6 +127,53 @@
|
|
|
127
127
|
"X_ACCESS_TOKEN": "${X_ACCESS_TOKEN}",
|
|
128
128
|
"X_ACCESS_TOKEN_SECRET": "${X_ACCESS_TOKEN_SECRET}"
|
|
129
129
|
}
|
|
130
|
+
},
|
|
131
|
+
"reddit": {
|
|
132
|
+
"command": "npx",
|
|
133
|
+
"args": [
|
|
134
|
+
"reddit-mcp-server"
|
|
135
|
+
],
|
|
136
|
+
"env": {
|
|
137
|
+
"REDDIT_CLIENT_ID": "${REDDIT_CLIENT_ID}",
|
|
138
|
+
"REDDIT_CLIENT_SECRET": "${REDDIT_CLIENT_SECRET}",
|
|
139
|
+
"REDDIT_USERNAME": "${REDDIT_USERNAME}",
|
|
140
|
+
"REDDIT_PASSWORD": "${REDDIT_PASSWORD}",
|
|
141
|
+
"REDDIT_SAFE_MODE": "standard",
|
|
142
|
+
"REDDIT_AUTH_MODE": "auto"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"google-ads-mcp": {
|
|
146
|
+
"command": "pipx",
|
|
147
|
+
"args": [
|
|
148
|
+
"run",
|
|
149
|
+
"--spec",
|
|
150
|
+
"git+https://github.com/googleads/google-ads-mcp.git",
|
|
151
|
+
"google-ads-mcp"
|
|
152
|
+
],
|
|
153
|
+
"env": {
|
|
154
|
+
"GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}",
|
|
155
|
+
"GOOGLE_PROJECT_ID": "${GOOGLE_PROJECT_ID}",
|
|
156
|
+
"GOOGLE_ADS_DEVELOPER_TOKEN": "${GOOGLE_ADS_DEVELOPER_TOKEN}"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"meta-ads": {
|
|
160
|
+
"command": "npx",
|
|
161
|
+
"args": [
|
|
162
|
+
"-y",
|
|
163
|
+
"meta-ads-mcp@latest"
|
|
164
|
+
],
|
|
165
|
+
"env": {
|
|
166
|
+
"META_ACCESS_TOKEN": "${META_ACCESS_TOKEN}",
|
|
167
|
+
"META_AD_ACCOUNT_ID": "${META_AD_ACCOUNT_ID}"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"mapi-devdocs": {
|
|
171
|
+
"command": "npx",
|
|
172
|
+
"args": [
|
|
173
|
+
"-y",
|
|
174
|
+
"mcp-remote",
|
|
175
|
+
"https://merchantapi.googleapis.com/devdocs/mcp"
|
|
176
|
+
]
|
|
130
177
|
}
|
|
131
178
|
},
|
|
132
179
|
"source": "claude_runtime",
|
|
@@ -1,135 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
┌───────────────────────────────────────────────────────────────┐
|
|
3
|
-
│ │
|
|
4
|
-
│ r e c o d e e e / s k i l l s │
|
|
5
|
-
│ ───────────────────────────────── │
|
|
6
|
-
│ 167 skills · 20 categories · one source of truth │
|
|
7
|
-
│ │
|
|
8
|
-
└───────────────────────────────────────────────────────────────┘
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
> **My laptop's current skill set.** This is the live snapshot of every agent
|
|
12
|
-
> skill installed on my machine — the same folders that Claude Code and Codex
|
|
13
|
-
> read at runtime. The repo is the source; my `~/.claude/skills` and
|
|
14
|
-
> `~/.codex/skills` are just symlinks back here.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Why this exists
|
|
1
|
+
# cue/skills — Skill Library
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
edit it, copy it to a new project, forget where the original lived. This repo
|
|
22
|
-
is the one place that's allowed to be authoritative. If a skill isn't here, it
|
|
23
|
-
isn't real on this laptop.
|
|
3
|
+
> 127 skills across 21 categories. The source of truth for all local skills used by [cue](https://github.com/opencue/cue) profiles.
|
|
24
4
|
|
|
25
|
-
|
|
26
|
-
symlink. Edit a file under `skills/` and every agent picks it up on next load —
|
|
27
|
-
no copy, no resync, no drift.
|
|
28
|
-
|
|
29
|
-
---
|
|
5
|
+
## What's here
|
|
30
6
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```text
|
|
7
|
+
```
|
|
34
8
|
skills/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
9
|
+
├── skills/ The skill library
|
|
10
|
+
│ ├── browser/ Playwright, screenshots
|
|
11
|
+
│ ├── caveman/ Terse mode, commits, compression
|
|
12
|
+
│ ├── colony/ Multi-agent coordination
|
|
13
|
+
│ ├── deployment/ Coolify, Supabase, pnpm
|
|
14
|
+
│ ├── design/ UI/UX, branding, SVG, Remotion
|
|
15
|
+
│ ├── github/ GitHub CLI, CI fixes, auth
|
|
16
|
+
│ ├── higgsfield/ AI image/video generation
|
|
17
|
+
│ ├── hostinger/ DNS, domains, VPS
|
|
18
|
+
│ ├── medusa/ Medusa v2 ecommerce
|
|
19
|
+
│ ├── meta/ Profile management, memory, helpers
|
|
20
|
+
│ ├── nvidia/ cuOpt, GPU optimization
|
|
21
|
+
│ ├── obsidian/ Vault, markdown, canvas
|
|
22
|
+
│ ├── orchestration/ Fleet, pipelines, workers
|
|
23
|
+
│ ├── research/ Search, papers, keywords
|
|
24
|
+
│ ├── review/ Code review, security, testing
|
|
25
|
+
│ ├── secrets/ Envoult, credential management
|
|
26
|
+
│ ├── stripe/ Payments, webhooks
|
|
27
|
+
│ └── ...
|
|
28
|
+
├── scripts/ Install, sync, lint scripts
|
|
29
|
+
├── plugins/ Claude Code plugin definitions
|
|
30
|
+
└── catalog/ Auto-generated skill index
|
|
50
31
|
```
|
|
51
32
|
|
|
52
|
-
|
|
33
|
+
## Skill format
|
|
53
34
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
| Folder | Count | What lives here |
|
|
57
|
-
| ----------------- | ----: | ---------------------------------------------------------------- |
|
|
58
|
-
| `ai/` | 3 | Anthropic SDK integration, prompt caching, Claude migration |
|
|
59
|
-
| `automation/` | 2 | Task scheduling, cron jobs, recurring automation |
|
|
60
|
-
| `caveman/` | 5 | Token compression — caveman, caveman-commit, caveman-review, … |
|
|
61
|
-
| `colony/` | 2 | Colony coordination, prompts, and handoff surfaces |
|
|
62
|
-
| `content/` | 8 | Technical writing, copywriting, theming, docs, PDF, browser work |
|
|
63
|
-
| `deployment/` | 3 | Coolify, pnpm, Supabase |
|
|
64
|
-
| `design/` | 19 | UI, UX, visual design, image-direction, brandkit, mockups |
|
|
65
|
-
| `github/` | 6 | github CLI, gh-fix-ci, gitguardex, worktrees, branch finish |
|
|
66
|
-
| `growth/` | 12 | CRO, analytics, retention, referrals, free-tool growth |
|
|
67
|
-
| `higgsfield/` | 4 | Higgsfield AI — generate, soul-id, photoshoot, marketplace |
|
|
68
|
-
| `hostinger/` | 4 | Hostinger domains, DNS, hosting, VPS |
|
|
69
|
-
| `marketing/` | 18 | SEO, ads, email, launch, PMM, pricing, community, RevOps-adjacent |
|
|
70
|
-
| `medusa/` | 14 | Medusa commerce, storefronts, db migrations, woocommerce import |
|
|
71
|
-
| `meta/` | 25 | Agent meta, config, workflow, plans, doctor, hud, ask-*, trace |
|
|
72
|
-
| `obsidian/` | 4 | Obsidian vault tooling and JSON canvas |
|
|
73
|
-
| `orchestration/` | 13 | autopilot, ralph, team, subagents, ultraqa, ultrawork, pipeline |
|
|
74
|
-
| `private/` | 1 | Host- / account-specific skills (no secrets in repo) |
|
|
75
|
-
| `research/` | 11 | autoresearch, interviews, customer/competitor research, keywords |
|
|
76
|
-
| `review/` | 11 | code/security/architecture review, debugging, TDD, verification |
|
|
77
|
-
| `stripe/` | 2 | Stripe integration and webhooks |
|
|
78
|
-
|
|
79
|
-
> Skill leaf names are unique repo-wide so symlink installs never collide.
|
|
35
|
+
Each skill is a directory with a `SKILL.md` file:
|
|
80
36
|
|
|
37
|
+
```markdown
|
|
81
38
|
---
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
```sh
|
|
86
|
-
./scripts/install-local.sh
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
The installer walks every category for `SKILL.md` files and links each parent
|
|
90
|
-
folder into both:
|
|
91
|
-
|
|
92
|
-
- `~/.codex/skills/<skill-name>`
|
|
93
|
-
- `~/.claude/skills/<skill-name>`
|
|
94
|
-
|
|
95
|
-
Existing skill folders at the destination are moved to timestamped backups
|
|
96
|
-
before linking — nothing is overwritten silently.
|
|
97
|
-
|
|
98
|
-
`docs/installed-sources.tsv` records where each imported skill came from at
|
|
99
|
-
last import and whether duplicates were skipped.
|
|
100
|
-
|
|
39
|
+
description: "When user says X, do Y"
|
|
40
|
+
allowed-tools: ["tool_name"]
|
|
101
41
|
---
|
|
102
42
|
|
|
103
|
-
|
|
43
|
+
# Skill Name
|
|
104
44
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
3. Re-run `./scripts/install-local.sh`. The installer is idempotent.
|
|
45
|
+
Instructions for the model...
|
|
46
|
+
```
|
|
108
47
|
|
|
109
|
-
|
|
110
|
-
anymore. Better to have `deployment/coolify/` with one entry than a special
|
|
111
|
-
case.
|
|
48
|
+
The `description` frontmatter is what the LLM matches against to decide when to use the skill.
|
|
112
49
|
|
|
113
|
-
|
|
50
|
+
## How cue uses this
|
|
114
51
|
|
|
115
|
-
|
|
52
|
+
Profiles reference skills by `category/slug`:
|
|
116
53
|
|
|
117
|
-
|
|
54
|
+
```yaml
|
|
55
|
+
# profiles/backend/profile.yaml
|
|
56
|
+
skills:
|
|
57
|
+
local:
|
|
58
|
+
- review/code-review
|
|
59
|
+
- deployment/coolify
|
|
60
|
+
- github/gh-fix-ci
|
|
61
|
+
```
|
|
118
62
|
|
|
119
|
-
|
|
120
|
-
account-specific surfaces. Secrets and connection details (IPs, usernames,
|
|
121
|
-
tokens) **must** come from environment variables or `~/.ssh/config` aliases —
|
|
122
|
-
never from committed files. The bundled scripts under `private/myvps/` enforce
|
|
123
|
-
this: they fail fast if `SUPA_SCHEMA_SSH_TARGET` isn't set.
|
|
63
|
+
At launch, cue symlinks these into the runtime's `skills/` directory.
|
|
124
64
|
|
|
125
|
-
|
|
65
|
+
## Adding a skill
|
|
126
66
|
|
|
127
|
-
```
|
|
128
|
-
|
|
67
|
+
```bash
|
|
68
|
+
cue skills-new my-skill # scaffold
|
|
69
|
+
# edit skills/<category>/my-skill/SKILL.md
|
|
70
|
+
cue skills-lint my-skill # validate
|
|
71
|
+
cue skills-test my-skill # test
|
|
129
72
|
```
|
|
130
73
|
|
|
131
|
-
|
|
74
|
+
Or manually: create `skills/<category>/<slug>/SKILL.md` with the frontmatter format above.
|
|
132
75
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
76
|
+
## Categories
|
|
77
|
+
|
|
78
|
+
| Category | Skills | Domain |
|
|
79
|
+
|----------|--------|--------|
|
|
80
|
+
| `browser` | 1 | Playwright, screenshots |
|
|
81
|
+
| `caveman` | 5 | Terse mode, commits |
|
|
82
|
+
| `design` | 16 | UI/UX, branding, SVG |
|
|
83
|
+
| `medusa` | 14 | Ecommerce platform |
|
|
84
|
+
| `meta` | 18 | Profile helpers, memory |
|
|
85
|
+
| `nvidia` | 12 | GPU optimization |
|
|
86
|
+
| `review` | 5 | Code quality, security |
|
|
87
|
+
| `research` | 8 | Search, papers |
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- [cue](https://github.com/opencue/cue) — the profile manager
|
|
92
|
+
- [resources/mcps](../mcps/) — MCP server registry
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wedding-invitations
|
|
3
|
+
description: Use when designing a wedding invitation, save-the-date, or RSVP card from a conversation — bespoke HTML rendered to a print-ready PNG, any language, any aesthetic, fully local. Pointer to upstream wyx-sg/wedding-invitation-skill.
|
|
4
|
+
allowed-tools: Bash(chromium:*), Bash(google-chrome:*), Bash(microsoft-edge:*), Bash(node:*), Bash(git:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Wedding Invitations — bespoke, local, multilingual
|
|
8
|
+
|
|
9
|
+
[`wyx-sg/wedding-invitation-skill`](https://github.com/wyx-sg/wedding-invitation-skill) — designs a one-off wedding invitation from a conversation. Outputs a print-ready PNG (1080×1440 portrait or 1080×1920 9:16 poster). Renders locally via a headless Chromium browser; no uploads, no cloud, no telemetry.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
- "Help me make a wedding invitation"
|
|
13
|
+
- "Design a save-the-date in [language]"
|
|
14
|
+
- Save-the-dates, RSVP cards, programs, menus, place cards — anything the same HTML→PNG pipeline can produce
|
|
15
|
+
- Multilingual collateral (English, Chinese, Spanish, Japanese, Korean, or any combination)
|
|
16
|
+
- Aesthetic directions covered by the upstream gallery: new-chinese, wabi-sabi, art-deco, morandi, modern-minimal, mediterranean, retro-poster, etc.
|
|
17
|
+
|
|
18
|
+
## How
|
|
19
|
+
1. **Talk** — the skill asks for language(s), names, date, venue, style preference
|
|
20
|
+
2. **Preview** — aesthetic directions shown visually in your browser
|
|
21
|
+
3. **Design** — Claude writes a unique HTML template from scratch
|
|
22
|
+
4. **Iterate** — natural-language tweaks ("bigger font" / "softer color" / "swap the photo")
|
|
23
|
+
5. **Export** — one command screenshots the HTML → high-res PNG
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
```bash
|
|
27
|
+
git clone https://github.com/wyx-sg/wedding-invitation-skill \
|
|
28
|
+
~/.claude/skills/wedding-invitation
|
|
29
|
+
```
|
|
30
|
+
Then invoke via `/wedding-invitation` in Claude Code, or just ask: "help me make a wedding invitation."
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
- `node` 18+
|
|
34
|
+
- A Chromium-family browser: `chromium`, `google-chrome`, or `microsoft-edge` (any one suffices)
|
|
35
|
+
- `git` for the install
|
|
36
|
+
|
|
37
|
+
The upstream `render.js` auto-locates whichever browser you have. On Linux: `cue cli install chromium`. On macOS: `brew install --cask chromium` (or any Chrome already installed works). On Windows: Edge ships with the OS.
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
- **Privacy**: photos, names, addresses stay on your machine. The only network requests are Google Fonts CDN loads from your browser during HTML preview — font URLs only, nothing about you.
|
|
41
|
+
- **Not a template gallery**: each invitation is designed fresh from your prompt. The 20 gallery examples are showcases, not picks.
|
|
42
|
+
- **Other agents**: the skill is Claude-Code-first but works with Codex CLI, Cursor, Aider, Gemini CLI — tell the agent "read SKILL.md and help me make a wedding invitation."
|
|
43
|
+
- **Sibling collateral**: this skill specializes in invitations but the HTML→PNG pipeline generalizes — for programs/menus/place cards, the same workflow applies; ask Claude to adapt the template.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acpx
|
|
3
|
+
description: Delegate work to another coding agent (codex, claude, pi, openclaw, gemini, cursor, copilot, droid, etc.) over the Agent Client Protocol via acpx. Use when the user says "delegate to <agent>", "run codex", "use claude code", "have <agent> do X", "spawn a sub-agent", "agent-to-agent", mentions ACP, or when the work belongs in a different harness than the one you're in. Prefer this over PTY scraping or `tmux send-keys` to a foreign agent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# acpx — talk to other coding agents over ACP
|
|
7
|
+
|
|
8
|
+
`acpx` is a headless CLI that lets one agent drive another over the **Agent
|
|
9
|
+
Client Protocol (ACP)**. Persistent sessions, prompt queueing, structured
|
|
10
|
+
tool-call output, soft-close lifecycle. You get a real conversation with the
|
|
11
|
+
target agent instead of scraping its terminal.
|
|
12
|
+
|
|
13
|
+
⚠️ acpx is in alpha; the surface may shift. Pin via `npm install -g acpx@latest`
|
|
14
|
+
or `npx acpx@latest` for one-offs. State lives in `~/.acpx/`.
|
|
15
|
+
|
|
16
|
+
## When to reach for it
|
|
17
|
+
|
|
18
|
+
- User asks you to **delegate** a task to another agent ("get codex to fix X",
|
|
19
|
+
"have claude refactor Y").
|
|
20
|
+
- You're in one harness and the task is clearly a better fit for another
|
|
21
|
+
(e.g. you're in Claude Code and the user wants the Codex CLI to run the
|
|
22
|
+
task because of model availability or workflow preference).
|
|
23
|
+
- The user wants **parallel work in the same repo** by different agents
|
|
24
|
+
without stomping on each other.
|
|
25
|
+
- You'd otherwise be tempted to `tmux send-keys`, `expect`, or screen-scrape
|
|
26
|
+
another agent's TUI — stop, use acpx instead.
|
|
27
|
+
|
|
28
|
+
Do **not** use acpx for the agent you're already running inside. Use your
|
|
29
|
+
native tools.
|
|
30
|
+
|
|
31
|
+
## Setup (one-time)
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
npm install -g acpx@latest # global (faster)
|
|
35
|
+
# or
|
|
36
|
+
npx acpx@latest <agent> "<prompt>" # no install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Underlying coding-agent CLIs (`codex`, `claude`, `gemini`, etc.) must already
|
|
40
|
+
be installed and authenticated separately — acpx is a client, not a bundler.
|
|
41
|
+
Run `cue cli install acpx` to install via the cli recipe registry.
|
|
42
|
+
|
|
43
|
+
## Core commands
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
acpx codex sessions new # create a session for this dir
|
|
47
|
+
acpx codex 'fix the failing tests' # run a prompt
|
|
48
|
+
acpx codex -s api 'paginate the endpoint' # parallel named session
|
|
49
|
+
acpx codex sessions list # see what's open
|
|
50
|
+
acpx codex status # is it running / idle / dead
|
|
51
|
+
acpx codex cancel # cooperative cancel (sends ACP cancel)
|
|
52
|
+
acpx codex sessions close # soft-close (keeps history)
|
|
53
|
+
acpx codex exec 'one-shot summary' # stateless, no saved session
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Substitute `codex` with `claude`, `pi`, `openclaw`, `gemini`, `cursor`,
|
|
57
|
+
`copilot`, `droid`, `iflow`, `kilocode`, `kimi`, `kiro`, `opencode`, `qoder`,
|
|
58
|
+
`qwen`, `trae`. For custom ACP servers: `acpx --agent './bin/my-acp' '...'`.
|
|
59
|
+
|
|
60
|
+
## Useful flags
|
|
61
|
+
|
|
62
|
+
- `--no-wait` — queue prompt, return immediately (fire-and-forget).
|
|
63
|
+
- `--format json` — NDJSON event stream, good for automation/jq pipelines.
|
|
64
|
+
- `--format quiet` — final assistant text only.
|
|
65
|
+
- `--approve-all` / `--approve-reads` / `--deny-all` — permission gates.
|
|
66
|
+
- `--cwd <path>` — run against a different working directory.
|
|
67
|
+
- `--timeout <s>` — wall-clock cap on a single prompt.
|
|
68
|
+
- `--ttl <s>` — keep queue owner alive between prompts (default 300).
|
|
69
|
+
- `--file <path>` / stdin — load prompt body from file or pipe.
|
|
70
|
+
|
|
71
|
+
## Full reference
|
|
72
|
+
|
|
73
|
+
- Skill source: <https://raw.githubusercontent.com/openclaw/acpx/main/skills/acpx/SKILL.md>
|
|
74
|
+
- CLI reference: <https://raw.githubusercontent.com/openclaw/acpx/main/docs/CLI.md>
|
|
75
|
+
- Built-in agent list: <https://github.com/openclaw/acpx/blob/main/agents/README.md>
|
|
76
|
+
|
|
77
|
+
When something's not obvious, read those — they're the canonical source and
|
|
78
|
+
they evolve faster than this stub.
|
|
@@ -76,6 +76,30 @@ cue snapshot # export current state
|
|
|
76
76
|
cue snapshot restore <file> # restore from snapshot
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### Discover (find hidden gem skills on GitHub)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cue discover search # scan GitHub for skill repos
|
|
83
|
+
cue discover search --profile marketing # find gems for a specific profile
|
|
84
|
+
cue discover search "mcp rust" # targeted search
|
|
85
|
+
cue discover analyze --min-score 8 # Claude reads gems, determines best profile + MCPs + CLIs
|
|
86
|
+
cue discover install --dry-run # preview what would be installed
|
|
87
|
+
cue discover install --min-score 8 # install top gems into profiles
|
|
88
|
+
cue discover install --notify # install + notify repo owners via GitHub issue
|
|
89
|
+
cue discover mcps # find MCP servers to add
|
|
90
|
+
cue discover mcps --install # auto-wire found MCPs into profile
|
|
91
|
+
cue discover --export # generate docs/discovered.md
|
|
92
|
+
cue discover list # show cached results
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Evolve (auto-learn from sessions)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cue evolve # scan sessions → detect gaps → propose changes
|
|
99
|
+
cue evolve --apply # apply proposed changes (add/remove skills)
|
|
100
|
+
cue evolve --history # show profile evolution log
|
|
101
|
+
```
|
|
102
|
+
|
|
79
103
|
### Profile Creation
|
|
80
104
|
|
|
81
105
|
```bash
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: profile-fit-monitor
|
|
3
|
+
description: Notice when the active cue profile is a poor fit for the current work and suggest switching. Use when you find yourself reaching for skills/tools that aren't loaded, or doing work clearly outside the profile's domain (e.g. backend work in a frontend profile).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Profile Fit Monitor
|
|
7
|
+
|
|
8
|
+
Track how well the active profile matches what the user is actually doing. If you notice any of:
|
|
9
|
+
|
|
10
|
+
- You're doing work outside the profile's domain (e.g. backend work in a frontend profile, design work in a backend profile).
|
|
11
|
+
- None of the loaded skills are relevant to what the user is asking.
|
|
12
|
+
- You keep needing tools or skills that aren't in this profile.
|
|
13
|
+
|
|
14
|
+
Then **after completing the user's immediate request**, surface the mismatch with a one-line suggestion:
|
|
15
|
+
|
|
16
|
+
> 💡 This session has been mostly [backend / infra / docs / …] work — your current profile is **{active-profile}**.
|
|
17
|
+
> A better fit might be **[suggested]**. Switch with: `/cue switch [name]` or `echo [name] > .cue-profile`
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Only suggest once per session — don't nag.
|
|
22
|
+
- Never interrupt urgent or in-flight work to suggest a switch; wait for a natural break.
|
|
23
|
+
- If the user has explicitly pinned the profile (`.cue-profile` present, or recently ran `/cue switch`), assume they meant it and stay quiet unless the mismatch is extreme.
|
|
24
|
+
- Match the suggested profile to the work category — don't suggest randomly. If unsure, just describe the mismatch without picking a target.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mirofish
|
|
3
|
+
description: Use when running multi-agent prediction or simulation — digital sandbox rehearsals, social-trend forecasting, swarm-intelligence experiments, "what if" scenarios. Pointer to upstream 666ghj/MiroFish.
|
|
4
|
+
allowed-tools: Bash(node:*), Bash(npm:*), Bash(uv:*), Bash(python:*), Bash(python3:*), Bash(docker:*), Bash(git:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MiroFish — multi-agent prediction & simulation engine
|
|
8
|
+
|
|
9
|
+
[`666ghj/MiroFish`](https://github.com/666ghj/MiroFish) — extracts seed information (news, policy drafts, financial signals, narrative fragments), builds a high-fidelity parallel digital world, populates it with thousands of agents that have personalities + long-term memory + behavioral logic, lets them interact, and returns a prediction report. Powered by [OASIS](https://github.com/camel-ai/oasis) (CAMEL-AI's open-source agent social simulation framework).
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
- "Simulate how public opinion would react to [policy / event / announcement]"
|
|
13
|
+
- "Predict the second-order effects of [decision] before we commit"
|
|
14
|
+
- "Generate a plausible ending to [story / scenario]"
|
|
15
|
+
- "Run N counterfactuals on [breaking news / financial signal]"
|
|
16
|
+
- Strategy rehearsal: test marketing campaigns, PR statements, product launches against a synthetic crowd before real release
|
|
17
|
+
- Creative writing: explore alternate endings, character interactions, world-building consequences
|
|
18
|
+
|
|
19
|
+
## What you get back
|
|
20
|
+
- A detailed **prediction report** (Markdown / structured)
|
|
21
|
+
- A **deeply interactive high-fidelity digital world** — you can chat with any simulated agent inside it
|
|
22
|
+
- Dual-platform parallel simulation (multiple environments running concurrently)
|
|
23
|
+
- Auto-parsed prediction requirements + dynamic temporal memory updates as the sim evolves
|
|
24
|
+
|
|
25
|
+
## Architecture (workflow stages)
|
|
26
|
+
1. **Graph building** — seed extraction, individual + collective memory injection, GraphRAG construction
|
|
27
|
+
2. **Environment setup** — entity relationship extraction, persona generation, agent config injection
|
|
28
|
+
3. **Simulation** — dual-platform parallel sim, prediction-requirement parser, dynamic temporal memory
|
|
29
|
+
4. **Report generation** — ReportAgent with toolset for post-sim interaction
|
|
30
|
+
5. **Deep interaction** — chat with any agent in the simulated world OR with ReportAgent
|
|
31
|
+
|
|
32
|
+
## Install (source — recommended)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/666ghj/MiroFish.git
|
|
36
|
+
cd MiroFish
|
|
37
|
+
cp .env.example .env
|
|
38
|
+
# Edit .env — set LLM_API_KEY, LLM_BASE_URL, LLM_MODEL_NAME, ZEP_API_KEY
|
|
39
|
+
npm run setup:all # installs root + frontend (Node) + backend (Python via uv)
|
|
40
|
+
npm run dev # starts frontend on :3000, backend on :5001
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Install (Docker)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/666ghj/MiroFish.git
|
|
47
|
+
cd MiroFish
|
|
48
|
+
cp .env.example .env # fill in API keys
|
|
49
|
+
docker compose up -d
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Prerequisites
|
|
53
|
+
- **Node.js** 18+
|
|
54
|
+
- **Python** ≥3.11 and ≤3.12 (3.13 not yet supported)
|
|
55
|
+
- **uv** (Astral's package manager) — `cue cli install uv` or [docs](https://docs.astral.sh/uv/)
|
|
56
|
+
- **An LLM API key** with OpenAI-SDK-compatible endpoint:
|
|
57
|
+
- Recommended: Alibaba Qwen-plus via [Bailian Platform](https://bailian.console.aliyun.com/) — best quality/cost for Chinese + English simulations
|
|
58
|
+
- Any OpenAI-compatible endpoint works (OpenAI, Anthropic via proxy, Together, DeepSeek, etc.)
|
|
59
|
+
- **Zep Cloud API key** (free tier sufficient for simple usage) — [getzep.com](https://app.getzep.com/) — provides long-term memory for the simulated agents
|
|
60
|
+
- Optional: **Docker** + **docker compose** for the containerized path
|
|
61
|
+
|
|
62
|
+
## Cost & scale warning
|
|
63
|
+
- High LLM consumption — each simulation round = many agent turns × thousands of agents
|
|
64
|
+
- Start with **<40 rounds** to gauge cost before larger runs
|
|
65
|
+
- The QPS limits of free LLM tiers will throttle simulations; Qwen-plus paid tier or equivalent recommended for serious work
|
|
66
|
+
|
|
67
|
+
## Notes
|
|
68
|
+
- The simulation engine is **OASIS** by CAMEL-AI; MiroFish is the orchestrator + UI + GraphRAG layer on top
|
|
69
|
+
- Live demo: [mirofish-live-demo](https://github.com/666ghj/MiroFish#-live-demo)
|
|
70
|
+
- For pure agent-simulation research without the predict-report layer, install OASIS directly
|
|
71
|
+
- Supports both serious decision rehearsal (macro: policy / PR testing) and playful counterfactuals (micro: novel endings, "what if" exploration)
|
|
72
|
+
- The MiroFish team is recruiting (full-time + intern); see upstream README
|
|
73
|
+
|
|
74
|
+
## Use with cue
|
|
75
|
+
This profile (`predict-everything`) inherits `core` and adds this pointer skill plus the `uv` CLI recipe. Future prediction/simulation tools — additional OASIS-based forks, alternate engines like AgentSims or Generative Agents from Stanford — would land as siblings under `predict-everything/`.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "When user asks about news trends, hot topics, RSS feeds, or wants to analyze/search recent news — use the TrendRadar MCP tools"
|
|
3
|
+
allowed-tools:
|
|
4
|
+
- mcp__trendradar__get_latest_news
|
|
5
|
+
- mcp__trendradar__get_trending_topics
|
|
6
|
+
- mcp__trendradar__search_news
|
|
7
|
+
- mcp__trendradar__analyze_topic_trend
|
|
8
|
+
- mcp__trendradar__analyze_data_insights
|
|
9
|
+
- mcp__trendradar__analyze_sentiment
|
|
10
|
+
- mcp__trendradar__find_related_news
|
|
11
|
+
- mcp__trendradar__generate_summary_report
|
|
12
|
+
- mcp__trendradar__get_latest_rss
|
|
13
|
+
- mcp__trendradar__search_rss
|
|
14
|
+
- mcp__trendradar__read_article
|
|
15
|
+
- mcp__trendradar__read_articles_batch
|
|
16
|
+
- mcp__trendradar__aggregate_news
|
|
17
|
+
- mcp__trendradar__compare_periods
|
|
18
|
+
- mcp__trendradar__send_notification
|
|
19
|
+
- mcp__trendradar__trigger_crawl
|
|
20
|
+
- mcp__trendradar__resolve_date_range
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# TrendRadar — News Trend Intelligence
|
|
24
|
+
|
|
25
|
+
Use the TrendRadar MCP server for all news aggregation, trend analysis, and notification tasks.
|
|
26
|
+
|
|
27
|
+
## Available Tools (27)
|
|
28
|
+
|
|
29
|
+
### Data Query
|
|
30
|
+
- `get_latest_news` — Fetch the most recent news articles
|
|
31
|
+
- `get_news_by_date` — Get news for a specific date
|
|
32
|
+
- `search_news` — Full-text search across all collected news
|
|
33
|
+
- `aggregate_news` — Aggregate news by topic/source/date
|
|
34
|
+
|
|
35
|
+
### Trend Analysis
|
|
36
|
+
- `get_trending_topics` — Current trending topics across sources
|
|
37
|
+
- `analyze_topic_trend` — Track how a topic trends over time
|
|
38
|
+
- `analyze_data_insights` — Statistical insights from news data
|
|
39
|
+
- `analyze_sentiment` — Sentiment analysis on news topics
|
|
40
|
+
- `find_related_news` — Find articles related to a topic
|
|
41
|
+
- `compare_periods` — Compare news patterns between time periods
|
|
42
|
+
- `generate_summary_report` — Generate a comprehensive trend report
|
|
43
|
+
|
|
44
|
+
### RSS
|
|
45
|
+
- `get_latest_rss` — Latest RSS feed entries
|
|
46
|
+
- `search_rss` — Search within RSS feeds
|
|
47
|
+
- `get_rss_feeds_status` — Check RSS feed health
|
|
48
|
+
|
|
49
|
+
### Article Reading
|
|
50
|
+
- `read_article` — Read full article content
|
|
51
|
+
- `read_articles_batch` — Read multiple articles at once
|
|
52
|
+
|
|
53
|
+
### System
|
|
54
|
+
- `trigger_crawl` — Trigger a news crawl manually
|
|
55
|
+
- `get_system_status` — Check TrendRadar system health
|
|
56
|
+
- `check_version` — Check for updates
|
|
57
|
+
- `get_current_config` — View current configuration
|
|
58
|
+
- `resolve_date_range` — Parse natural language date ranges
|
|
59
|
+
|
|
60
|
+
### Storage & Sync
|
|
61
|
+
- `sync_from_remote` — Sync data from remote storage
|
|
62
|
+
- `get_storage_status` — Check storage health
|
|
63
|
+
- `list_available_dates` — List dates with available data
|
|
64
|
+
|
|
65
|
+
### Notifications
|
|
66
|
+
- `send_notification` — Send news digest to configured channels
|
|
67
|
+
- `get_notification_channels` — List notification channels
|
|
68
|
+
- `get_channel_format_guide` — Get formatting guide for a channel
|
|
69
|
+
|
|
70
|
+
## Workflow Examples
|
|
71
|
+
|
|
72
|
+
**Daily briefing:**
|
|
73
|
+
1. `get_trending_topics` → see what's hot
|
|
74
|
+
2. `get_latest_news` → read top stories
|
|
75
|
+
3. `generate_summary_report` → create digest
|
|
76
|
+
4. `send_notification` → push to Slack/WeChat/email
|
|
77
|
+
|
|
78
|
+
**Research a topic:**
|
|
79
|
+
1. `search_news "AI agents"` → find relevant articles
|
|
80
|
+
2. `analyze_topic_trend "AI agents"` → see trend over time
|
|
81
|
+
3. `analyze_sentiment "AI agents"` → gauge market sentiment
|
|
82
|
+
4. `read_articles_batch` → deep-read the top hits
|
|
83
|
+
|
|
84
|
+
## Prerequisites
|
|
85
|
+
|
|
86
|
+
- Python 3.12+
|
|
87
|
+
- `uvx` (for running the MCP server)
|
|
88
|
+
- TrendRadar data (run `trendradar` crawler first, or sync from remote)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: async-tokio
|
|
3
|
+
description: Use when writing async Rust with tokio — picking a runtime flavor, structuring tasks, choosing sync vs async primitives, debugging deadlocks.
|
|
4
|
+
allowed-tools: Bash(cargo:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Async Rust with Tokio
|
|
8
|
+
|
|
9
|
+
Runtime patterns + common foot-guns.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
- New binary: `#[tokio::main]` (multi-thread) or `#[tokio::main(flavor = "current_thread")]` for single-thread / WASM
|
|
13
|
+
- New lib: don't pull in tokio — return `impl Future` and let callers pick a runtime
|
|
14
|
+
- Spawn long-running task: `tokio::spawn(async move { ... })`
|
|
15
|
+
- Run blocking code: `tokio::task::spawn_blocking(|| ...)` — NEVER call blocking sync APIs (std::fs, std::thread::sleep) inside an async fn on the main runtime
|
|
16
|
+
- Cancel a task: drop the `JoinHandle` or use `tokio::select! { _ = cancel_rx => ..., r = work => ... }`
|
|
17
|
+
- Channels: `tokio::sync::mpsc` (multi-producer), `oneshot` (single message), `broadcast` (fanout), `watch` (latest-value)
|
|
18
|
+
- Async mutex only when you `.await` while holding the lock — otherwise use `std::sync::Mutex`
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
- cargo
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
- Holding a `std::sync::Mutex` across `.await` is a clippy lint and a real deadlock risk. Use `tokio::sync::Mutex` or restructure to drop the guard first.
|
|
25
|
+
- `tokio::spawn` requires `Send` futures. For non-Send (e.g. tree-walking with `Rc`), use `tokio::task::spawn_local` + `LocalSet`.
|
|
26
|
+
- Debug deadlocks with `tokio-console` (separate crate) — it shows the live task tree.
|
|
27
|
+
- For libraries supporting multiple runtimes, gate runtime-specific code behind feature flags (`tokio`, `async-std`, `smol`) rather than pulling in tokio directly.
|