agentsclimarketplace

Grammarly install auth

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/grammarly-pack/skills/grammarly-install-auth

'Install and configure Grammarly SDK/CLI authentication.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill grammarly-install-auth

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

What its file declares

Copied from the file, not written here

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

2.9 KB, 555 tokens by cl100k_base, as published. Nobody here has run it

Grammarly Install & Auth

Overview

Configure Grammarly API authentication using OAuth 2.0 Bearer tokens. Grammarly provides three main APIs: Writing Score API, AI Detection API, and Plagiarism Detection API. All use the same auth pattern via api.grammarly.com.

Prerequisites

  • Grammarly Enterprise account with API access
  • OAuth credentials from Grammarly admin portal
  • Required scopes: scores-api:read, scores-api:write

Instructions

Step 1: Configure Environment

# .env (NEVER commit)
GRAMMARLY_CLIENT_ID=your_client_id
GRAMMARLY_CLIENT_SECRET=your_client_secret
GRAMMARLY_ACCESS_TOKEN=  # Populated after OAuth

Step 2: Obtain Access Token

// auth.ts
import 'dotenv/config';

async function getAccessToken(): Promise<string> {
  const response = await fetch('https://api.grammarly.com/ecosystem/api/v1/oauth/token', {
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: new URLSearchParams({
      grant_type: 'client_credentials',
      client_id: process.env.GRAMMARLY_CLIENT_ID!,
      client_secret: process.env.GRAMMARLY_CLIENT_SECRET!,
    }),
  });
  const { access_token, expires_in } = await response.json();
  console.log(`Token obtained, expires in ${expires_in}s`);
  return access_token;
}

Step 3: Verify Connection

async function verify(token: string) {
  const response = await fetch('https://api.grammarly.com/ecosystem/api/v2/scores', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ text: 'This is a test sentence for verification.' }),
  });
  if (response.ok) console.log('Grammarly API connection verified');
  else console.error('Verification failed:', response.status);
}

Error Handling

ErrorCauseSolution
401 UnauthorizedInvalid or expired tokenRe-authenticate
403 ForbiddenMissing API scopesCheck enterprise admin settings
invalid_clientWrong credentialsVerify client ID and secret

Resources

Next Steps

After auth, proceed to grammarly-hello-world.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. 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.