ring:delegating-to-gandalf
Delegating tasks to Gandalf, a Lerian AI teammate reachable over Tailscale, and returning its response. Use when you need to publish an HTML/markdown report to Alfarrabio and get a URL, post a Slack notification, or ask Gandalf for business/product context via a full agent session. Tailscale-network only, no auth token. Skip when off the Tailscale network or the task can be done locally.
What this skill does
# Gandalf Webhook
## When to use
- Need to publish content to Alfarrábio (report server)
- Need to send Slack notifications via Gandalf
- Need to ask Gandalf for business context or information
- Need to delegate a task to Gandalf (AI team member on dedicated Mac mini)
## Skip when
- Not connected to Lerian's Tailscale network
- Task can be completed locally without Gandalf's capabilities
Send tasks to Gandalf and get responses. Tailscale only. No auth token.
```
POST http://gandalf.heron-justitia.ts.net:18792/task
```
## Actions
### `publish` — instant (<1s)
Write content to Alfarrábio, get URL back.
```bash
curl -s -X POST http://gandalf.heron-justitia.ts.net:18792/task \
-H "Content-Type: application/json" \
-d '{"action": "publish", "message": "Report Title", "content": "<html>...</html>"}'
```
Response: `{"ok": true, "task_id": "...", "status": "done", "response": "https://alfarrabio.lerian.net/..."}`
### `notify` — instant (<1s)
Send Slack message. Prefix with `#channel:` to target specific channel (default: #gandalf-notifications).
```bash
curl -s -X POST http://gandalf.heron-justitia.ts.net:18792/task \
-H "Content-Type: application/json" \
-d '{"action": "notify", "message": "#pull-requests: PR #1900 ready for review"}'
```
### `ask` — full agent (~30-60s)
Open a full agent session. Use for business context, analysis, cross-tool tasks.
```bash
# Send task
RESP=$(curl -s -X POST http://gandalf.heron-justitia.ts.net:18792/task \
-H "Content-Type: application/json" \
-d '{"action": "ask", "message": "What is the status of Voluti integration?", "context": "investigating INC-72"}')
TASK_ID=$(echo $RESP | jq -r .task_id)
# Poll until done — exit ONLY on terminal states
for i in $(seq 1 60); do
RESULT=$(curl -s http://gandalf.heron-justitia.ts.net:18792/task/$TASK_ID)
STATUS=$(echo $RESULT | jq -r .status)
case "$STATUS" in
completed|failed|error) echo $RESULT | jq . && break ;;
processing) sleep 5 ;;
*) sleep 5 ;; # transient/unknown state — keep polling
esac
done
```
## Fields
| Field | Required | Description |
|-------|----------|-------------|
| `message` | Yes | What to do. For `publish`, becomes the report title. |
| `action` | No | `publish`, `notify`, `ask` (default). |
| `content` | **Required for `publish`** | HTML/markdown/text for `publish`. Max 5MB. Omit for `notify` and `ask`. |
| `context` | No | What you're working on (repo, PR, feature). |
`publish` and `notify` are synchronous — no polling needed.
## When to Use What
| Need | Action | Speed |
|------|--------|-------|
| Publish HTML/markdown report | `publish` | <1s |
| Send Slack notification | `notify` | <1s |
| Ask business/product question | `ask` | 30-60s |
| Complex cross-tool task | `ask` | 30-300s |
## Constraints
- MUST respect rate limit: 10 requests/min per Tailscale node
- MUST keep content under 5MB inline
- MUST handle agent timeout: 300s maximum
- REQUIRED: Tailscale network only — MUST NOT call from public internet
- REQUIRED: No file uploads — content MUST be inline as JSON string
## Health Check
```bash
curl -s http://gandalf.heron-justitia.ts.net:18792/health
```
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.