ワンクリックで
background-callback
You can send messages to your own input using send-to-claude - for callbacks and autonomous workflows
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
You can send messages to your own input using send-to-claude - for callbacks and autonomous workflows
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | background-callback |
| description | You can send messages to your own input using send-to-claude - for callbacks and autonomous workflows |
IMPORTANT: You (Claude) can now send messages to your own terminal input.
The send-to-claude command lets you write text into your own terminal session, enabling:
You can execute:
send-to-claude "Your message here"
And that message will appear in your input as if the user typed it, waking you up to continue working.
Key mechanism: When you create scripts (Python/Bash/etc), they inherit your terminal's environment variables ($TMUX or $ITERM_SESSION_ID). This means:
send-to-claude calls embeddedsend-to-claude, it finds YOUR session via inherited environment variablesThis enables true autonomous workflows where external programs can call back into you.
Use send-to-claude when the user requests:
Background tasks with notifications
Progress reports
Long-running tasks
When creating Python scripts, embed send-to-claude at key points:
import os
def callback(msg):
os.system(f'send-to-claude "{msg}"')
# Start notification
callback("Starting training...")
# Progress updates
for epoch in range(100):
train()
if epoch % 10 == 0:
callback(f"Progress: {epoch}/100 epochs")
# Completion
callback("Training complete! Check results.")
#!/bin/bash
# Start
send-to-claude "Starting experiments..."
# Run tasks
./experiment1.sh
send-to-claude "Experiment 1 done"
./experiment2.sh
send-to-claude "Experiment 2 done"
# Complete
send-to-claude "All experiments finished!"
When running background tasks:
# Run in background with callback on completion
(python train.py && send-to-claude "Training finished!") &
When the user asks you to run something with notifications:
send-to-claude callsrun_in_background: true if needed)# Create train.py with callback
import os
def train():
# ... training code ...
pass
# Start
os.system('send-to-claude "Starting training..."')
train()
# Done
os.system('send-to-claude "✅ Training complete! Loss: 0.23"')
# Run with background callback
(
./experiment.sh &&
send-to-claude "✅ Experiment finished! Check results in ./output/"
) &
for i in range(100):
process()
if i % 10 == 0:
os.system(f'send-to-claude "Progress: {i}/100"')
send-to-claudeWhen the user says "test the callback mechanism":
(sleep 3 && send-to-claude "✅ Callback test successful! Received after 3 seconds.") &
Then explain: "I've started a background task. You'll receive a message in 3 seconds."