# Duo rules and heuristics

> Duo rules and heuristics is an open-source agent skill for writing style. Decide whether to explain, when, and how to shape rules users can act on under pressure. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/HKTITAN/duolingo/tree/main/skills/duo-rules-and-heuristics
- **Repository:** https://github.com/hktitan/duolingo
- **GitHub stars:** 10
- **License:** MIT
- **Skill name:** duo-rules-and-heuristics
- **Collection:** https://github.com/HKTITAN/duolingo
- **Categories:** [writing style](https://ai-powered.com/categories/writing-style), [education and exam prep](https://ai-powered.com/categories/education-and-exam-prep)
- **Listing updated:** 2026-12-03

## About

This skill gives an agent a framework for writing documentation, tooltips, onboarding copy, error messages, runbooks and training guides that people actually absorb. It rests on three decisions: whether to explain at all, when the explanation should arrive, and what form a rule must take to be usable at the moment of decision.

The skill is a hub that links to a set of reference notes. They cover why explanation and skill are stored separately, letting users infer patterns from many examples and then confirming them, and delivering the explanation right after a mistake while naming the rule that fired. Further notes cover shipping a heuristic with its stated hit rate, turning lookup tables into ordered question sequences with worked examples, giving users memorable handles, reframing recurring exceptions, and extracting rules from observed expert behaviour instead of self-report.

It deliberately leaves out lesson sequencing and scaffolding, and anchoring new concepts to what a user already knows. Sibling skills handle experiment measurement, voice and wording, and product scope. The guidance is distilled from Duolingo blog posts, with references in the skill folder.

## When your agent uses it

> Decide whether to explain something at all, when the explanation should land, and how to compress a rule into something a user can actually execute under pressure. Use when you are writing docs, tooltips, onboarding copy, error messages, a runbook or a training guide and are not sure anyone will absorb it. Triggers on phrases like should we document this or let people figure it out, nobody reads our docs, users keep making the same mistake, how do I explain this simply, our error messages do not help, turn this table into something usable, ship a rule of thumb, is it OK that the shortcut is only 90 percent right, how do I know if they actually learned it, our expert cannot explain what they do, write the spec from how the team actually works.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/HKTITAN/duolingo/tree/HEAD/skills/duo-rules-and-heuristics)
- [License: MIT](https://github.com/HKTITAN/duolingo/tree/HEAD/skills/duo-rules-and-heuristics)

## Features

- **Explain-or-not decision:** Helps judge when explicit instruction adds value and when exposure to many examples works better.
- **Moment-of-error timing:** Places explanations right after the mistake and names the rule that triggered, not only the verdict.
- **Heuristics with coverage rates:** Leads with a usable shortcut, states how often it is right, and keeps the full mechanism behind an opt-in section.
- **Tables into procedures:** Converts large lookup tables into ordered question sequences with worked traces and a marked minimum.
- **Memorable handles:** Suggests acronyms, surface cues, named patterns and chunking so rules can be recalled under pressure.
- **Expert rule extraction:** Derives rules from observed practitioner behaviour and checks them, instead of trusting self-description.
- **Model fixes over exceptions:** Treats a recurring exception as a flaw in the model and reframes it so the right answer feels intuitive.

## Good for

- Decide whether a feature needs documentation or should be learned through use
- Rewrite error messages so they name the rule that was broken
- Turn a long reference table into a short decision procedure
- Write a spec from how a team actually works rather than what they say
- Craft a rule of thumb and state how often it is correct
- Diagnose why users repeat the same mistake despite existing docs

## Install

### Claude Code

This skill ships in the `duolingo` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add HKTITAN/duolingo
/plugin install duolingo@duolingo
```

Or copy only this skill to `~/.claude/skills/duo-rules-and-heuristics`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/HKTITAN/duolingo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/duo-rules-and-heuristics &&
cp -R "$tmp/skills/duo-rules-and-heuristics" ~/.claude/skills/duo-rules-and-heuristics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/duo-rules-and-heuristics` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/duo-rules-and-heuristics` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/HKTITAN/duolingo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/duo-rules-and-heuristics &&
cp -R "$tmp/skills/duo-rules-and-heuristics" ~/.agents/skills/duo-rules-and-heuristics &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/duo-rules-and-heuristics` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/duo-rules-and-heuristics` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/HKTITAN/duolingo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/duo-rules-and-heuristics &&
cp -R "$tmp/skills/duo-rules-and-heuristics" ~/.cursor/skills/duo-rules-and-heuristics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/duo-rules-and-heuristics` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/HKTITAN/duolingo.git --path skills/duo-rules-and-heuristics
```

Or copy the folder to `~/.gemini/skills/duo-rules-and-heuristics` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/duo-rules-and-heuristics`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/HKTITAN/duolingo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/duo-rules-and-heuristics &&
cp -R "$tmp/skills/duo-rules-and-heuristics" ~/.copilot/skills/duo-rules-and-heuristics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/duo-rules-and-heuristics` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/HKTITAN/duolingo.git
```

Then copy `duolingo/skills/duo-rules-and-heuristics` into your agent's skills folder as `duo-rules-and-heuristics`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Duo rules and heuristics trigger?

When you are writing docs, tooltips, onboarding copy, error messages, runbooks or training guides and are unsure people will absorb them, including phrases like nobody reads our docs or users keep making the same mistake.

### Does Duo rules and heuristics include scripts?

No scripts are listed for it. It is a SKILL.md with linked reference notes across 14 files.

### What does Duo rules and heuristics not cover?

It does not cover sequencing or scaffolding of a learning path, or anchoring a concept to a system the user already knows. It also leaves measurement, voice wording and product scope to sibling skills.

### What license is Duo rules and heuristics under?

MIT.

### Where do the ideas come from?

They are distilled from 49 claims extracted from posts on blog.duolingo.com, each cited in its reference node.

### How do I install Duo rules and heuristics in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/duo-rules-and-heuristics to use it in all your projects, or to .claude/skills/duo-rules-and-heuristics in one project. Or install the duolingo plugin, which includes it: /plugin marketplace add HKTITAN/duolingo, then /plugin install duolingo@duolingo.

### Does Duo rules and heuristics run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Duo rules and heuristics?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Duo rules and heuristics?

The closest alternatives to Duo rules and heuristics are Duo naming and notation, Duo learner motivation, Duo voice, Duo progression design and Writing user docs.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Duo naming and notation](https://ai-powered.com/skills/duo-naming-and-notation): Duo naming and notation is an open-source agent skill for writing style.
- [Duo learner motivation](https://ai-powered.com/skills/duo-learner-motivation): Duo learner motivation is an open-source agent skill for education and exam prep.
- [Duo voice](https://ai-powered.com/skills/duo-voice): Duo voice is an open-source agent skill for writing style.
- [Duo progression design](https://ai-powered.com/skills/duo-progression-design): Duo progression design is an open-source agent skill for education and exam prep.
- [Writing user docs](https://ai-powered.com/skills/writing-user-docs): Writing user docs is an open-source agent skill for writing style.
- [Duo perceived progress](https://ai-powered.com/skills/duo-perceived-progress): Duo perceived progress is an open-source agent skill for education and exam prep.
- [AI tutorial](https://ai-powered.com/skills/ai-tutorial): AI tutorial is an open-source agent skill for education and exam prep.
- [Duo efficacy measurement](https://ai-powered.com/skills/duo-efficacy-measurement): Duo efficacy measurement is an open-source agent skill for education and exam prep.

---
Source: https://ai-powered.com/skills/duo-rules-and-heuristics
