Add real SMS receipt to an OpenCode workflow
Teach OpenCode how to retrieve the message your test needs, then use it to implement and run the receiving step in your existing test suite.
Add the project skill
npx skills add https://www.phonekit.io --skill phonekit --agent opencode --copyThe installer copies Phonekit into .agents/skills/phonekit/SKILL.md, a project directory OpenCode supports. Start a new OpenCode session in that repository. OpenCode exposes discovered skills through its skill tool. Ask it to load phonekit before using the CLI. Its native skills documentation covers discovery and skill permissions.
Choose a Phonekit connection
Allow loading the Phonekit skill and running the commands needed for the task under OpenCode's tool policy. Skill permission does not grant inbox access. Choose the CLI route below, or hosted MCP on an enabled deployment.
Connect through the CLI
npx phonekit@latest docs agents
npx phonekit@latest login --wait 50
npx phonekit@latest number listApprove the workspace and readable numbers in the browser. Exit code 8 means approval is pending; repeat login to resume the same request. Node.js 20.3 or newer and terminal access are required. Follow the quickstart to name the intended number for this project.
Connect through OpenCode MCP
For an enabled hosted deployment, merge this entry into the project's opencode.json, preserving its existing settings:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"phonekit": {
"type": "remote",
"url": "https://www.phonekit.io/api/mcp",
"enabled": true
}
}
}opencode mcp auth phonekit
opencode mcp listApprove the workspace, actions and line selections in Phonekit's browser flow. OpenCode handles OAuth for the remote server; no Phonekit CLI login is required for this route. Follow OpenCode's MCP guide.
The skill uses an authenticated MCP connection when available, otherwise the CLI. Public hosted setup is awaiting acceptance in OpenCode; use the CLI until that check is complete.
Implement a provider-specific verification test
Load the phonekit skill and inspect our existing Supabase Auth setup. Add a test that captures the assigned number’s position, requests signInWithOtp through our configured environment, receives the fresh code within 120 seconds with the Phonekit SDK, and calls verifyOtp. Assert the resulting authenticated user/session. Use the existing test-account lifecycle and report the test result without tokens or codes.
Expected implementation evidence
The configured provider request, the SDK receiving call, the provider verification assertion and a test run. For browser coverage, add the application's final UI assertion too.
Follow the SDK installation guide first. Use the Supabase recipe for the actual provider calls and environment requirements.
Keep the tool useful across model choices
The receiving contract belongs to the workflow: assigned number, mark before send, bounded wait, final assertion. It stays understandable when the model or coding session changes. Keep it in the test and project instructions rather than only in a long chat history.
Questions you may have
Why does OpenCode not list the skill?
Check the .agents/skills/phonekit/SKILL.md path, then review OpenCode’s skill permission policy. A hidden or denied skill is a discovery issue; a CLI authorization failure is a separate runtime issue.
Can I use the .opencode directory instead?
OpenCode documents compatible skill directories too. Use one clear project installation to avoid editing duplicate copies. The installer targets the supported shared .agents/skills directory.
Does changing models change the receiving API?
No. The SDK/CLI contract and selected-number authorization are independent of the model. The agent still needs tools to execute the test and finish its provider or application assertion.