Agent skill · AI & Agents

sniffable-python

Structure Python so LLMs can understand it in 50 lines.

majiayu000github.com/majiayu000GitHub ↗
claude-coderead-onlyMIT
Install
npx skills add majiayu000/claude-skill-registry --skill sniffable-python-simhacker-moollm-3 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 27 KB
Bundled scripts: none
Allowed tools: -read_file-write_file
Path: skills/ai-llm/sniffable-python-simhacker-moollm-3/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides the agent to create Python code where the initial portion (first ~50 lines) includes a docstring containing purpose, usage, and examples, followed by an Argparse-based CLI tree. The implementation details are placed after the CLI structure, so the LLM can understand the tool from the opening notes. It emphasizes a canonical structure with shebang, docstring, imports, constants, and CLI definitions before any executable logic.

How it works

The skill prescribes:

  • Use a shebang and a module docstring that becomes the --help output and is visible to the LLM.
  • Place imports next, clearly grouped and visible at a glance.
  • Define configuration constants (e.g., valid directions, max inventory) to expose API constraints up front.
  • Build the CLI structure (via argparse) with subparsers and commands (e.g., move, examine, status), including arguments, options, and help text.
  • Implement the actual behavior below the CLI fold, ensuring the LLM only reads the CLI tree for sniffability.
  • Keep the implementation minimal or hidden behind internal functions like _do_move, _do_examine, _show_status, which are not needed by the LLM for understanding.

When to use it

Use when you need a Python script that is immediately understandable by an LLM from its opening lines, with a clear entry point (CLI) and usage examples, while keeping implementation details separate from the sniffable portion.

What it can touch

The skill allows tools: read_file, write_file. It structures code so the LLM reads the initial segment; actual file content touched by the agent should follow the prescribed CLI-first pattern and then the implementation.

Caveats

License: MIT. The approach assumes the presence of a standard Python CLI (argparse) and does not advocate introducing new syntax; it focuses on making existing syntax more readable to LLMs. It emphasizes avoiding decorator-based CLI frameworks in favor of an entirely separate CLI tree in main().

From the SKILL.md

# Sniffable Python > **"Structure code for the first 50 lines. That's all the LLM needs."** Don't invent new syntax — **structure existing syntax** for optimal LLM comprehension. *If your code smells good, the LLM can sniff it from the first whiff.* *Steve Jobs wanted pixels you could lick. We want code you can sniff.* --- ## The Problem LLMs can read Python. But: - Large files overwhelm context - Implementation details bury the API - Comments scattered or missing - No clear entry point for understanding **Solution:** Structure Python so the first ~50 lines contain everything needed to understand and use the tool. Make your code's bouquet apparent from the opening notes. --- ## The Pattern ### Canonical Structure ```python #!/usr/bin/env python3 """skill-name: Brief description of what the script does. This docstring becomes --help output AND is immediately visible to the LLM. It should contain: - Purpose (one sentence) - Usage examples - Key behaviors Usage: python script.py command [options] Examples: python script.py move north --quiet python script.py examine sword --verbose """ import argparse from pathlib import Path import yaml # Configuration DEFAULT_ROOM = "start" VALID_DI

What's inside
Steps it walks through
  1. The Problem
  2. The Pattern
  3. Canonical Structure
  4. The Zones
  5. Why This Works
  6. Dual-Audience Design
  7. DRY Principle
  8. Why Syntax Compression Fails
  9. The Symbol Collision Problem
  10. Comprehension Fidelity > Token Count
  11. Comments as YAML Jazz
  12. Comments: Substance Over Decoration
  13. Argparse vs Click vs Typer
  14. The Argparse Advantage
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the sniffable-python skill do?

Structure Python so LLMs can understand it in 50 lines.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill sniffable-python-simhacker-moollm-3 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going