Skip to content

Instantly share code, notes, and snippets.

View raine's full-sized avatar

Raine Virta raine

View GitHub Profile
@raine
raine / hello.ts
Last active April 30, 2026 20:27
import {
query,
tool,
createSdkMcpServer,
} from '@anthropic-ai/claude-agent-sdk';
import { z } from 'zod';
const rollDice = tool(
'roll_dice',
'Roll an N-sided die and return the result as a number',

The whole thing, end to end

Layer 1 — The coordinator (/phased-implement)

You invoked /phased-implement add support for https://github.com/QwenLM/qwen-code. That skill loads a coordinator that never writes source code itself — it only writes plans, spawns workers, and verifies their output. Its job is to turn one big task into a DAG of smaller phases that can be parallelized safely.

Phase 0 — Snapshot

Recorded START_HEAD=03f07d3, integration branch qwen, verified the working tree was clean. Created history/2026-04-28-phased-qwen-support/ with prompts/, captures/, and a manifest.md tracking each phase's state (pending → working → done-unverified → merging → merged).

history/ is gitignored and symlinked across all worktrees by workmux's setup, so the coordinator and all workers can read/write the same plan, prompts, and result sentinels without committing them.

  You │ # Phased Implement — phase core
      │ 
      │ You are an isolated worktree agent. The coordinator spawned you to implement
      │ **only** this phase of a larger phased plan. Do not work on other phases. Do
      │ not modify the master plan.
      │ 
      │ ## Phase
      │ 
      │ - **id:** core

│ - description: Wire Qwen into the agent enum, profile registry, config

@raine
raine / SKILL.md
Last active April 28, 2026 20:40
name phased-implement
description Coordinator skill that runs a multi-phase implementation across workmux worktrees. Each phase invokes /implement in its own worktree; the coordinator handles dispatch ordering (sequential, parallel, DAG), merge sequencing, and failure isolation. Composes /implement, /merge, workmux, and consult-llm.
allowed-tools Bash, Read, Write, Glob, Grep
disable-model-invocation true

Phased Implement

You are a coordinator. You never edit source files yourself. You write a master plan, spawn workmux worktree agents that each run /implement for one phase, and merge their work back via /merge in deterministic topological order.

name consult-llm
description How to invoke the consult-llm CLI. Canonical reference for the invocation contract, flags, stdin/stdout format, and multi-turn. Load this before calling consult-llm from any workflow skill (/consult, /collab, /debate, /collab-vs, /debate-vs).
allowed-tools Bash

Reference for invoking the consult-llm CLI. Workflow skills delegate here for mechanics; they focus on orchestration.

Invocation

PR #142

Summary

PR #142 reworks PR checkout (workmux add --pr N) to avoid creating fork-<owner> remotes. Instead of fetching from the fork and setting up a named remote for tracking, it fetches refs/pull/<N>/head from the base repo and stores the head repo URL directly in branch.<name>.remote.

This document explains why that approach breaks multiple core workmux and git

name blog-media-processor
description Use it when user asks to add images, photos, or videos to a blog post
allowed-tools Read, Write, Edit, Bash, Glob

You are a blog media processor for a Zola static site. Your job is to take photos and videos from the source directory, convert them to web-optimized formats, and place them in the correct location for the blog post.

> Use anki-llm-batch to pick random cards from Glossika decks, and print the English and Japanese
fields for each, pick 10 cards from each deck, and save to a markdown file.
⏺ I'll help you pick random cards from Glossika decks using anki-llm-batch and save them to a markdown
file.
Let me first explore the codebase to understand the structure of the Glossika decks and how to use
anki-llm-batch.
⏺ Bash(anki-llm-batch --help)
let mut command = Command::new("chromedriver");
command.kill_on_drop(true); // Useful for killing the process in case of a panic
command.stdout(Stdio::piped());
let mut child = command.spawn().expect("chromedriver failed to start");
// [...] read stdout etc.
child.start_kill()?;
child.wait().await?;
use itertools::Itertools;
use std::fmt;
#[derive(Debug)]
struct Range {
start: i32,
end: i32,
}
impl Range {