agentleFS
thunderphonethunderphone/skills/get-phone-number/SKILL.md

get-phone-number

Skill0 starsChanged 58 days agoMITView on GitHub

Buy, import, provision, label, or attach a phone number in ThunderPhone. Use when someone asks for a ThunderPhone-managed number, bring-your-own-carrier SIP setup, VoIP connection search, inbound or outbound agent assignment, number limits, porting, or regulatory requirements.

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Choose the source: Use a ThunderPhone-managed number for a quick inbound setup.

    line 13
  2. Very specific:

    Check capacity: Call GET /v1/phone-numbers/limits before provisioning.

    line 17
  3. Distinctive:

    Do not assume the default organization cap applies to this account.

    line 18
  4. Very specific:

    Or connect a carrier: Create POST /v1/voip-connections, test with POST /v1/voip-connections/test, then use the connection's …

    line 58
  5. Very specific:

    Attach agents: Update the number with PATCH /v1/phone-numbers/{phone_number_id} using inbound_agent_id and, where the number supports it, …

    line 63
  6. Distinctive:

    Follow get a phone number and bring your own numbers.

    line 85
  7. Distinctive:

    Never expose SIP credentials or claim unverified inbound/outbound capability.

    line 87
  8. Distinctive:

    Keep porting and regulatory decisions with an authorized human.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Get and configure a phone number

  1. Choose the source. Use a ThunderPhone-managed number for a quick inbound setup. Use a VoIP connection when retaining a carrier or when outbound capability must come from that carrier. SIP credentials and porting remain carrier-specific.
  2. Check capacity. Call GET /v1/phone-numbers/limits before provisioning. Do not assume the default organization cap applies to this account.
  3. Provision a managed number. POST /v1/phone-numbers accepts an optional area_code. Managed numbers are for inbound calls.
{
  "area_code": "${AREA_CODE}"
}
curl --fail-with-body -X POST https://api.thunderphone.com/v1/phone-numbers \
  -H "Authorization: Bearer $THUNDERPHONE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-ThunderPhone-Client: skills/get-phone-number@1.0" \
  --data "$(jq -n --arg area "$AREA_CODE" '{area_code:$area}')"
import os, requests

r = requests.post("https://api.thunderphone.com/v1/phone-numbers",
    json={"area_code": os.environ["AREA_CODE"]},
    headers={"Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}",
             "X-ThunderPhone-Client": "skills/get-phone-number@1.0"}, timeout=30)
r.raise_for_status()
print(r.json())
const response = await fetch("https://api.thunderphone.com/v1/phone-numbers", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.THUNDERPHONE_API_KEY}`,
    "Content-Type": "application/json", "X-ThunderPhone-Client": "skills/get-phone-number@1.0" },
  body: JSON.stringify({ area_code: process.env.AREA_CODE }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
  1. Or connect a carrier. Create POST /v1/voip-connections, test with POST /v1/voip-connections/test, then use the connection's available-numbers, search-numbers, provision-number, or import-numbers endpoint. Read carrier-specific instructions before transmitting SIP credentials.
  2. Attach agents. Update the number with PATCH /v1/phone-numbers/{phone_number_id} using inbound_agent_id and, where the number supports it, outbound_agent_id.
  3. Verify. Fetch GET /v1/phone-numbers/{phone_number_id}. Confirm source, capabilities, status, label, and agent assignments. Place a controlled test call in every direction the number will support.
  4. Escalate human work. Number porting, emergency-address requirements, identity verification, regional registrations, and carrier contracts need a human owner. Do not represent a regulatory step as complete from an API response alone.

Errors

SymptomCauseFix
Limit response blocks purchaseOrganization is at its number capReuse or release a number, or request a reviewed limit change.
No inventory for area codeManaged inventory is unavailableTry an approved alternative or connect a carrier; do not fabricate inventory.
Imported number cannot place callsCarrier/SIP or outbound assignment is incompleteVerify the VoIP connection, capability, and outbound_agent_id.
Incoming call has no agentNo deployed inbound agent is attachedDeploy the agent and patch inbound_agent_id.

Source and safety rules

See references/number-paths.md for the workflow map.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.