⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v0.1.0

mi-ripple

miyang-ai@miyang-ai⭐ 240 stars· last commit 2mo ago· 1 open issues

Diagnose and restore grid-like, granular, scale-like, tiled, or ripple artifacts in AI-generated images. Use when a user asks to remove digital ripple, decoder grids, repeating scales, honeycomb texture, granular AI texture, or degradation caused by iterative image-to-image editing.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 240 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Mi-Ripple

AI Skill — start here

Open skills/mi-ripple/SKILL.md →

AI coding agents should read this skill first. It contains the complete workflow for installing Mi-Ripple, processing an image, inspecting the generated evidence, requesting permission before paid regeneration, and returning the actual result. The skill never authorizes paid regeneration on the user's behalf.

Install it from the canonical repository:

https://github.com/miyang-ai/Mi-Ripple

Direct skill URL:

https://raw.githubusercontent.com/miyang-ai/Mi-Ripple/main/skills/mi-ripple/SKILL.md

Reference implementation of Mi-Ripple, MIYANG's diagnosis-guided workflow for restoring grid-like and scale-like artifacts introduced by iterative, reference-conditioned AI image editing.

Try Mi-Ripple on the MIYANG Lab website →

Experience Mi-Ripple with Alice →

Visit the MIYANG official website →

Mi-Ripple does not apply one aggressive filter to every image. It first separates:

  • Periodic lattice artifacts: isolated spectral peaks that can be selectively notched with low measured distortion.
  • Granular artifacts in unstructured regions: 3–8 px texture that can be reduced behind a structure-protection mask.
  • Content-entangled artifacts: repeated texture overlapping hair, foliage, fabric, or other legitimate detail. These require human review or optional regeneration from a cleaned reference.

[!IMPORTANT] This is a research implementation, not a universal artifact detector. Automatic scores are triage signals. Review the generated heat maps and comparison boards before accepting an output.

Before / after

These are the five comparisons currently used by the MIYANG Lab tool. Open an image to inspect it at native resolution.

Night hair · Image 2.5

BeforeAfter
Night hair before restorationNight hair after restoration

The images share the same source composition but come from separate experimental branches: direct regeneration versus cleaned-reference regeneration followed by selective lattice notching. Regeneration is not pixel-aligned restoration and can change fine semantic details.

Moss gorge · Image 2.5

BeforeAfter
Moss gorge Image 2.5 before restorationMoss gorge Image 2.5 after restoration

Moss gorge · Image 2.0

BeforeAfter
Moss gorge Image 2.0 before restorationMoss gorge Image 2.0 after restoration

Rainforest path · Image 2.0

BeforeAfter
Rainforest path before restorationRainforest path after restoration

Ice cave · Image 2.0

BeforeAfter
Ice cave before restorationIce cave after restoration

Installation

Python 3.11 or newer is required.

git clone https://github.com/miyang-ai/Mi-Ripple.git
cd Mi-Ripple
python -m venv .venv
source .venv/bin/activate
pip install -e .

OpenCV-based face protection is optional:

pip install -e ".[face]"

For development:

pip install -e ".[dev]"
pytest

Quick start

Local deterministic processing is the default:

mi-ripple input.png output/

The output directory contains:

  • a diagnosis JSON and visual inspection boards;
  • intermediate masks and processed candidates;
  • a machine-readable XML decision trace;
  • a final image when the deterministic route can deliver one;
  • a sidecar containing hashes, parameters, measurements, and the final outcome.

If artifacts overlap image content, the default route stops with needs_human_decision. Optional regeneration requires explicit permission and a MIYANG API key:

export MIYANG_API_KEY=...
mi-ripple input.png output/ --allow-regen --max-regen 1

Regeneration may change image content, dimensions, and color. Its output remains a candidate until a person accepts it.

Python API

from pathlib import Path

from mi_ripple.pipeline import run

result = run(Path("input.png"), Path("output"))
print(result["outcome"], result["final"])

Individual measurement and processing modules are also public:

  • mi_ripple.diagnosis
  • mi_ripple.scale_index
  • mi_ripple.notch
  • mi_ripple.spatial
  • mi_ripple.reference
  • mi_ripple.verify

Method and evidence

The accompanying paper is:

Yicheng Xu, Jiayin Chen, and Muting Wang. Mi-Ripple: Restoring Images Degraded by Iterative AI Editing. MIYANG Technology (Shanghai) Co., Ltd., 2026.

The LaTeX manuscript, references, and publication figures are included in paper/.

Paper figures

Restoration results across moss gorge, wisteria tunnel, and ice cave

Artifact formsTargeted restoration
Periodic lattice and granular artifact formsBefore and after facial restoration

Selective notch versus broad spectral suppression

Input, selective notch, and soft-clipping comparison

[![Residual comparison for selective notch and soft clipping](https://raw.githubu

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/mi-ripple/SKILL.md7.2 KBupstream ↗
    ---
    name: mi-ripple
    description: Diagnose and restore grid-like, granular, scale-like, tiled, or ripple artifacts in AI-generated images. Use when a user asks to remove digital ripple, decoder grids, repeating scales, honeycomb texture, granular AI texture, or degradation caused by iterative image-to-image editing.
    license: MIT
    compatibility: Requires Python 3.11+, local file access, and permission to run shell commands. Network access and a MIYANG API key are optional and only needed for explicitly authorized regeneration.
    metadata:
      author: MIYANG
      version: "0.1.0"
      repository: "https://github.com/miyang-ai/Mi-Ripple"
    ---
    
    # Restore digital-ripple artifacts
    
    Use the MIYANG `mi_ripple` package to diagnose first, choose only a compatible
    treatment, inspect the visual evidence, and return the actual output files to the
    user.
    
    Do not treat this as a generic denoiser. The workflow distinguishes:
    
    1. isolated periodic lattice artifacts, which can be selectively notched;
    2. granular artifacts in unstructured areas, which can receive masked reduction;
    3. artifacts entangled with hair, foliage, fabric, stone, or other content,
       which require human review or optional cleaned-reference regeneration.
    
    ## Non-negotiable rules
    
    - Work on the original image at native resolution. Do not resize, recompress, or
      screenshot it before diagnosis.
    - Run the deterministic local pipeline before proposing regeneration.
    - Never run paid or content-changing regeneration without the user's explicit
      approval in the current conversation.
    - Never ask the user to paste an API key into chat. Ask them to set
      `MIYANG_API_KEY` in their environment.
    - Files containing `_refclean` are model references, not deliverable images.
    - Do not claim an artifact is removed only because a numeric score decreased.
      Inspect the heat map and comparison boards.
    - Preserve generated JSON sidecars and the XML trace with the output.
    - A pipeline `passed` result means measured filtering damage stayed within the
      configured limits. It does not mean a person has accepted the image.
    
    ## Locate or install the tool
    
    First check whether the command is available:
    
    ```bash
    mi-ripple --help
    ```
    
    If this skill is being used from a checkout of the repository, install that
    checkout into an isolated environment:
    
    ```bash
    python3 -m venv .venv
    .venv/bin/python -m pip install -e .
    ```
    
    Otherwise install from the canonical repository into an isolated environment:
    
    ```bash
    python3 -m venv .mi-ripple-venv
    .mi-ripple-venv/bin/python -m pip install \
      "git+https://github.com/miyang-ai/Mi-Ripple.git"
    ```
    
    Use the corresponding environment's `mi-ripple` executable for subsequent steps.
    Do not modify the user's global Python environment.
    
    ## Inputs
    
    Obtain:
    
    - the exact local path of one source image;
    - an output directory that will not overwrite the source;
    - optional user priorities such as preserving hair, paper texture, foliage, or
      color.
    
    If the image path is missing or ambiguous, ask for it. Do not choose a recently
    used image on the user's behalf.
    
    Supported image decoding is provided by Pillow. Prefer PNG for intermediate and
    final files.
    
    ## Step 1: run the local pipeline
    
    ```bash
    mi-ripple "/absolute/path/input.png" "/absolute/path/output"
    ```
    
    This performs diagnosis, deterministic routing, safe local treatment when
    available, aligned verification, and provenance recording.
    
    Read:
    
    - `<stem>_restored.json` for the outcome and action sequence;
    - `<stem>_input_diag.json` for measurements and selected windows;
    - `<stem>_input_diag_board.png` for native-pixel diagnostic crops;
    - `<stem>_input_scaleheat.png` for whole-frame flagged tiles;
    - `<stem>_verify_board.png` when filtering was applied;
    - `<stem>_restored.png` when a final local result was delivered.
    
    Open the generated boards with the agent's image-reading capability. Do not
    interpret JSON without checking the images.
    
    ## Step 2: handle the outcome
    
    ### `delivered`
    
    Inspect the source, final image, heat map, and verification board.
    
    Check specifically:
    
    - hair remains continuous rather than becoming smooth blocks;
    - foliage, flowers, gravel, fabric, stone, and paper texture were not erased;
    - flat gradients did not gain cloudy stains or ringing;
    - no new repeated scales, honeycomb cells, woven meshes, or wave bands appeared;
    - framing, dimensions, and color remain unchanged on local filtering routes.
    
    If the visual check passes, give the user:
    
    1. the final image path or attachment;
    2. the comparison/verification board;
    3. a short statement of the route taken;
    4. any remaining suspected artifact.
    
    ### `needs_human_decision`
    
    This normally means the measured artifact overlaps image content and filtering
    cannot safely separate it.
    
    Show the diagnosis board and heat map. Explain which regions triggered review.
    Then ask whether the user authorizes one regeneration attempt, explicitly
    stating that it:
    
    - can incur API cost;
    - can change semantic details and identity;
    - can change dimensions, framing, and color;
    - still requires visual acceptance afterward.
    
    Do not proceed until the user explicitly agrees.
    
    ### `failed`
    
    Read the final JSON and the last step's error. Report the concrete failure and
    retain all artifacts already written. Do not silently switch providers or repeat
    a possibly billable request.
    
    ### `cancelled` or `step_limit`
    
    Report that no deliverable was produced. Preserve the trace for diagnosis.
    
    ## Step 3: optional regeneration
    
    Only after explicit approval, verify that `MIYANG_API_KEY` is set without
    printing its value:
    
    ```bash
    test -n "$MIYANG_API_KEY"
    ```
    
    Run one bounded attempt by default:
    
    ```bash
    mi-ripple "/absolute/path/input.png" "/absolute/path/output-regenerated" \
      --allow-regen --max-regen 1
    ```
    
    Never increase `--max-regen` without separate user approval. A timeout or
    interrupted response can have unknown billing state; do not automatically retry
    it.
    
    After regeneration, inspect both the full image and the relevant native-pixel
    windows. Compare identity, composition, geometry, hair, textured materials, and
    color against the source. Report semantic or color changes separately from
    artifact reduction.
    
    ## Interpretation guide
    
    - `lattice.detected`: isolated periodic spectral components were detected. The
      flag may remain true after safe attenuation near the sampling limit.
    - `granule.level=flat`: multiple unstructured windows support masked local
      reduction.
    - `granule.level=pervasive`: broad evidence; regeneration or human review is
      normally safer than stronger filtering.
    - `scale_index.level=structured`: similarly sized components cover at least 6%
      of grading tiles on the canonical canvas.
    - `suspected`: report for inspection; it is not sufficient evidence for
      aggressive automatic treatment.
    
    Legitimate repeated objects can trigger these measurements. Conversely,
    directional wide scales, woven hair, and long wave bands can look severe while
    receiving a low scale index. Visual evidence has final authority.
    
    ## User-facing completion format
    
    Keep the handoff short:
    
    ```text
    处理完成。
    路径:诊断 → [实际步骤] → 验收
    结果:<final image>
    对比:<verification or diagnosis board>
    备注:<remaining uncertainty or “未发现明显结构损伤”>
    ```
    
    Embed or attach the final image and board when the interface supports it; do not
    only print filesystem paths if the user cannot access those paths.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/miyang-ai-mi-ripple-skills-mi-ripple.md

// REPO STATS

240 stars
1 open issues
Last commit: 2mo ago