Skip to content

Instantly share code, notes, and snippets.

View laiso's full-sized avatar
☀️

laiso/Kazuya HIRASAWA laiso

☀️
View GitHub Profile
@laiso
laiso / red-pen-loop.js
Last active August 14, 2026 06:04
/red-pen-loop: Fix until the red pen runs dry.
// red-pen-loop — one model marks your work, another fixes it, until the marks are gone.
//
// Codex reviews, Claude fixes, repeat. Keeping the grader and the fixer separate is
// the point: a model grading its own homework is the failure mode this avoids.
//
// Save as .claude/workflows/red-pen-loop.js (or ~/.claude/workflows/ for every project).
// It runs as /red-pen-loop — the command name comes from meta.name, not the filename.
//
// Needs the `codex` CLI on PATH and `Bash(codex exec:*)` in your allowlist, or the
// review agent stops to ask for permission on every round.
@laiso
laiso / models.json
Created June 22, 2026 06:45
Preferred Networks (PLaMo) Provider in ~/.pi/agent/models.json
{
"providers": {
"Preferred Networks (PLaMo)": {
"baseUrl": "https://platform.preferredai.jp/api/completion/v1",
"api": "openai-completions",
"apiKey": "$PLAMO_API_KEY",
"models": [
{
"id": "plamo-3.0-prime",
"name": "PLaMo 3.0 Prime",
@laiso
laiso / models.json
Created June 22, 2026 05:51
Sakana AI Console Provider in ~/.pi/agent/models.json
{
"providers": {
"Sakana AI Console": {
"baseUrl": "https://api.sakana.ai/v1",
"api": "openai-responses",
"apiKey": "$SAKANA_API_KEY",
"models": [
{
"id": "fugu",
"name": "Sakana Fugu",
@laiso
laiso / README.md
Last active March 24, 2026 05:05
Claude Code Plans CLI - List and resume Claude Code sessions with plans

Claude Code Plans CLI

A tool to list and resume Claude Code sessions with plans.

Installation

curl -LO https://gist.githubusercontent.com/laiso/c79649fea1bd3534b00faa7dfb24885d/raw/cc-plans.py
chmod +x cc-plans.py
mv cc-plans.py ~/bin/cc-plans
@laiso
laiso / config.json
Last active March 6, 2026 05:01
Grok 4.20 Exp Beta on OpenCode https://console.x.ai/
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"xai": {
"npm": "@ai-sdk/xai",
"name": "xAI Grok",
"options": {
"apiKey": "xai-YOUR_API_KEY",
"baseURL": "https://api.x.ai/v1"
},
@laiso
laiso / README.md
Last active February 15, 2026 04:09
OpenClaw[TIPS]: Connect from the openclaw-cli container to openclaw-gateway
gh repo clone openclaw/openclaw
cd openclaw
./docker-setup.sh

# ...onboarding...

docker compose run openclaw-cli status
docker compose run openclaw-cli dashboard --no-open
@laiso
laiso / settings.local.json
Last active March 29, 2026 02:51
Claude Code Agent teams with OpenRouter models via '...Use Sonnet/Haiku for the teammate.'
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-or-v1-your-openrouter-api-key",
"ANTHROPIC_BASE_URL": "https://openrouter.ai/api",
"ANTHROPIC_MODEL": "openrouter/pony-alpha",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "openrouter/pony-alpha",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "openrouter/pony-alpha",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "openrouter/pony-alpha",
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
@laiso
laiso / settings.local.json
Created January 29, 2026 09:20
Claude Codeがauto compactしたらHooksで任意の指示を差し込む
{
"hooks": {
"SessionStart": [
{
"matcher": "compact",
"hooks": [{
"type": "command",
"command": "echo 'ここからは関西弁で応答してください。'",
"timeout": 30
}]
@laiso
laiso / note.md
Created January 10, 2026 03:37
claude code logs , https://github.com/blacksmithgu/obsidian-dataview , copy from .claude/projects/**.jsonl

const PATH = "logs/sample.jsonl";
const N = 400;

const raw = await dv.io.load(PATH);
if (typeof raw !== "string") {
  dv.paragraph(`load failed: ${PATH}`);
  return;
}
@laiso
laiso / settings.local.json
Last active April 22, 2026 09:07
.claude/settings.local.json: To automatically open plan files in VS Code whenever they are created or updated by the Write tool. Claude Code
{
"hooks": {
"PreToolUse": [
{
"matcher": "ExitPlanMode",
"hooks": [
{
"type": "command",
"command": "code \"$(ls -t ~/.claude/plans/*.md | head -1)\"",
"timeout": 5