Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/groq-enterprise-rbac

@0d57af8
Run it yourself

Use when you run Groq inference for multiple teams and need per-team model allow-lists, spending caps, rate limits, and key rotation — because Groq API keys have no built-in scopes, so access control must live in your gateway. Configure Groq organization management, API key scoping, spending controls, and team access patterns. Trigger with phrases like "groq organization", "groq RBAC", "groq enterprise", "groq team access", "groq spending limits", "groq multi-team".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/groq-enterprise-rbac

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈614 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Groq Enterprise Access Management — Worked Examples

Example 1: Weekly per-team usage dashboard

Aggregate recorded usage into a per-team cost/token report. This consumes the usage records written by recordTeamUsage (see implementation.md Step 4) and the TEAM_CONFIGS budgets (Step 2).

// Weekly usage report per team
function weeklyReport(records: Array<{ team: string; model: string; cost: number; tokens: number }>) {
  const byTeam: Record<string, { cost: number; tokens: number; topModel: string }> = {};

  for (const r of records) {
    if (!byTeam[r.team]) byTeam[r.team] = { cost: 0, tokens: 0, topModel: "" };
    byTeam[r.team].cost += r.cost;
    byTeam[r.team].tokens += r.tokens;
  }

  console.table(
    Object.entries(byTeam).map(([team, data]) => ({
      team,
      cost: `$${data.cost.toFixed(2)}`,
      tokens: data.tokens.toLocaleString(),
      budget: `$${TEAM_CONFIGS[team]?.monthlyBudgetUsd || "N/A"}`,
    }))
  );
}

Sample console output:

┌─────────┬───────────┬─────────────┬──────────┐
│  team   │   cost    │   tokens    │  budget  │
├─────────┼───────────┼─────────────┼──────────┤
│ chatbot │  $142.87  │ 48,120,441  │  $200    │
│ analytics│  $11.03  │  9,880,210  │  $50     │
└─────────┴───────────┴─────────────┴──────────┘

Example 2: A blocked request end-to-end

The analytics team is scoped to only llama-3.1-8b-instant. A call to a larger model is rejected before it ever reaches Groq:

// analytics is NOT authorized for the 70b model
await groqGateway(
  "analytics",
  [{ role: "user", content: "Summarize Q3 revenue" }],
  "llama-3.3-70b-versatile",   // blocked by validateRequest
  512
);
// throws: "Team analytics not authorized for model llama-3.3-70b-versatile"

Swapping to the authorized model succeeds and increments the team's tracked spend:

await groqGateway(
  "analytics",
  [{ role: "user", content: "Summarize Q3 revenue" }],
  "llama-3.1-8b-instant",      // allowed
  512
);
// returns a chat completion; recordTeamUsage adds the cost to teamSpending["analytics"]

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a technical reference and implementation guide for building a custom access control gateway for the Groq API. It includes patterns for per-team rate limiting, spending caps, and key rotation using standard cloud secret managers. No malicious patterns or security risks were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files
version
1.11.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "groq",
  "rbac"
]
All 3 allowed tools
ReadWriteEdit
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/groq-enterprise-rbac