writing-skills

writing-skills is a skill for Claude Code, Codex from dr-code/tessera. It costs 20 tokens per session (738 once invoked), scanned A, original, MIT.

A guide for creating, editing, and checking reusable instructions for coding agents. It applies test-driven development (TDD), a method of writing tests before implementation, to documentation.

In plain words
What is it for?
Use it to design instruction files, create behavior-based test cases, check that they work, and refine the instructions before deployment.
Why use it?
It helps reveal whether instructions actually change an agent's behavior and closes gaps that could lead to inconsistent results.

Skill for Claude CodeCodex

Part of the tessera plugin — 20 skills, 6 commands, 2 agents, 4 hooks, 1 MCP server 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/dr-code/tessera/writing-skills
Any agent
npx skills add dr-code/tessera --skill writing-skills
Clone the repo
git clone --depth 1 https://github.com/dr-code/tessera

Made for: Claude Code, Codex.

Or install tessera, the plugin that ships this one along with the rest of its 20 skills, 6 commands, 2 agents, 4 hooks, 1 MCP server.

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 writing-skills

README.md
[![agentmods](https://agentmods.dev/badge/skills/dr-code/tessera/writing-skills.svg)](https://agentmods.dev/skills/dr-code/tessera/writing-skills)
Your own site
<a href="https://agentmods.dev/skills/dr-code/tessera/writing-skills"><img src="https://agentmods.dev/badge/skills/dr-code/tessera/writing-skills.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 738 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.00020 $0.00738
Opus 5 $0.00010 $0.00369
Sonnet 5 $0.00004 $0.00148
Haiku 4.5 $0.00002 $0.00074

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

Security

Grade A, and why

writing-skills 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/writing-skills/SKILL.md · 118 lines

How it starts

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

Writing Skills

Overview

Writing skills IS Test-Driven Development applied to process documentation.

Write test cases (pressure scenarios), watch them fail (baseline behavior), write the skill, watch tests pass, refactor (close loopholes).

Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.

REQUIRED BACKGROUND: Understand test-driven-development before using this skill.

What is a Skill?

A skill is a reference guide for proven techniques, patterns, or tools.

Skills are: Reusable techniques, patterns, tools, reference guides

Skills are NOT: Narratives about how you solved a problem once

SKILL.md Structure

Frontmatter (YAML):

  • Two required fields only: name and description
  • name: letters, numbers, hyphens only
  • description: starts with "Use when...", describes triggering conditions, NOT the skill's workflow
---
name: skill-name
description: Use when [specific triggering conditions]
---

# Skill Name

## Overview
Core principle in 1-2 sentences.

## When to Use
Bullet list with symptoms and use cases

## Core Pattern
Before/after comparison or process steps

## Common Mistakes
What goes wrong + fixes

Claude Search Optimization

Description = When to Use, NOT What the Skill Does

The description answers: "Should I read this skill right now?" It must NOT summarize the workflow.

# BAD: Summarizes workflow — Claude follows this instead of reading the skill
description: Use when executing plans - dispatches subagent per task with review between tasks

# GOOD: Triggering conditions only
description: Use when executing implementation plans with independent tasks in the current session

TDD Mapping for Skills

TDD Concept Skill Creation
Test case Pressure scenario with subagent
Production code Skill document (SKILL.md)
RED Agent violates rule without skill (baseline)
GREEN Agent complies with skill present
REFACTOR Close loopholes while maintaining compliance

Read the full file on GitHub · 118 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 · 118 lines · 20 tokens per session scan A 532fd5367076

Subscribe to this mod's changes

writing-skills is a skill published in the GitHub repository dr-code/tessera (1 stars, last pushed 24d ago), licensed MIT. It adds 20 tokens to every session and 738 once invoked, about $0.0001 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-31.