agentsclimarketplace

Make ai safe copy

Skill kuhung/contextarmor/skills/make-ai-safe-copy

Create sanitized local copies of text, code, configuration, Markdown, CSV, JSON, and similar files before an AI reads them. Use when a user wants to share files or workspace context with ChatGPT, Codex, Claude, Gemini, or another model and mentions secrets, credentials, PII, client data, confidential company terms, privacy, redaction, pseudonymization, or data-leakage risk.From its SKILL.md

Install
npx -y skills add kuhung/contextarmor --skill make-ai-safe-copy

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

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.5 KB, as published. Nobody here has run it

Make AI-Safe Copy

Create deterministic copies under .ai-safe/ before reading file content into the model context. Report what was detected without printing detected values.

Non-negotiable boundary

  • Do not read, summarize, grep, print, or otherwise place the original file contents into model context before sanitization.
  • Use only paths the user supplied or clearly placed in scope.
  • Never pass original contents as a command-line argument.
  • Keep .ai-safe/report.json free of detected values and replacement mappings.
  • Never read, print, summarize, or share .ai-safe/private/mapping.json. It contains the original values and exists only for the local restore command.
  • Never read or place a restored output into model context. Restoration is the final local handoff back to the user.
  • Treat the output as risk reduction, not guaranteed anonymization or compliance. Ask the user to review it before external sharing.

Workflow

  1. Resolve the files or directory in scope without opening file contents.

  2. Run the bundled local scanner:

    node "<skill-root>/scripts/safectx.mjs" \
      --out-dir ".ai-safe" \
      --term "optional company name" \
      <path> [<path> ...]
    

    Repeat --term for each company name, project codename, customer name, or other contextual identifier the user explicitly wants replaced. Omit it when none were provided.

  3. Read .ai-safe/report.json. It contains only paths, counts, categories, sizes, and skipped-file reasons.

  4. Tell the user how many files and findings were processed, which categories appeared, and which files were skipped.

  5. Read or share only files inside .ai-safe/files/ for the downstream AI task. Do not open the originals afterward unless the user explicitly asks and understands that doing so exposes them to the current model context.

  6. Stop after handing the sanitized copy to the downstream task unless the user explicitly asks for private values to be restored into an AI-produced result.

Optional local restoration

Restoration is not part of the default workflow or product promise. When the user explicitly asks for it, first write the AI-produced text with placeholders to a new local file such as .ai-safe/ai-response.txt. Then run:

node "<skill-root>/scripts/safectx.mjs" restore \
  --mapping ".ai-safe/private/mapping.json" \
  --input ".ai-safe/ai-response.txt" \
  --output ".ai-safe/restored-response.txt"

Report only the output path and the returned restored/unresolved counts. Do not open .ai-safe/private/mapping.json or the restored output. If the destination already exists, choose a new filename; never overwrite it.

Supported first-version inputs

The scanner accepts regular UTF-8 text files and common source/config formats: .txt, .md, .csv, .json, .yaml, .yml, .toml, .env, .js, .jsx, .ts, .tsx, .py, .go, .rs, .java, .rb, .php, .sql, .html, .css, and .xml.

It intentionally skips binaries, files over 5 MB, symlinks, generated directories, and Office/PDF files. For Word, PDF, spreadsheet, image, archive, or email inputs, explain that this validation plugin does not yet inspect hidden content, metadata, OCR layers, comments, or attachments; do not create a false sense of safety.

Detection scope

The first version detects common API keys, AWS and GitHub credential shapes, email addresses, phone numbers, US Social Security numbers, payment-card-like numbers, IPv4 addresses, and explicit custom terms. Contextual trade secrets that do not match an explicit term may remain. Tokens are stable across all files in one sanitize run so the private mapping can restore an AI result consistently.

Failure handling

  • If no supported files are found, stop and list the skip reasons.
  • If a file cannot be decoded safely, leave it untouched and report it as skipped.
  • If the output directory overlaps an input, exclude the output directory from scanning.
  • Never silently overwrite the original file.
  • If restore reports unresolved placeholders, tell the user to inspect the local result rather than revealing it to the model.

Keep looking

Skills are one crate of 607,533. 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.