Skip to content
Agentmart
Submit a tool

text-watermark-fountain

A specialized skill for embedding and extracting resilient watermarks in text by manipulating sentence lengths and using Fountain Codes.

Skill by cafe3310

IndexedMIT★ 256
Write a review

Chalk Labs

Need help deploying text-watermark-fountain?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cafe3310-text-watermark-fountain

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A specialized skill for embedding and extracting resilient watermarks in text by manipulating sentence lengths and using Fountain Codes. Use this when the user wants to add a hidden, robust watermark to text or verify an existing one.

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/text-watermark-fountain

What's inside

Skill name
text-watermark-fountain
Description
A specialized skill for embedding and extracting resilient watermarks in text by manipulating sentence lengths and using Fountain Codes. Use this when the user wants to add a hidden, robust watermark to text or verify an existing one.
License
MIT
Instructions
55 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (5)

  • FOR_HUMAN.md
  • SKILL.md
  • decode.py · scripts/
  • encode.py · scripts/
  • lt_code.py · scripts/

SKILL.md (first lines)

# Text Watermark Fountain (Robust Sync-Frame Version)

This skill enables the Agent to embed a string watermark into a text such that it can be recovered even if the text is partially modified, segments are deleted, or new sentences are inserted. It uses a custom Luby Transform (LT) Fountain Code combined with **Sync Frames** to map the watermark into a sequence of target lengths.

## How it works (Robustness Mechanism)

1.  **Sync Markers**: The encoding script periodically inserts a unique length pattern `[19, 4, 19]` (Sync Marker) followed by a **Frame ID**.
2.  **Self-Synchronization**: The decoder searches the entire text for these markers using a sliding window. Even if middle segments are removed, the decoder can resynchronize using the next Sync Marker and know exactly which symbols it is looking at.
3.  **Redundancy**: By repeating these frames throughout a long text, the watermark becomes extremely difficult to destroy.

## Workflow: Embedding a Watermark

When a user asks to embed a watermark (e.g., "name_1") into a text:

1.  **Generate Length Sequence**:
    - Run the encoding script:
      ```bash
      python3 scripts/encode.py --mark "name_1" --count [TOTAL_DATA_SYMBOLS]
      ```
    - Note the `Lengths` output. It will contain periodic `19 4 19 [ID]` headers.

2.  **Precise Text Fine-tuning (Batch Processing)**:
    To ensure 100% accuracy, you MUST use a multi-stage approach:
    - **Step 2.1: Redundancy & Looping**: If the original text is significantly longer than the required length sequence, the script handles the symbol indexing. Just ensure you cover all target lengths.
    - **Step 2.2: Segmentation**: Split the source text into segments using allowed punctuation (`,。!?;:、, . ! ? ; :`).
    - **Step 2.3: Batch Delegation**: Use a **subagent** to rewrite segments in batches of 5-10.
      *   **Prompt for Subagent**: "Rewrite these segments to match EXACT character lengths: [L1, L2, ...]. Maintain meaning. NO internal punctuation allowed within a segment. Count every character (Chinese, English, digits) as 1."
    - **Step 2.4: Verification**: After each batch, run a Python one-liner to verify:
      ```bash
      python3 -c "print([len(s.strip()) for s in [SEG1, SEG2, ...]])"
      ```

3.  **Final Polishing & Formatting**:
    - **Step 3.1: Style Alignment**: Compare the verified segments with the original text. Refine phrasing to match the original's tone, but **STRICTLY** maintain the verified character count.
    - **Step 3.2: Paragraph Reconstruction**: Re-insert original line breaks. Paragraph breaks (\n) do not affect length measurement.

4.  **Output**:
   - Provide the final watermarked text to the user.

## Workflow: Extracting a Watermark

1. **Run Decoder**:
   - Pass the text to the decoding script:
     ```bash
     python3 scripts/decode.py --text "THE_TEXT_CONTENT"
     ```
   - The script will search for sync frames and use the LT decoder to recover the mark.

## Guidelines for the Agent

- **Precision is Absolute**: A single character error in a segment breaks that data symbol.
- **Punctuation is a Splitter**: Do NOT use punctuation inside a segment unless you intend to split it.
- **Sync Frames are Sacred**: The `19 4 19 [ID]` sequence must be embedded exactly as specified in the output of `encode.py`.

From cafe3310/public-agent-skills, MIT.

More from cafe3310/public-agent-skills

Signals

Stars
256
Forks
30
Open issues
0
Last commit (this folder)
Jun 26, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cafe3310

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get text-watermark-fountain running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying text-watermark-fountain?

CallGet help
Cite this page

text-watermark-fountain skill. Agent Mart. https://agentmart.dev/skills/cafe3310-text-watermark-fountain (last updated 2026-10-24)