agentsclimarketplace

Grammarly enterprise rbac

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/grammarly-pack/skills/grammarly-enterprise-rbac

425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill grammarly-enterprise-rbac

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

'Configure Grammarly enterprise role-based access control.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.4 KB, as published. Nobody here has run it

Grammarly Enterprise RBAC

Overview

Grammarly enterprise deployments manage writing quality across teams with different access levels. Organization admins control style guides, tone profiles, and brand rules. Team admins assign seats and configure suggestion types (clarity, engagement, delivery). Members write with team defaults while guests get read-only access to shared documents. HIPAA and SOC 2 compliance in regulated industries require audit trails on who accessed which writing suggestions and AI detection results.

Role Hierarchy

RolePermissionsScope
Org AdminManage billing, SSO config, all style guides, API credentialsOrganization-wide
Team AdminAssign seats, configure suggestion settings, manage style guidesOwn team
MemberWrite with team settings, access scoring and AI detection APIsOwn team
GuestView shared documents, read-only style guide accessInvited documents only
API ServiceOAuth-scoped access to scoring, AI detection, plagiarism APIsPer-credential scope

Permission Check

async function checkGrammarlyAccess(userId: string, team: string, scope: string): Promise<boolean> {
  const response = await fetch(`${GRAMMARLY_API}/organizations/${ORG_ID}/permissions`, {
    headers: { Authorization: `Bearer ${GRAMMARLY_OAUTH_TOKEN}`, 'Content-Type': 'application/json' },
  });
  const perms = await response.json();
  const userPerms = perms.members.find((m: any) => m.id === userId);
  if (!userPerms) return false;
  return userPerms.team === team && userPerms.scopes.includes(scope);
}

Role Assignment

async function assignTeamRole(email: string, team: string, role: 'admin' | 'member' | 'guest'): Promise<void> {
  await fetch(`${GRAMMARLY_API}/organizations/${ORG_ID}/teams/${team}/members`, {
    method: 'POST',
    headers: { Authorization: `Bearer ${GRAMMARLY_OAUTH_TOKEN}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ email, role }),
  });
}

async function revokeTeamAccess(email: string, team: string): Promise<void> {
  await fetch(`${GRAMMARLY_API}/organizations/${ORG_ID}/teams/${team}/members/${email}`, {
    method: 'DELETE',
    headers: { Authorization: `Bearer ${GRAMMARLY_OAUTH_TOKEN}` },
  });
}

Audit Logging

interface GrammarlyAuditEntry {
  timestamp: string; userId: string; team: string;
  action: 'score_check' | 'ai_detection' | 'plagiarism_scan' | 'style_guide_edit' | 'seat_change';
  scope: string; documentId?: string; result: 'allowed' | 'denied';
}

function logAccess(entry: GrammarlyAuditEntry): void {
  console.log(JSON.stringify({ ...entry, orgId: process.env.GRAMMARLY_ORG_ID }));
}

RBAC Checklist

  • Separate OAuth credentials per team, never share org-level keys
  • OAuth scopes limited to required APIs per team (score, AI, plagiarism)
  • Style guide editing restricted to team admins and above
  • Guest role enforced for external collaborators
  • API token rotation enforced quarterly
  • SSO/SAML configured for all user authentication
  • Seat usage audited monthly to reclaim inactive licenses

Error Handling

IssueCauseFix
401 Unauthorized on API callExpired OAuth tokenRefresh token or regenerate credentials
User cannot access AI detectionTeam lacks ai-detection:read scopeAdd scope to team's OAuth client
Style guide edits not savingUser has member role, not adminPromote to team admin or request admin to edit
Guest sees full suggestion setRole not properly scoped on inviteRe-invite with explicit guest role
Seat limit reachedAll team licenses assignedRemove inactive members or purchase additional seats

Resources

Next Steps

See grammarly-security-basics.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.