agentsclimarketplace

Grammarly core workflow b

Skill jeremylongshore/claude-code-plugins-plus-skills/skills/.curated/grammarly-core-workflow-b

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-core-workflow-b

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

'Execute Grammarly secondary workflow: Core Workflow B.

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

3.6 KB, 792 tokens by cl100k_base, as published. Nobody here has run it

Grammarly AI & Plagiarism Detection

Overview

Detect AI-generated content and check for plagiarism using Grammarly's detection APIs. AI Detection returns a score (0-100) indicating likelihood of AI generation. Plagiarism Detection compares text against billions of web pages and academic papers.

Instructions

Step 1: AI Detection Pipeline

interface AIDetectionResult { score: number; status: string; }

async function detectAI(text: string, token: string): Promise<AIDetectionResult> {
  const response = await fetch('https://api.grammarly.com/ecosystem/api/v1/ai-detection', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ text }),
  });
  return response.json();
}

// Batch check multiple documents
async function batchAIDetection(documents: Array<{ id: string; text: string }>, token: string) {
  const results = [];
  for (const doc of documents) {
    const result = await detectAI(doc.text, token);
    results.push({ ...doc, aiScore: result.score, isLikelyAI: result.score > 70 });
    await new Promise(r => setTimeout(r, 500));
  }
  return results;
}

Step 2: Plagiarism Detection (Async)

async function checkPlagiarism(text: string, token: string) {
  // Create request
  const createRes = await fetch('https://api.grammarly.com/ecosystem/api/v1/plagiarism', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ text }),
  });
  const { id } = await createRes.json();

  // Poll for results (async processing)
  for (let i = 0; i < 30; i++) {
    await new Promise(r => setTimeout(r, 3000));
    const statusRes = await fetch(`https://api.grammarly.com/ecosystem/api/v1/plagiarism/${id}`, {
      headers: { 'Authorization': `Bearer ${token}` },
    });
    const result = await statusRes.json();
    if (result.status !== 'pending') return result;
  }
  throw new Error('Plagiarism check timed out');
}

Step 3: Combined Content Quality Pipeline

async function fullContentAudit(text: string, token: string) {
  const [score, ai, plagiarism] = await Promise.all([
    scoreDocument({ text }, token),
    detectAI(text, token),
    checkPlagiarism(text, token),
  ]);

  return {
    writingScore: score.overallScore,
    correctness: score.correctness,
    clarity: score.clarity,
    aiLikelihood: ai.score,
    plagiarismScore: plagiarism.score,
    plagiarismMatches: plagiarism.matches?.length || 0,
    passed: score.overallScore >= 70 && ai.score < 50 && plagiarism.score < 20,
  };
}

Error Handling

ErrorCauseSolution
400 text too short< 30 wordsEnsure minimum length
Poll timeoutProcessing taking longIncrease poll duration
AI score inconsistentShort textAI detection works best on 200+ words

Resources

Next Steps

For common errors, see grammarly-common-errors.

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.