ai-patterns

ai-patterns is a skill for Claude Code, Codex from saski/arnesto. It costs 40 tokens per session (1,263 once invoked), scanned A, a copy of ai-patterns, Unlicense.

A reference guide to patterns for working with AI while developing software. It covers how to manage the information given to an AI, keep its attention, and avoid common mistakes.

In plain words
What is it for?
Use it when planning AI-assisted coding workflows, organizing project knowledge, steering an AI agent, or diagnosing context and focus problems.
Why use it?
It helps explain why an AI coding session loses track of instructions, becomes distracted, or produces overly long and unfocused answers.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/saski/arnesto/ai-patterns
Any agent
npx skills add saski/arnesto --skill ai-patterns
Clone the repo
git clone --depth 1 https://github.com/saski/arnesto

Made for: Claude Code, Codex.

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 ai-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/saski/arnesto/ai-patterns.svg)](https://agentmods.dev/skills/saski/arnesto/ai-patterns)
Your own site
<a href="https://agentmods.dev/skills/saski/arnesto/ai-patterns"><img src="https://agentmods.dev/badge/skills/saski/arnesto/ai-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,263 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00040 $0.01263
Opus 5 $0.00020 $0.00632
Sonnet 5 $0.00008 $0.00253
Haiku 4.5 $0.00004 $0.00126

Measured 4d ago against content hash 20b409e4574a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-patterns 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 4d 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.

Origin

This is a copy

100% identical to ai-patterns — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/ai-patterns/SKILL.md · 133 lines

How it starts

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

AI Patterns Reference

Patterns for effective AI-augmented software development by Lada Kesseler (github nickname lexler), Llewellyn Falco, Ivett Ördög, and Nitsan Avni.

First Step: Ensure Repository Exists and Update

~/.claude/skills/ai-patterns/scripts/ensure-patterns-repo

Patterns Location

Base path: ~/.cache/claude-skills/augmented-coding-patterns/documents


Context Management

Managing AI context, knowledge, and focus.

Obstacles

  • context-rot - Earlier instructions lose influence as conversation grows
  • cannot-learn - LLMs can't learn from interactions; fixed weights prevent adaptation
  • limited-context-window - Fixed context size forces choices about what to keep loaded
  • limited-focus - Too much context causes diluted or misdirected attention
  • excess-verbosity - AI defaults to verbose output with low signal-to-noise ratio

Anti-patterns

  • distracted-agent - Using one agent for everything spreads attention; instructions inconsistently followed

Patterns

  • context-management - Treat context as scarce resource requiring active append/reset operations
  • knowledge-document - Save important information as markdown files for session loading
  • ground-rules - Essential behavioral rules auto-loaded into every session
  • extract-knowledge - Save emerging insights and corrections from ephemeral context to files immediately during sessions
  • focused-agent - Single narrow responsibility gives AI cognitive space to follow rules better
  • reference-docs - On-demand knowledge loaded only when needed for current task
  • knowledge-composition - Split knowledge into focused, composable files with single responsibilities
  • semantic-zoom - Control abstraction levels—zoom out for overview or zoom in for details
  • noise-cancellation - Explicitly ask AI to be succinct and strip filler from responses

Reliability & Quality

Handling non-determinism, complexity, and verification.

Read the full file on GitHub · 133 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 133 lines · 40 tokens per session scan A 20b409e4574a

Subscribe to this mod's changes

ai-patterns is a skill published in the GitHub repository saski/arnesto (5 stars, last pushed 8d ago), licensed Unlicense. It adds 40 tokens to every session and 1,263 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to ai-patterns, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

brain-bootstrap

Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log to draft the six root pages and capture key historical decisions; on a near-empty (greenfield) project interview the user. Every write goes through the brain CLI. Run it after brain-setup.

mindmuxai/brain.md · 74 tokens

brain-ingest

The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a new/updated page) through the brain CLI.

mindmuxai/brain.md · 48 tokens

immune

Hybrid adaptive memory: Cheatsheet (positive patterns pre-generation) and Immune (negative patterns post-generation) with Hot/Cold tiered auto-learning. Triggers on: "scan for errors", "immune scan", "check output quality", "antibody scan". NOT for PR review (use pr-review) or repo audits (use repo-sentinel).

Mathews-Tom/armory · 73 tokens

harness-design

Design and build multi-agent harness architectures for long-running AI application development. GAN-inspired Generator-Evaluator pattern, Sprint Contract negotiation, context management, quality criteria calibration. Based on Anthropic Engineering patterns. Use when: "build a harness", "multi-agent architecture"…

AnastasiyaW/codex-claude-code-config · 171 tokens

verify-this

Prove a concrete behavior, performance, UI, CLI, API, or memory claim with fresh baseline-versus-treatment evidence and one explicit verdict. Use when asked to verify, prove, compare before and after, show evidence, or confirm that a fix works. Do not use for vague claims such as cleaner code, a full plan-based…

AnastasiyaW/codex-claude-code-config · 86 tokens

brain-setup

Bootstrap the Open Project Brain Standard into the current project — prefer brain init (ensure BRAIN.md, scaffold empty brain brainRoot-aware, default-wire CLAUDE.md + AGENTS.md). Optionally install a pre-commit hook and a Claude Code SessionStart hook.

mindmuxai/brain.md · 60 tokens