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.
npx agentmods add skills/jartan-llc/grimoire/code-structurenpx skills add Jartan-LLC/grimoire --skill code-structuregit clone --depth 1 https://github.com/Jartan-LLC/grimoireWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00057 | $0.07647 |
| Opus 5 | $0.00028 | $0.03823 |
| Sonnet 5 | $0.00011 | $0.01529 |
| Haiku 4.5 | $0.00006 | $0.00765 |
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 2d 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.
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.)
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.
- 2d ago First seen · 114 lines · 57 tokens per session scan A e57767f16f8d
code-structure is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed 14d ago), licensed MIT. It adds 57 tokens to every session and 7,647 once invoked, about $0.0003 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.
Other skills, from other repositories
lanshu-create-ai-presenter-video
Turn a topic or finished script plus an authorized adult presenter image into a complete, publish-ready AI presenter video. Use for new presenter videos and for continuing, revising, captioning, lip-sync repairing, or re-exporting an existing presenter-video job. Keep model and provider selection capability-based and…
codex-autoresearch
Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…
xiaobei-skill-rebuild-image-in-powerpoint
Use when a user wants Codex to directly operate PowerPoint and reconstruct an entire reference image as editable PowerPoint objects while preserving its full layout, labels, connectors, and visual relationships. Do not use for paper-to-deck generation or VBA-only output.
xiaohongshu-magazine
《小红书运营手册 · AI工作台》杂志感选题库技能。用于用户想把小红书账号当成一本杂志来办、确定内容母题(刊魂)、设计固定栏目、用开枝散叶方法批量生成选题、区分账号围绕业务还是围绕个人 IP、让每一篇都在攒信任或攒喜欢、或搭建可长期复用的选题库时触发。输入可以是账号定位、目标用户、产品或服务、个人经历和已有素材。输出母题、栏目结构、按信任和喜欢分类的选题库、每根栏目的角度公式和优先级建议。它负责战略层选题库,日历和系列排期交给 xiaohongshu-topic-planner。.
xiaohongshu-conversion-path
《小红书运营手册 · AI工作台》成交路径设计技能。用于用户想把小红书内容、主页承接、置顶笔记、评论区、私信和产品/服务转化串起来时触发,重点处理从刷到内容到私信、预约、购买、体验、反馈或成交的路径。适合服务号、产品号、个人 IP、自由职业者和小程序推广。输入可以是账号定位、产品/服务、客单价、用户顾虑、当前内容和转化目标。输出内容分工、信任路径、私信筛选和成交动作。若用户只想改简介、看主页第一眼或优化置顶表达,应使用 xiaohongshu-profile。.
xiaohongshu-profile
《小红书运营手册 · AI工作台》主页体检和简介改写技能。用于用户想优化主页第一眼、账号简介、昵称、头像描述、置顶笔记、信任感和定位表达时触发。输入可以是主页截图描述、昵称、简介、置顶笔记、账号定位、产品/服务和目标用户。输出主页诊断、问题优先级、简介改写和置顶建议。若用户重点询问内容到私信、购买、预约、体验或成交路径,应使用 xiaohongshu-conversion-path。.