Index of every page on this site: llms.txt
All skills
itsmay21 avatar

/writing-code-others-read

@1180d75
Run it yourself

Writes simple, scoped code whose names and structure carry intent, with comments reserved for constraints only prose can express. Use when implementing, refactoring, reviewing, or documenting code.

Use this Skill: https://skilld.dev/gh/itsmay21/agent-expression/writing-code-others-read

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈56 tokens for metadata: the name and description. ≈461 when used: this file.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈224 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Writing code others read

Apply deciding-before-you-write before changing code and writing-for-the-reader to names, comments, and docstrings.

Contract

  • Make the smallest complete change. Follow existing architecture and style. Keep unrelated behavior stable.
  • Put domain intent in names. Choose names that expose the role, unit, state, or invariant a maintainer needs.
  • Keep control flow visible. Prefer direct data flow, short functions, and the language's ordinary constructs over speculative abstraction.
  • Encode constraints mechanically first. Use types, tests, validation, schemas, and tooling when they can state or enforce the rule.
  • Use comments for residual knowledge. A useful comment records a reason, warning, or contract that prose communicates most clearly.
  • Keep provenance when it is evidence. If a historical record is the only support for a constraint, name that source and its uncertainty. Write Vendor rejects ≥1000 items (observed once: INC-482, unconfirmed contract) while that incident remains the available evidence. After independent contract confirmation, write Vendor rejects ≥1000 items.
  • Document public behavior. A docstring describes the current contract, inputs, outputs, errors, and side effects that callers need.
  • Verify the mechanism. Run the narrowest check that proves the intended path changed, then the relevant regression checks.

Process-leak check

Code and comments describe the system that exists now. Translate production history into an invariant when independent evidence establishes that invariant. Keep the source when the history itself is the evidence. Put authoring narration in its review record.

If the explanation merely translates the next line into prose, improve the code or remove the explanation.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This skill provides architectural and stylistic guidelines for writing readable and maintainable code. It contains no executable code, network operations, or sensitive data access, and presents no security risks.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 1180d75. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 3 months ago
metadata
{
  "layer": "application"
}

README badge

README badge for itsmay21/agent-expression/writing-code-others-read