---
name: grammarly-data-safety-guardian
description: |-
  Audit and gate a Grammarly document-submission manifest offline before an authorized
  integration upload. Use when checking supported extensions, file-size and
  text-length metadata, approval, consent, retention, and approved destination.
  This skill never accepts or submits document content and is not a replacement for
  legal, privacy, or security approval. Trigger with "Grammarly submission
  preflight", "Grammarly document safety", or "Grammarly retention check".
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, data-safety, privacy, governance ]
title: grammarly-data-safety-guardian
canonical_url: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian
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-data-safety-guardian/eval-spec.yaml), [references/governance-gate.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/governance-gate.md), [references/submission-contract.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/submission-contract.md), [scripts/audit_submission_manifest.py](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/scripts/audit_submission_manifest.py).
>
> If the user asked to install this Skill, run `npx skilld install jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian`. 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-data-safety-guardian`, 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-data-safety-guardian) 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-data-safety-guardian`. 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-data-safety-guardian --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/grammarly-data-safety-guardian --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 Data Safety Guardian

Run a deterministic preflight over a metadata-only submission manifest. The guard
answers whether a planned document upload satisfies this skill's hard safety gates;
it does not read a document, contact Grammarly, create an upload URL, or retain a
copy of the manifest.

## Overview

The guard is a closed-world policy check for a planned document submission. It
combines Grammarly's documented format and size constraints with local governance
decisions while keeping the document itself outside the workflow.

## When to use

Use for a Writing Score, AI Detection (Beta), or Plagiarism Detection (Beta)
document submission before and after the evaluator inspects the provider-issued upload
origin. The preliminary decision gates OAuth metadata disclosure; the final decision
gates document bytes. Do not trigger for writing or editing content, document previews,
credential troubleshooting, or a request to upload a real document.

## Prerequisites

- A synthetic or production-approved metadata-only manifest matching
  [references/submission-contract.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/submission-contract.md).
- Independent data-owner approval, consent evidence, transfer approval, content
  classification, and acknowledgment of provider retention boundaries.
- Python 3.10 or newer. No document path, document content, credential, network, or
  writable output directory is required.

## Instructions

1. Collect only the manifest described in
   [references/submission-contract.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/submission-contract.md). The
   manifest may contain extension, byte count, optional derived text counts, and
   governance decisions, the pinned API control-plane origin, and the exact sanitized
   presigned upload origin; it must not contain text, content, previews, credentials,
   paths, filenames, full upload URLs, or raw API responses.
2. Run the guard with stdin:

   ```bash
   python3 scripts/audit_submission_manifest.py < submission-manifest.json
   ```

3. Treat `BLOCKED` as a hard stop. Fix the named metadata or governance decision;
   never truncate or transform a document silently to pass the guard.
4. Treat `INSPECTION_READY` as permission only to create a normalized-filename job and
   inspect its sanitized upload origin. Treat `READY` as permission to continue to the separately authorized upload
   workflow, not as proof that a document is lawful, accurate, or safe for a new
   destination.

The script accepts strict JSON, rejects duplicate keys and non-standard constants,
recursively rejects raw text, location, response, and credential fields, and performs
no network or filesystem writes. It enforces the documented extensions, 4,194,304-byte
maximum, UTF-8 text counts, a non-restricted classification, all approval gates, the
exact `https://api.grammarly.com` control-plane origin, and an explicitly approved
public HTTPS S3 presigned-upload origin on the default TLS port.

## Output

Return the deterministic JSON decision and failed check names. Do not echo a
filename, path, text, preview, credential, identifier, or raw document metadata
beyond the safe numeric and enum fields in the script's output.

## Error Handling

`BLOCKED` is a hard stop for an unsupported extension, zero or oversized bytes,
supplied character/word limits, failed approval/consent/retention/destination
checks, unknown fields, duplicate keys, or unsafe content/credential fields. Do not
truncate, split, preview, log, or upload a document to investigate. Invalid input
returns a non-zero exit status and a JSON decision without the rejected value.

## Examples

- A `.docx` manifest at 4,194,304 bytes with approved classification, authority,
  consent, transfer, retention, exact API origin, and exact inspected upload origin:
  `READY`.
- The same content-bound manifest with `presigned_upload_origin: null` and
  `presigned_upload_origin_approved: false`: `INSPECTION_READY`, which permits only
  destination discovery and no document upload.
- A `.txt` manifest missing derived counts or with `word_count: 29`: `BLOCKED`.
- A `restricted` manifest, lookalike API origin, private upload origin, or unapproved
  inspected upload origin: `BLOCKED`.
- A manifest containing `preview`, `raw_text`, or `client_token`: `BLOCKED` before
  any size or governance decision is used.

## Resources

- Read [references/submission-contract.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/submission-contract.md) for
  the closed-world input schema and API-derived limits.
- Read [references/governance-gate.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/grammarly-data-safety-guardian/references/governance-gate.md) when deciding
  what approval, consent, retention, and destination evidence is sufficient.
- The script is intentionally offline and has no write capability.
