---
name: grammarly-api-reliability
description: >-
  Analyze a sanitized Grammarly asynchronous job receipt without sending requests, reading document content, or guessing provider SLAs. Use when a Writing Score or similar document job is PENDING, FAILED, or COMPLETED and a bounded retry decision is needed. Trigger with "analyze Grammarly job receipt", "Grammarly 429 retry", or "Grammarly job status".
allowed-tools: Bash(python3:*)
version: 2.0.0
author: Jeremy Longshore <jeremy@intentsolutions.io>
license: MIT
compatibility: Agent Skills-compatible hosts; requires Python 3.10+
tags: [ saas, grammarly, reliability, retries, privacy ]
title: grammarly-api-reliability
canonical_url: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability
last_updated: 2026-10-07T06:06:28.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [eval-spec.yaml](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/eval-spec.yaml), [references/official-contract.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/official-contract.md), [references/receipt-schema.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/receipt-schema.md), [scripts/analyze_job_receipt.py](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/scripts/analyze_job_receipt.py).
>
> If the user asked to install this Skill, run `npx skilld install jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/grammarly-api-reliability`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/grammarly-api-reliability`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/grammarly-api-reliability --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/grammarly-api-reliability --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Grammarly API Reliability

This is a read-only, metadata-only decision aid for asynchronous Grammarly jobs. It
does not call Grammarly, upload text, inspect a response body, create a token, or
retry a request. It turns one strict JSON receipt into a bounded, evidence-labeled
classification.

## Overview

Use this skill to classify a sanitized asynchronous receipt without treating a
provider response as permission to retry blindly.

## Prerequisites

No credentials, network access, Grammarly account, document, or response body is
needed. Python 3.10+ is the only runtime requirement. If a separate live integration
is being designed, use the official [OAuth 2.0 credentials documentation](https://developer.grammarly.com/oauth-credentials.html)
(accessed 2026-09-04) to determine access; live authentication and requests are
outside this skill.

## Instructions

### Step 1: Run the deterministic analyzer

Run the bundled script against a receipt file or standard input:

```bash
python3 scripts/analyze_job_receipt.py receipt.json
cat receipt.json | python3 scripts/analyze_job_receipt.py -
python3 scripts/analyze_job_receipt.py --self-test
```

The analyzer accepts only the documented metadata schema in
[`references/receipt-schema.md`](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/receipt-schema.md). It recursively rejects
keys associated with document content, bodies, text, headers, or tokens, including
those hidden in an otherwise unknown nested object. Unknown keys, malformed values,
inconsistent 429 evidence, and attempts above the cap fail closed.

### Step 2: Apply the decision rules

- `COMPLETED` is terminal. Do not retry it.
- `PENDING` is not a failure. Report that the receipt is still pending; do not invent
  a polling interval, timeout, SLA, quota, or freshness guarantee.
- `FAILED` with `http_status: 429` is the only status-specific retry class in this
  skill. If a numeric `retry_after_seconds` value is supplied, the output preserves
  that evidence as the wait instruction. If it is absent, the output names
  Grammarly's documented 2-second-base exponential-backoff guidance for 429 only;
  it does not invent a maximum, jitter rule, quota, or service promise.
- Any failure without 429 evidence is `MANUAL_REVIEW`: the receipt alone does not
  establish that retrying is safe.
- A failed receipt at `attempts == max_attempts` is `ATTEMPT_CAP_REACHED` and must
  not receive retry guidance. An input with `attempts > max_attempts` is invalid.

The cap is caller-supplied policy, not a Grammarly limit. The analyzer never changes
the cap or performs the next attempt. A human or caller-owned controller must decide
whether a retry is appropriate after reviewing the emitted classification.

### Step 3: Enforce the safety boundaries

Use synthetic receipts for evaluation. Never paste document text, raw request or
response bodies, HTTP headers, access tokens, authorization values, or secrets. The
script is standard-library-only and has no network, filesystem-write, subprocess,
or deletion behavior. It reports validation errors rather than trying to sanitize
unsafe input.

Read the focused references only when needed:

- [`references/receipt-schema.md`](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/receipt-schema.md) — exact accepted
  fields, recursive rejection rules, and output classes.
- [`references/official-contract.md`](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/official-contract.md) — the
  primary Grammarly Writing Score contract and the narrow 429 guidance boundary.

## Output

The JSON result names the accepted status, attempts, cap, classification, and a
short evidence-bounded guidance string. It never echoes submitted metadata beyond
those safe scalar fields and never fabricates an SLA, timeout, quota, result body,
or document diagnosis.

## Error Handling

Invalid JSON, forbidden recursive keys, unknown fields, unsupported statuses,
contradictory 429 evidence, and cap violations are errors. The script exits non-zero
and emits no classification. A valid non-429 failure is `MANUAL_REVIEW`, not a retry
recommendation.

## Examples

- A completed receipt returns `COMPLETED_TERMINAL` and no retry instruction.
- A failed 429 with `retry_after_seconds: 17` returns `RETRY_AFTER_EVIDENCE` and
  preserves 17 seconds.
- A nested `diagnostics.response_body` or `credentials.access_token` field is
  rejected before classification.

## Resources

- [`references/receipt-schema.md`](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/receipt-schema.md) — accepted fields,
  recursive rejection, and classifications.
- [`references/official-contract.md`](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-api-reliability/references/official-contract.md) — primary
  Grammarly contract and narrow 429 guidance.
- [Grammarly Writing Score API](https://developer.grammarly.com/writing-score-api.html)
  (accessed 2026-09-04).

## Official source

[Grammarly Writing Score API](https://developer.grammarly.com/writing-score-api.html)
(accessed 2026-09-04).
