Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs API key and token architecture with one scoped token per purpose, separating CI, ops, and read-only access for least privilege.
68% 100%+32 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
Principle: Each API key or authentication token should have a single, well-defined purpose with a descriptive name. This is not binary ("broad vs. narrow") — it's 2–3 tokens with clearly demarcated scopes, one per category of use.
Why this matters:
| Situation | Decision |
|---|---|
| Platform with one caller only (one manual script) | 1 token with minimal scope. Acceptable. |
| Platform with 2+ different callers (CI + agent + scheduled job + manual ops) | Separate by caller category. Minimum 2: one for CI/automation + one for ops. |
| One "universal" token used everywhere | Anti-pattern. Refactor. |
| 10+ fragmented tokens (one per workflow) | Anti-pattern. Consolidate into 2–3 categories. |
Adjust these for your platform, but the pattern is universal:
<service>-ci-bot — deploy, trigger, release actions only. Deployed to CI/automation systems (GitHub Actions, GitLab CI, scheduled tasks, etc.).<service>-ops-bot — full read/write for operational tasks. Stored securely for manual use, agent-driven operations, sysadmin scripts.<service>-readonly-bot — read-only access. For dashboards, monitoring, audit logs. Optional; skip if not needed.Every project using multiple tokens must maintain an API inventory (suggested: docs/api-inventory.md or equivalent) listing:
github-ci-bot, slack-ops-bot)This inventory is your audit trail and your incident-response checklist.
Next to this one in the catalogue, plus more from the same author.