Reviewed official pages
Each Safaricom API page is reviewed as its own source: endpoint facts, request and response shape, callbacks, security needs, implementation obligations, and gaps.
For agent-assisted Daraja builders
Install a Daraja/M-Pesa engineering kit with 24 page-by-page Safaricom API reviews, endpoint indexes, backend templates, callback fixtures, reconciliation rules, credential helpers, doctor checks, and runnable STK, C2B, and B2C samples.
npx daraja-skills install
What ships
Daraja Skills gives coding agents the workflow and files they usually miss: reviewed endpoint references, secure backend scaffolds, callback evidence, reconciliation, go-live checks, and runnable examples.
Each Safaricom API page is reviewed as its own source: endpoint facts, request and response shape, callbacks, security needs, implementation obligations, and gaps.
Copy-paste Next.js Route Handlers, Express, FastAPI, and Laravel templates that keep secrets server-side and persist intents before Daraja calls.
Illustrative fixtures, parser expectations, Postgres starter tables, duplicate handling, ambiguous-state handling, and callback-before-fulfillment rules.
Security credential generation from Safaricom certificates plus a sandbox-to-production checklist for HTTPS callbacks, env separation, approvals, and audit.
Node sample apps for STK, C2B, and B2C with local intent storage, callback endpoints, status routes, and safe offline defaults.
Result-code categories, acknowledgement boundaries, timeout handling, duplicate detection, and product-specific cautions where the reviewed page exposes them.
Official review coverage
The package keeps product pages, multi-endpoint pages, missing production URLs, and official-page discrepancies visible. Agents can load the exact reviewed page before generating code for that flow.
Adapter matrix
The wizard asks what you use and whether the install should be project-local or global. Non-interactive commands are explicit, so CI and setup docs do not guess where your agent reads context.
Project installs go to the nearest Git root. Global installs are supported for Codex, Gemini CLI, Antigravity, Claude Code, Codex plugin packaging, and the Gemini extension; Cursor and AGENTS.md stay project-local.
Writes `.agents/skills/daraja-api` for direct use, or installs a Codex plugin with marketplace metadata when you target `codex-plugin`.
Adds `.cursor/rules/daraja-skills.mdc`, the project-native place Cursor expects repository rules.
Writes `.gemini/skills/daraja-api` or `~/.gemini/skills/daraja-api`; the optional extension target installs `~/.gemini/extensions/daraja-skills`.
Writes the Daraja skill to `.agents/skills/daraja-api` for a workspace, or `~/.gemini/antigravity/skills/daraja-api` globally.
Copies the same `SKILL.md` package into `.claude/skills/daraja-api` for a repo or `~/.claude/skills/daraja-api` for personal use.
Optional root `AGENTS.md` for tools that read plain repository instructions instead of a dedicated skill registry.
Preflight
The doctor checks flow-specific env vars, browser-exposed secrets, callback URL shape, production HTTPS rules, endpoint URL shape, and route reachability for the reviewed flow names.
npx daraja-skills doctor --flow stk --env sandbox
npx daraja-skills doctor --flow b2c --env production --probe
npx daraja-skills security-credential --cert ProductionCertificate.cer --password-env DARAJA_INITIATOR_PASSWORD
Why it matters
Daraja integrations are payment systems, not endpoint snippets. The skill pushes agents to load the reviewed official page, keep credentials out of browser code, persist payment state, and wait for callbacks or reconciliation before declaring success.