data-rule

data-rule is a skill for Claude Code, Codex from zjunlp/Mechanist. It costs 97 tokens per session (666 once invoked), scanned A, original, MIT.

A set of rules for choosing and using data in experiments. It covers where the data came from, how training, validation, and test splits are made, whether labels match the target behavior, and how much data is needed.

In plain words
What is it for?
Selecting or building datasets, documenting whether they are existing, adapted, or constructed, making non-overlapping splits, and applying the same data rules to every method and experiment stage.
Why use it?
It helps prevent data leakage, unsupported labels, artificial examples, and evaluation results based on data used to fit the system.

Skill for Claude CodeCodex

Part of the mechanist plugin — 54 skills, 4 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zjunlp/mechanist/data-rule
Any agent
npx skills add zjunlp/Mechanist --skill data-rule
Clone the repo
git clone --depth 1 https://github.com/zjunlp/Mechanist

Made for: Claude Code, Codex.

Or install mechanist, the plugin that ships this one along with the rest of its 54 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjunlp/mechanist/data-rule.svg)](https://agentmods.dev/skills/zjunlp/mechanist/data-rule)
Your own site
<a href="https://agentmods.dev/skills/zjunlp/mechanist/data-rule"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/data-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00097 $0.00666
Opus 5 $0.00048 $0.00333
Sonnet 5 $0.00019 $0.00133
Haiku 4.5 $0.00010 $0.00067

Measured 4d ago against content hash 519587b27a94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-rule scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/data-rule/SKILL.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Data Rule

All data constraints for an experiment live here. Apply them when you design the data (choose / adapt / construct the dataset and splits) and when you run the experiment — for every method and every milestone, M0 included. Use one consistent dataset; do not special-case per method or per phase.

1. Provenance — existing dataset first

Prefer an existing dataset that directly tests the target behavior. All inputs, conditions, and intervention contexts should be derived from naturally occurring examples in the dataset, rather than from artificially constructed, random, reverse-engineered, or model-generated substitutes. If none fits, adapt an existing one (relabel / filter / transform). Build your own only as a last resort. Record which of the three was used: existing / adapted / constructed.

2. Clear splits

Partition the data into explicit train / validation / test sets. No leakage across splits: deduplicate, and split by group / entity so near-duplicates cannot straddle the boundary. Never evaluate a probe / direction / classifier on the data it was fit on — held-out evaluation only; a score on training data is not evidence.

3. Labels reflect the target behavior

Labels must actually capture the target behavior the experiment is about, not a loose proxy. Ground truth comes from the dataset, never from another model's output.

4. Sample size

Do not set up special or different data for M0 or for different mechanism methods — use one consistent dataset across them.

  • If the user or an incoming signal (e.g. uer input or task.md ) states a data amount, use exactly that amount.
  • Otherwise, apply the floor by what the experiment does:
    • Inference-time mechanism exploration or intervention (locate a component, then ablate / patch / steer it): at least 50 examples (n > 50). This floor applies to every run at this stage, including preliminary ones — e.g. when sweeping steering coefficients, each coefficient setting must still be evaluated on at least 50 examples. Smaller samples make the results too noisy to trust: the run-to-run variance swamps the effect, and a coefficient can look best purely by chance.
    • Tuning / editing (training-time tuning, weight editing, learned steering directions): hundred-level — on the order of hundreds of examples (i.e. at least ~100).

Read the full file on GitHub · 33 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 33 lines · 97 tokens per session scan A 519587b27a94

Subscribe to this mod's changes

data-rule is a skill published in the GitHub repository zjunlp/Mechanist (51 stars, last pushed 8d ago), licensed MIT. It adds 97 tokens to every session and 666 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories