mcpbeat Sign in

Text Watermark Fountain Agent Skill

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.

4k tokens
context cost
the whole folder, loaded on every use
5
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
249
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/cafe3310/public-agent-skills --skill text-watermark-fountain

The instruction itself

5 sections, as written by the author

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)

  • Sync Markers: The encoding script periodically inserts a unique length pattern [19, 4, 19] (Sync Marker) followed by a Frame ID.
  • 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.
  • 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:

  • Generate Length Sequence:
  • Run the encoding script:
      python3 scripts/encode.py --mark "name_1" --count [TOTAL_DATA_SYMBOLS]
  • Note the Lengths output. It will contain periodic 19 4 19 [ID] headers.
  • 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:
      python3 -c "print([len(s.strip()) for s in [SEG1, SEG2, ...]])"
  • 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.
  • Output:
  • Provide the final watermarked text to the user.

Workflow: Extracting a Watermark

  • Run Decoder:
  • Pass the text to the decoding script:
     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.

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Geo Database
by christophacham
×4

Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.

12k tokens
Pymc Bayesian Modeling
by christophacham
×4

Bayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.

24k tokens scripts
Pymoo
by christophacham
×4

Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.

19k tokens scripts
Statsmodels
by ComeOnOliver
×4

Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.

41k tokens
Add Uint Support
by pytorch
vendor ×3

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

2k tokens
At Dispatch V2
by pytorch
vendor ×3

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

2k tokens
Docstring
by pytorch
vendor ×3

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

3k tokens

How to use it

Copy the folder

Take cafe3310/text-watermark-fountain from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.