code-structure

code-structure is a skill for Claude Code from Jartan-LLC/grimoire. It costs 57 tokens per session (7,647 once invoked), scanned A, original, MIT.

A language-independent guide for deciding how code should be divided into units and how those units should interact.

In plain words
What is it for?
Use it when designing modules, interfaces, error handling, data rules, and the relationships between parts of a codebase.
Why use it?
It helps prevent code from becoming a collection of poorly connected pieces with unclear responsibilities and failure behavior.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the praxis plugin — 16 skills, 7 agents shipped together

Good fit Use it when designing modules, interfaces, error handling, data rules, and the relationships between parts of a codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jartan-llc/grimoire/code-structure
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.

Any agent
npx skills add Jartan-LLC/grimoire --skill code-structure
Clone the repo
git clone --depth 1 https://github.com/Jartan-LLC/grimoire

Made for: Claude Code.

Or install praxis, the plugin that ships this one along with the rest of its 16 skills, 7 agents.

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 code-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/jartan-llc/grimoire/code-structure/github.svg)](https://agentmods.dev/skills/jartan-llc/grimoire/code-structure)
Your own site
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/code-structure"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/code-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-structure

Your own site · 80×15
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/code-structure"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/code-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,647 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00057 $0.07647
Opus 5.5 $0.00023 $0.03059
Sonnet 5.5 $0.00011 $0.01529
Haiku 4.5 $0.00006 $0.00765

Measured 1mo ago against content hash e57767f16f8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-structure 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 1mo 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.

plugins/praxis/skills/code-structure/SKILL.md · 114 lines

How it starts

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

Code Structure

code-hygiene deletes the liability; this skill shapes the units that remain. Four owners, one test:

  • hygiene = DELETE what git or a library already owns -- dead code, a name that lies or says nothing (code-hygiene), a restating comment (comment-hygiene). A rule that says delete X is one of the two hygienes'.
  • code-structure = SHAPE THE UNITS -- how the code is decomposed, how units couple, how an interface reads, how a failure reaches a caller, how data carries its own invariants. Everything here assumes the code should exist; the question is what shape its units and boundaries take.
  • readable-code = READ -- how a single body reads line by line: control-flow shape, naming across a set, reading order and working set. Anything about how one body reads rather than how the units are carved is readable-code's.
  • pythonica = Python mechanics -- a rule that names a Python construct (dataclass, NewType, a context manager, match) is pythonica's; keep this skill language-agnostic.

Read code-hygiene and comment-hygiene first: shaping code that should have been deleted is wasted work. When a fix here would be self-documenting code (a revealing name, an extracted step, an explaining variable), that is exactly what comment-hygiene's "prefer self-documenting code over a comment" meta-rule points to -- that skill removes the comment, this skill supplies the structure. Where a smell reads as "there is redundant knowledge here", check the boundary: identical text in two places is code-hygiene's duplication rule; the same decision in two unlike forms is this skill's (DRY-as-knowledge, below).

Every rule below is a recognizable smell (something a reader or author can actually spot) -> the principle it violates -> a fix direction. No line, parameter, or nesting-depth count gates any rule here: that false precision is the size-fallacy this skill exists to replace. (Illustrative counts like "a two-line loop index" still appear -- they describe an example, they do not set a threshold.)

Read the full file on GitHub · 114 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. 1mo ago First seen · 114 lines · 57 tokens per session scan A e57767f16f8d

Subscribe to this mod's changes

code-structure is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 7,647 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories