Claude Code setup for AgentPing phone call alerts
AgentPing is a phone call alert API for AI agents. This guide shows how to install the AgentPing skill in Claude Code so it can call your phone when a long-running task finishes or when it's stuck and needs your input.
Overview
Claude Code skills are markdown files that teach Claude new capabilities. The AgentPing skill gives Claude the ability to call your verified phone number when you ask it to. It only calls when you explicitly request it — never on its own.
Typical use: you kick off a big refactor or migration, say “call me when it's done,” and walk away. Claude finishes the work, posts results in chat, and if you haven't replied in 5 minutes, your phone rings.
Prerequisites
- Claude Code installed and working
- An AgentPing account with a verified phone number
- An AgentPing API key
Account Setup
- Create an account at agentping.me/signup.
- Verify at least one phone number in the dashboard.
- Go to agentping.me/api-keys and create an API key.
- Copy the key immediately. It starts with
ap_sk_and is only shown once.
Install Skill
Download the skill file and place it in your Claude Code skills directory:
mkdir -p ~/.claude/skills/agentping curl -fsSL https://raw.githubusercontent.com/Sparkling-AI/agentping-sdk/main/claude-code/SKILL.md \ -o ~/.claude/skills/agentping/SKILL.md
Alternatively, if you have the SDK repo cloned locally:
mkdir -p ~/.claude/skills/agentping cp path/to/agentping-sdk/claude-code/SKILL.md ~/.claude/skills/agentping/SKILL.md
Claude Code picks up new skills automatically — no restart needed.
Set API Key
The skill reads the key from the AGENTPING_API_KEY environment variable. Add it to your shell profile so it persists:
# macOS (zsh) echo '\nexport AGENTPING_API_KEY="ap_sk_your_key_here"' >> ~/.zshrc source ~/.zshrc # Linux (bash) echo '\nexport AGENTPING_API_KEY="ap_sk_your_key_here"' >> ~/.bashrc source ~/.bashrc
Restart Claude Code (or open a new terminal) for the variable to take effect. You can verify it's set by asking Claude: “check if AGENTPING_API_KEY is set”.
Usage
Just tell Claude to call you. The skill only activates when you explicitly ask — it will never call on its own. Different phrasings trigger different behavior:
“Call me when it's done”
Best for long-running tasks like refactors, migrations, or big test suites. Claude finishes the work, posts results in chat, and calls you immediately. You asked for a call — you get a call.
> Refactor all API routes to use the new error handling pattern. > Call me when it's done.
“Call me if I don't reply in N minutes”
Best when you might see the chat message in time. Claude posts to chat and schedules a call as a fallback. If you reply before the timer expires, the call is automatically cancelled.
> Run the full test suite. If I don't reply in 10 minutes, > call me with the results.
“Call me if you get stuck”
Best when you're going AFK but want Claude to keep working. Claude continues autonomously and schedules a call before attempting anything that might need your input or approval. If you're watching and approve in time, the call is cancelled. If Claude gets past the potential blocker on its own (e.g., auto-approved), it cancels the call automatically. Your phone only rings if Claude is genuinely stuck waiting for you.
> Implement the new billing integration. If you need a decision > from me, call me. I'll be away for an hour.
“Call me if it fails”
Claude calls immediately when something breaks. Only triggers if a failure actually occurs — not preemptively.
> Deploy to staging and run the smoke tests. > Call me if anything fails.
“Call me before you deploy”
For actions that need your explicit approval (deploys, migrations, destructive operations). Claude calls to get your attention, but answering the phone is not approval — you still need to confirm in chat.
> Prepare the database migration but call me before you run it. > I want to review first.
How It Works
When Claude needs to alert you, it does two things in the same response:
- Posts a chat message with the full context (results, question, error details).
- Creates an AgentPing alert which triggers a phone call. Depending on what you asked for, the call is either immediate or delayed as a fallback.
For delayed alerts (e.g., “call me if I don't reply”): if you reply in chat before the timer expires, Claude acknowledges the alert and the call is cancelled. If you don't reply in time, AgentPing calls your verified phone number.
During the call:
- Press
0to acknowledge - Press
1to snooze 5 minutes
Test
Verify the integration is working by asking Claude to call you:
> Call me right now, I want to test AgentPing.
You should receive a phone call within a few seconds. If not, check the troubleshooting section below.
You can also test the delayed pattern:
> Create a file called test.txt with "hello world" in it. > Call me when it's done.
Claude will create the file, post results in chat, and schedule a call in 5 minutes. Reply in chat to cancel the call, or wait to receive it.
Troubleshooting
Claude doesn't seem to know about AgentPing
- Confirm the skill file exists at
~/.claude/skills/agentping/SKILL.md - Start a new Claude Code session (skills are loaded at startup)
“AGENTPING_API_KEY is not set”
- Make sure you added the export to your shell profile (
~/.zshrcor~/.bashrc) - Run
source ~/.zshrcor restart your terminal - Start a new Claude Code session — it inherits env vars from the shell that launched it
No call received
- Confirm your phone number is verified in AgentPing
- Check whether quiet hours blocked a
normalseverity alert - Check the alert status in your dashboard
Claude asks questions without scheduling a call
- Make sure you explicitly asked Claude to call you (e.g., “call me if you get stuck”)
- The skill only activates on explicit requests — it won't call proactively
- Try re-stating the instruction: “Remember, call me if you need my input”