Skip to content
OpenSmartRoute
Skillv1.0.0

grammarly-document-evaluator

Validate, plan, and explicitly execute Grammarly Writing Score, AI Detection, or Plagiarism Detection document jobs using the documented create, presigned upload, and poll lifecycle. Use when an opera

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/grammarly-pack/skills/grammarly-document-evaluator/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill grammarly-document-evaluator. Copyright stays with the author (MIT).

Grammarly Document Evaluator

Overview

Run Grammarly's three documented document APIs without inventing a direct-text endpoint. The helper is dry-run by default. Before upload, it can create a metadata-only request that reveals only the sanitized presigned origin for approval. Inspection requires an INSPECTION_READY manifest before OAuth. Live execution requires an exact digest and a READY closed-schema safety manifest bound to the operation, bytes, and both destinations. It reads OAuth credentials only from the process environment, bounds polling locally, and emits no token, full upload URL, raw request identifier, or document text.

Prerequisites

  • Grammarly Enterprise or an institution-wide Grammarly for Education license with API access.
  • Python 3.10 or newer.
  • One supported regular, non-symlink file: .doc, .docx, .odt, .txt, or .rtf.
  • For live execution only, GRAMMARLY_CLIENT_ID and GRAMMARLY_CLIENT_SECRET in the environment.
  • The exact read/write scopes for the selected operation; see API contract.

Instructions

  1. Classify the operation as writing-score, ai-detection, or plagiarism.

  2. Run the helper without --execute from this skill directory:

    python3 scripts/run_document_evaluation.py \
      --operation writing-score \
      --file /approved/input/document.txt
  3. Review the endpoint, scopes, beta marker, local constraints, retention boundary, and content_sha256. A dry run does not contact Grammarly.

  4. Create a preliminary manifest with presigned_upload_origin: null and presigned_upload_origin_approved: false. Continue only when the safety guardian returns INSPECTION_READY, then inspect the actual byte destination. This creates a provider request but performs no upload and emits no signed URL:

    python3 scripts/run_document_evaluation.py \
      --operation writing-score \
      --file /approved/input/document.txt \
      --inspect-upload-origin \
      --confirm-content-sha256 sha256:REVIEWED_DIGEST \
      --approval-manifest /approved/metadata/grammarly-inspection.json
  5. Put that exact sanitized origin and the dry-run metadata into the closed manifest for grammarly-data-safety-guardian. Continue only when it returns READY.

  6. If live transfer is authorized, execute with both bindings:

    python3 scripts/run_document_evaluation.py \
      --operation writing-score \
      --file /approved/input/document.txt \
      --execute \
      --confirm-content-sha256 sha256:REVIEWED_DIGEST \
      --approval-manifest /approved/metadata/grammarly-transfer.json
  7. Treat COMPLETED and FAILED as terminal. A local polling-budget exhaustion means only that this helper stopped; Grammarly documents no processing-time SLA.

  8. Interpret all score fields on the documented 0..1 scale. Never convert them into unsupported pass/fail policy unless the operator supplies that policy separately.

Output

  • Dry run: a JSON transfer plan with content digest, byte size, extension, endpoint, scopes, beta status, and documented retention boundaries.
  • Upload-origin inspection: sanitized public HTTPS origin, hashed request identifier, hashed full URL, and document_uploaded: false; the signed path/query remains secret.
  • Execute: the same plan plus approved origin, hashed request identifier, terminal status, and exact API-specific score fields when completed.
  • No raw content, OAuth token, client secret, presigned URL, or raw provider body.

Error Handling

Failure Meaning Safe response
Unsupported, empty, oversized, symlinked, or changing file Local safety check failed Stop and prepare a new approved regular file.
Fewer than 30 words or more than 100,000 UTF-8 characters in .txt Documented text constraint failed Correct the source; do not split and recombine scores.
Digest confirmation mismatch Reviewed bytes differ from execution bytes Stop and repeat dry run and approval.
Missing, blocked, or mismatched approval manifest Governance decision does not bind this operation, content, phase, or origin Stop before OAuth or before upload.
Newly issued upload origin differs from the approved inspected origin Provider byte destination changed Stop before PUT; inspect and approve again.
OAuth or API HTTP failure Provider boundary rejected the operation Report only phase and status code; never dump bodies or credentials.
Unknown status or result field Response differs from the pinned contract Fail closed and verify current official documentation.
Polling budget exhausted Local cap reached; provider limit is undocumented Return deferred/unknown, never fabricate a score.

Examples

AI detection request: choose ai-detection, disclose that it is Beta, require ai-detection-api:read,write, and return only average_confidence and ai_generated_percentage on a 0..1 scale.

“Send this paragraph directly to /v1/check”: refuse that contract. Grammarly's document APIs require a filename-only creation body, a presigned file upload, and status polling.

Provider outage: return an explicit unavailable or deferred result. Never substitute an invented score.

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-grammarly-doc-9aa365/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-grammarly-doc-9aa365.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-grammarly-doc-9aa365",
  "kind": "skill",
  "name": "grammarly-document-evaluator",
  "description": "Validate, plan, and explicitly execute Grammarly Writing Score, AI Detection, or Plagiarism Detection document jobs using the documented create, presigned upload, and poll lifecycle. Use when an operator needs to score a document, detect AI-generated content, check originality, diagnose a malformed document submission, or verify API result fields. Do not use for browser-editor grammar suggestions, live text rewriting, license deletion, or undocumented webhooks. Trigger with \"score this document\", \"run Grammarly AI detection\", \"check this document for plagiarism\", or \"diagnose this Grammarly document job\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "grammarly",
      "document-analysis",
      "security",
      "operator-workflow",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Validate, plan, and explicitly execute Grammarly Writing Score, AI Detection, or Plagiarism Detection document jobs using the documented create, presigned upload, and poll lifecycle. Use when an operator needs to score a document, detect AI-generated content, check originality, diagnose a malformed document submission, or verify API result fields. Do not use for browser-editor grammar suggestions, live text rewriting, license deletion, or undocumented webhooks. Trigger with \"score this document\", \"run Grammarly AI detection\", \"check this document for plagiarism\", or \"diagnose this Grammarly document job\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/grammarly-pack/skills/grammarly-document-evaluator/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/grammarly-pack/skills/grammarly-document-evaluator/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/grammarly-pack/skills/grammarly-document-evaluator/SKILL.md"
    },
    "compatibility": "Agent Skills-compatible hosts; requires Python 3.10+",
    "allowed_tools": [
      "Bash(python3:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Grammarly Document Evaluator\n\n## Overview\n\nRun Grammarly's three documented document APIs without inventing a direct-text\nendpoint. The helper is dry-run by default. Before upload, it can create a metadata-only\nrequest that reveals only the sanitized presigned origin for approval. Inspection\nrequires an `INSPECTION_READY` manifest before OAuth. Live execution requires an exact digest and a READY closed-schema safety manifest bound to the\noperation, bytes, and both destinations. It reads OAuth credentials only from the\nprocess environment, bounds polling locally, and emits no token, full uplo",
  "cost": {
    "context_tokens": 1392
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-grammarly-doc-9aa365/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.