Skip to content
Back to skills

Encode

ASecurity

Selectively turn a recurring, high-leverage failure mode into the cheapest mechanical check when its payoff beats maintenance and runtime cost. Type it after the same bug, boundary break, or review finding shows up more than once.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agents

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add sgathrid/agent-smith --skill encode --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Encode?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Encode
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sgathrid-encode/badge)](https://www.skillsdirectory.com/skills/sgathrid-encode)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: encode
description: Selectively turn a recurring, high-leverage failure mode into the cheapest mechanical check when its payoff beats maintenance and runtime cost. Type it after the same bug, boundary break, or review finding shows up more than once.
disable-model-invocation: true
---

# Encode

Most mistakes need a fix, not a new rule. Reach for mechanical enforcement only when a failure mode repeats, hurts when it slips through, and can be caught cheaply without slowing down every run.

## Decide whether to encode

Skip encoding when the issue happened once, needs human judgment to evaluate, or costs more to maintain and run than the mistakes it prevents. Land a clean fix and move on.

Encode when the same bug class, broken invariant, or boundary leak keeps returning and a fast, deterministic check can catch it with near-zero false positives.

Guard against rule bloat. Avoid catch-all lints, style policing, and slow checks that drag down the inner loop. One sharp invariant beats ten noisy rules.

## Pick the cheapest mechanism

Follow the ladder in `${CLAUDE_PLUGIN_ROOT}/shared/principles.md#encode`, stopping at the lightest layer that holds. Reuse the repo's existing check runner and conventions; do not add a new linter, framework, or slow build step without asking. When two source files share a runtime format, command or invariant across a boundary that cannot share an import, `@seam <id>` comments link them symmetrically and `LINT.IfChange`/`LINT.ThenChange(<path>)` links a source block to another file (including docs or configs) for `${CLAUDE_PLUGIN_ROOT}/skills/graph/SKILL.md` at zero runtime cost.

## Make failures teach the fix

When writing a custom check, lint, or invariant test, make the failure message state what broke, what is expected, and the exact fix or canonical helper to use. A clear remediation message lets the next contributor repair the violation in one turn instead of guessing.

## Prove it and clean up

Verify the new check fails on a real violation (or a minimal reproduction of one) and passes on the clean repo. Confirm its runtime cost stays negligible.

Delete any prose note, comment, or checklist line the check now replaces (`${CLAUDE_PLUGIN_ROOT}/shared/principles.md#less`).

## Report

Name the failure mode, the mechanism you chose (or why you skipped encoding), how you proved it catches a real violation, its rough runtime cost, and any prose you deleted.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.