---
name: agent-copy
description: 'Use when writing text an agent will consume: a skill, rule or memory file, plan, or subagent prompt.'
title: agent-copy
canonical_url: https://skilld.dev/gh/mia-cx/skills/agent-copy
last_updated: 2026-11-20T02:07:58.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install mia-cx/skills/agent-copy`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/agent-copy`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/mia-cx/skills/agent-copy) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/agent-copy`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/agent-copy --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/agent-copy --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Agent copy

How to write for agents. A skill, a rule file, a plan, and a subagent prompt are packaged differently, but the same levers make each one predictable: the agent takes the same *process* every run. The `/refine` set audits existing documents against this reference. Write new ones from it directly; for subagent prompts, apply it inline.

## Fresh readers

Write for a reader who has never seen earlier versions or the editing conversation. State the current instructions directly. Never treat a document as a ledger of edits or negate a discarded rule absent from the document. Include revision history only when explicitly requested.

Before finishing, read the document on its own. Remove comparisons whose other side exists only in prior drafts or chat. For example, write "Creating a thread requires permission", not "Permission controls access, not thread count" when no count limit appears. Keep prohibitions that define current boundaries.

## Context pointers

A **context pointer** is an in-context reference that names out-of-context material and the condition for reaching it: a skill description, an AGENTS.md line naming a doc, a plan step citing a file. The pointer's *wording*, not its target, decides whether the agent gets there. A must-have target behind a weakly worded pointer is a variance bug. Sharpen the wording first; inline the material only if sharpening fails.

A pointer states what the material is and lists the **branches** that trigger reaching it. Always-loaded pointers earn the hardest pruning: front-load the leading word, keep one trigger per branch (synonyms renaming one branch collapse to one), and cut identity the body already carries.

## The two loads

Every document and pointer spends one of two budgets:

- **Context load**: always-loaded material (a rule line, a skill description) costs tokens and attention every turn, whether or not it fires.
- **Cognitive load**: the human remembering what exists and when to reach for it. Not a cost to minimize; it is the price of human agency. Spend it where human judgment matters.

Material behind a pointer escapes context load for the price of the pointer's line. Material with no pointer rides entirely on the human.

## Information hierarchy

Two content types, **steps** (ordered actions) and **reference** (rules and facts consulted on demand), sit on a ladder ranked by how immediately the agent needs them:

1. **In-file step**: what the agent does, in order.
2. **In-file reference**: consulted on demand. A flat peer-set of rules is a fine arrangement, not a smell.
3. **Disclosed reference**: a separate file behind a pointer, loaded only when it fires.

**Progressive disclosure** is the move down the ladder. The branching test decides: inline what every branch needs; push behind a pointer what only some branches reach. Inline reference that should be disclosed buries the steps, and whether the agent attends to them becomes a coin flip.

**Co-location** decides what sits beside what: keep a concept's definition, rules, and caveats under one heading. Scattering fragments one meaning across many places; duplication repeats it. **Sprawl** is a document too long even when every line is live; attention thins across the excess. The cure for all three is the ladder.

## Steps and completion criteria

Every step ends on a **completion criterion**. Two properties matter:

- **Clarity**: can the agent tell done from not-done? A fuzzy bound ("understanding reached") invites **premature completion**, pulled forward by the visible later steps. Sharpen the bound first; that fix is cheap and local. Hide the later steps only if the bound is irreducibly fuzzy and you observe the rush, and hiding only works across a real context boundary (a handoff or a subagent dispatch). An inline call leaves the later steps in context and clears nothing.
- **Demand**: how much the wording requires. "Every modified file accounted for" forces legwork where "produce a list" does not. Demand also binds flat reference: "every rule applied" is an exhaustiveness bar with no steps at all.

The strongest criteria are both checkable and exhaustive.

## Leading words

A **leading word** is a compact concept already in the model's pretraining (*adversarially*, *self-contained*, *verbatim*, *idempotent*, *atomic*, *exhaustive*, *tight*). Repeated as a token, it anchors a region of behavior in few tokens by recruiting priors the model already holds. It works twice: in a body it anchors execution; in a pointer it anchors invocation. Reuse the same word across prompts, docs, and code, and the agent links that shared language to the material.

Hunt for prose to collapse: "fast, deterministic, low-overhead" is a *tight* loop. A coined word recruits no priors, so you pay its definition in tokens; reach for a pretrained word first. A word too weak to beat the default (*be thorough*) is a no-op. The fix is a stronger word (*relentless*), not more prose.

**Negation** is the adjacent failure: a prohibition drags the forbidden behavior into context and half-reads as an instruction to do it. State the positive target ("write one-line comments") so the banned thing is never spoken. A prohibition survives only as a hard guardrail you cannot phrase positively, and it stays paired with its positive.

## Sharpening

- **Explain the why.** A constraint earns compliance with its reason: "use X because Y". ALL-CAPS emphasis flags a missing reason; replace the shouting with the because.
- **Imprecise to precise.** Give vague instructions concrete targets: audience, length, counts, examples. "2–3 sentences, high-school reader, one concrete example" beats "keep it short".

## Pruning

- **Single source of truth.** One meaning, one authoritative place, so changing behavior is a one-place edit. Duplication costs maintenance and inflates a meaning's apparent rank.
- **The environment is a source of truth.** Package scripts, config, `--help` output, the directory layout. A document restating them is a **cache** that goes stale. Cache only what no lookup reveals: the unwritten convention, the reason behind a choice, the gotcha no config confesses.
- **Relevance.** A line dies by never bearing on the task or by the world moving on. Without pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky.
- **No-ops.** Sentence by sentence: does it change behavior versus the model's default? Delete failing sentences whole. The test is model-relative; settle disputes by running the document, not by debate.

## Skill mechanics

- **Model-invoked** (has a description): permanent context load in exchange for autonomous reach; the agent and other skills can fire it. Pay this only when that reach is needed.
- **User-invoked** (`disable-model-invocation: true`): zero context load. The description becomes a human-facing one-liner. Only the human can fire it; no other skill can.
- **Shared reference** that two user-invoked skills need lives in neither: a plain file both point at, or a model-invoked reference skill.
- **Split off a model-invoked skill** only when a distinct trigger word you actually use should fire it independently, or another skill must reach it. The new description is new permanent load.
- **Router skills** cure piled-up cognitive load: one user-invoked skill naming the others and when to reach each. It can only hint, never fire them.
