All skills
aktsmm avatar

/azure-screenshot-mask

@e6b8215
by yamapanaktsmm/agent-skills26 stars
4

Mosaic environment-sensitive areas (tenant name, user avatar, subscription name / ID, resource group, internal hostnames) on Azure Portal screenshots before publishing to blogs, Qiita, Medium, slides, or demos. Use when sanitizing screenshots, masking env info, or preparing portal captures for public sharing. Keywords: Azure Portal, screenshot, mask, mosaic, sanitize, tenant, subscription, public publishing, blur, redact.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/azure-screenshot-mask

This session only. Nothing lands on disk.

referencesadvanced-masking.md

≈607 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Advanced Azure Screenshot Masking

Script Usage

The bundled scripts/mosaic-azure-screenshots.py uses Pillow to apply pixel mosaics.

Argument Purpose
path PNG file or directory
--region L,T,R,B Additional region; repeatable
--topright-width, --topright-height Adjust the default tenant strip
--no-topright Disable the default top-right strip
--block Mosaic block size
--backup Preserve <name>.bak.png before overwrite

Install dependency with pip install pillow in the selected Python environment.

OCR Fallback

When static coordinates miss text in a table or details pane, use OCR to obtain text and bbox [x1, y1, x2, y2], select rows containing confirmed sensitive values, and mosaic the matching boxes with Pillow. Never place real tenant, subscription, customer, or resource identifiers in reusable examples.

for line in page.text_lines:
    text = line.text.strip().lower()
    if any(pattern in text for pattern in mask_patterns):
        x1, y1, x2, y2 = [int(value) for value in line.bbox]
        region = image.crop((x1, y1, x2, y2))
        small = region.resize((max(1, (x2 - x1) // 8), max(1, (y2 - y1) // 8)), Image.NEAREST)
        image.paste(small.resize((x2 - x1, y2 - y1), Image.NEAREST), (x1, y1))

OCR-Guided Highlight

For a public before/after explanation, use the confirmed OCR box with ImageDraw.rectangle to highlight rather than hide text. Limit highlights to two or three per image and connect them to the article text.

from PIL import ImageDraw

draw = ImageDraw.Draw(image)
draw.rectangle([x1, y1, x2, y2], outline="red", width=3)

Practical Tips

  • Keep viewport dimensions stable before reusing regions.
  • Determine coordinates on one representative image, then visually verify every image.
  • Use a normal image annotation tool when only one or two images need a solid cover; the script is most useful for repeatable batches.
  • Investigate IP ownership before deciding whether an IP address is safe to publish.

Source: SKILL.md on GitHub

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill is a security-focused utility designed to redact sensitive information (such as tenant IDs, subscription names, and user avatars) from Azure Portal screenshots. It provides a Python script that uses the standard Pillow library to apply mosaic effects to local image files. The analysis found no malicious code, unauthorized network access, or attempts to exfiltrate data.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at e6b8215. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 3 months ago
argument-hint
対象スクリーンショット (PNG / フォルダ) と、追加でマスクしたい領域があれば領域名や座標
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}

README badge

README badge for aktsmm/agent-skills/azure-screenshot-mask