agentleFS
LeadMagicLeadMagic/leadmagic-skills/skills/api-auth-credits/SKILL.md

api-auth-credits

Skill0 starsChanged 4 months agoMITView on GitHub

LeadMagic API authentication, API keys, credit balance, plans, and rate limits. Use when setting LEADMAGIC_API_KEY, calling GET /v1/credits, budgeting a run against a plan's credits, previewing bulk cost, or debugging 401, 402, 403, or 429 responses.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never echo or log LEADMAGIC_API_KEY.

    line 20
  2. Very specific:

    Prefer hosted MCP (https://mcp.leadmagic.io/mcp) for agent workflows — OAuth, no key in shell history.

    line 22

≈ “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

LeadMagic — API auth, credits & plans

Rules

  1. Never echo or log LEADMAGIC_API_KEY. Read from env only; rotate immediately if a key was pasted into chat or committed.
  2. REST auth header is X-API-Key, not Authorization: Bearer.
  3. Prefer hosted MCP (https://mcp.leadmagic.io/mcp) for agent workflows — OAuth, no key in shell history.
  4. Preflight every run: GET /v1/credits (free). Preview anything ≥ 500 credits: POST /v1/batch/preview-cost (free).

Base URL & key

curl -sS "https://api.leadmagic.io/v1/credits" -H "X-API-Key: $LEADMAGIC_API_KEY"

Plans (what a run can afford)

Plans are Basic, Essential, Growth, Professional and Ultimate; current prices, monthly credits and rollover are on leadmagic.io/pricing. Professional and Ultimate include credit-free browse search (5 / 10 req/s) within a fair-use cap — see leadmagic.io/unlimited. Other plans pay 1 credit per returned row. Always read the live balance from GET /v1/credits. Full ladder + budgeting: leadmagic skill → references/plans-and-limits.md.

Status codes

CodeMeaningWhat to do
400ValidationError body names the field and the fix (detail, action)
401Missing/invalid keyCheck header name (X-API-Key) and env var; key may be revoked
402Out of creditsStop the run; report done/remaining; GET /v1/credits; resume after top-up. Never retry-loop
403Plan/entitlement gateFeature not on this plan — say which plan unlocks it
404Unknown routeRetry once with errors[0].context.suggested_endpoint (the canonical path); if absent, don't guess other routes
429Rate limitedHonor Retry-After, exponential backoff + jitter. Sustained hammering escalates temporary blocks
5xxTransientOne retry with backoff, then surface with trace.request_id

Errors are RFC 9457 Problem Details — action is the machine-suggested fix; trace.request_id is what support needs.

Credit accounting facts

  • Not-found results are free on the major finders (email, personal email, mobile, profile→email, company, funding).
  • Email validation bills only conclusive outcomes (valid/invalid). Malformed, no-MX, disposable, and blocklisted addresses come back invalid and bill; unknown (inconclusive SMTP, unverifiable catch-all, timeouts) is free.
  • Bulk jobs bill per successful row at single-request rates; failed rows free.
  • Track spend with free GET /v1/analytics/usage, /credits, /day/{date} (see analytics-observability).

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.