Agent skill

Augmented Coding Patterns Reference

by lexler in lexler/skill-factory

Catalog of obstacles, anti-patterns and patterns for working with AI coding agents, covering context management and reliability, from a published patterns collection.

Apache-2.0Auto-check passedAgent Workflows

Install Augmented Coding Patterns Reference

skills CLI
$ npx skills add lexler/skill-factory --skill ai-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lexler/skill-factory ai-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lexler/skill-factory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/output_skills/ai/ai-patterns .claude/skills/ai-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-patterns
GitHub stars
239
Token cost
~1.5k tokens
SKILL.md length
591 words
Files
2 (incl. scripts)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Catalog of obstacles, anti-patterns and patterns for working with AI coding agents, covering context management and reliability, from a published patterns collection.

  • Looking up a named AI-coding pattern or anti-pattern
  • SKILL.md covers First Step: Ensure Repository…, Patterns Location, Context Management and Reliability & Quality, plus 4 more sections
  • Diagnosing why an agent loses earlier instructions as a conversation grows
  • Choosing how to split knowledge into focused files for an agent to load

What it does

The skill is a lookup index for a patterns collection by Lada Kesseler (lexler), Llewellyn Falco, Ivett Ördög and Nitsan Avni. Its first step is to run the bundled `ensure-patterns-repo` script, which makes sure the collection exists locally and is current; the documents are then read from a cache folder under `~/.cache/claude-skills`.

Entries are grouped by theme. Context management lists obstacles such as context rot, the limited context window and excess verbosity, the distracted-agent anti-pattern, and patterns such as knowledge documents, ground rules, extracting knowledge during a session, focused agents, reference docs and semantic zoom. Reliability and quality adds obstacles including non-determinism, hallucinations, degradation under complexity and selective hearing. Each item has a one-line summary. The excerpt is truncated partway through that second group.

When your agent uses it

  • Looking up a named AI-coding pattern or anti-pattern
  • Diagnosing why an agent loses earlier instructions as a conversation grows
  • Choosing how to split knowledge into focused files for an agent to load

Example prompts

  • “What does the ground-rules pattern recommend for keeping instructions in every session?”
  • “My agent keeps ignoring instructions late in long sessions, which patterns apply?”
  • “List the obstacles in the reliability section and how to steer around each.”

Requirements

  • A local copy of the patterns repository, kept current by the bundled script

What it can do on your machine

Read from SKILL.md and the folder at commit 8017333. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • lexler.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Augmented Coding Patterns Reference loads about 1.5k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 591 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from lexler/skill-factory at commit 8017333, republished under its Apache-2.0 licence (© lexler). 591 words, ~1,473 tokens.

Download SKILL.mdSave it as .claude/skills/ai-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ai-patterns
description
Reference patterns for augmented coding with AI. Use when discussing AI coding patterns, anti-patterns, obstacles, context management, steering AI, or looking up Lexler's patterns collection.

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

bash
~/.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.

Obstacles
  • non-determinism - Same input produces different outputs; results unpredictable
  • hallucinations - AI invents non-existent APIs, methods, or syntax
  • degrades-under-complexity - AI performance drops with complex multi-step tasks
  • selective-hearing - AI ignores certain instructions; training data overrides explicit directives
Anti-patterns
  • perfect-recall-fallacy - Expecting AI to perfectly remember library details instead of letting it discover
  • unvalidated-leaps - Building on unverified assumptions instead of validating each step
  • ai-slop - Using AI output without human judgment, just light editing
Patterns
  • knowledge-checkpoint - Checkpoint planning before implementation to preserve thinking investment
  • parallel-implementations - Run multiple implementations in parallel; pick best or combine
  • offload-deterministic - Use code scripts for deterministic work instead of asking AI repeatedly
  • playgrounds - Create isolated folders for AI to experiment and test assumptions safely
  • chain-of-small-steps - Break complex goals into small, focused, verifiable steps
  • hooks - Lifecycle event hooks intercept workflow; inject targeted corrections
  • reminders - Repeat critical instructions as explicit steps; structural compliance
  • feedback-flip - Have different AI focus on evaluation; flip from producing to finding problems
  • refinement-loop - Give AI specific improvement goal and loop it; each pass removes one layer

Show full SKILL.md (215 more words)Show less

Communication

Directing AI behavior, getting honest feedback, and alignment.

Obstacles
  • black-box-ai - AI's reasoning is hidden; you can only see inputs and outputs
  • compliance-bias - AI prioritizes following instructions over questioning unclear requests
Anti-patterns
  • silent-misalignment - AI accepts nonsensical instructions instead of asking clarifying questions
  • answer-injection - Putting solutions in questions limits AI's breadth and better approaches
  • tell-me-a-lie - Forcing AI to provide answers that don't exist causes fabrication
Patterns
  • active-partner - Grant permission for AI to push back, disagree, and flag contradictions
  • check-alignment - Force AI to show understanding before implementing to catch misalignment early
  • context-markers - Visual emoji signals to show what instructions AI is currently following
  • cast-wide - Push AI to show alternatives you haven't considered; avoid first-solution bias
  • reverse-direction - Break monologue inertia—ask AI what it thinks instead
  • polyglot-ai - Use right modality for task—voice for convenience, images for visual problems
  • text-native - Keep everything as text; enables direct editing, version control, instant iteration

Additional Patterns

Patterns not on the main journey but useful in practice.

  • shared-canvas - Markdown files as shared specs/docs; all humans and AI collaborate together
  • softest-prototype - Use markdown instructions + AI agent instead of code for flexible exploration
  • take-all-paths - Build multiple prototypes not one; test all, pick best through exploration
  • borrow-behaviors - Give AI example and it adapts—styles, patterns, code across languages

Browse All

List patterns by category:

bash
ls ~/.cache/claude-skills/augmented-coding-patterns/documents/patterns/
ls ~/.cache/claude-skills/augmented-coding-patterns/documents/anti-patterns/
ls ~/.cache/claude-skills/augmented-coding-patterns/documents/obstacles/

Online

View at: https://lexler.github.io/augmented-coding-patterns/

© lexler, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in output_skills/ai/ai-patterns of lexler/skill-factory.

  • SKILL.md
  • scripts/ensure-patterns-repo

Open the folder on GitHubat commit 8017333

Compare with similar skills

Augmented Coding Patterns Reference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Augmented Coding Patterns Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Augmented Coding Patterns Reference this skilllexler/skill-factory239—~1.5kAutomated safety check: PassApache-2.0
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0
Harness Engineering10xChengTu/harness-engineering1021 repos~1kAutomated safety check: PassNone
Cc Dev Agentsangrokjung/claude-forge849—~771Automated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman110k—~2.8kAutomated safety check: PassApache-2.0
Context Routing Auditwithkynam/vibecode-pro-max-kit1.1k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Harness Engineering

    10xChengTu/harness-engineering

    Set up and improve harness engineering (AGENTS.md, docs/, lint rules, eval systems, project-level prompt engineering) for AI-agent-friendly codebases.

    102 GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check passed
  • Cc Dev Agent

    sangrokjung/claude-forge

    A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.

    849 GitHub stars~771 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    110k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Routing Audit

    withkynam/vibecode-pro-max-kit

    Audits a project's context routing, skill discoverability and skill wiring by running a chain of validator scripts and fixing whatever they report.

    1.1k GitHub stars~1.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Context Budget Check

    poshan0126/dotclaude

    Estimates the per-turn token cost of a project's .claude folder and CLAUDE.md, split into always-loaded, path-scoped and invoked-only files, and flags what runs over budget.

    871 GitHub stars~1.4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from lexler/skill-factory

All 25 skills in this repo
  • C4 Architecture Diagrams

    lexler/skill-factory

    Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.

    239 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Launching Agent Teams

    lexler/skill-factory

    Plans and launches Claude Code agent teams with distinct roles, right-sized tasks and detailed spawn prompts, and says when subagents or worktrees fit better.

    239 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Claude Code Statusline Writer

    lexler/skill-factory

    Guides writing and debugging Claude Code status line scripts that read session JSON from stdin and print one line of text.

    239 GitHub stars~872 tokensUpdated 1 mo ago
    Auto-check passed
  • Approval Testing Toolkit

    lexler/skill-factory

    Writes snapshot-style approval tests in Python, JavaScript, TypeScript or Java, comparing output against an approved file instead of writing individual assertions.

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Hotspots

    lexler/skill-factory

    Find where a codebase actually costs time by mining its git history (Tornhill hotspot analysis).

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Nullables Testing Pattern

    lexler/skill-factory

    Teaches the Nullables pattern for testing without mocking libraries: production classes with an off switch, stubbed only at the third-party edge.

    239 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Augmented Coding Patterns Reference

What does Augmented Coding Patterns Reference do?

Catalog of obstacles, anti-patterns and patterns for working with AI coding agents, covering context management and reliability, from a published patterns collection. The skill is a lookup index for a patterns collection by Lada Kesseler (lexler), Llewellyn Falco, Ivett Ördög and Nitsan Avni.cache/claude-skills`.

When should I use Augmented Coding Patterns Reference?

Augmented Coding Patterns Reference fits situations like: looking up a named AI-coding pattern or anti-pattern; diagnosing why an agent loses earlier instructions as a conversation grows; choosing how to split knowledge into focused files for an agent to load.

How do I install Augmented Coding Patterns Reference in Claude Code?

Run `npx skills add lexler/skill-factory --skill ai-patterns -a claude-code`. Or copy the skill folder (output_skills/ai/ai-patterns in lexler/skill-factory) into .claude/skills/ai-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Augmented Coding Patterns Reference in Codex?

Run `npx skills add lexler/skill-factory --skill ai-patterns -a codex`. Or copy the skill folder (output_skills/ai/ai-patterns in lexler/skill-factory) into .agents/skills/ai-patterns in your project. Codex loads it when a task matches its description.

Can I use Augmented Coding Patterns Reference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lexler/skill-factory --skill ai-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-patterns, .gemini/skills/ai-patterns, .github/skills/ai-patterns and .opencode/skills/ai-patterns in your project.

What does Augmented Coding Patterns Reference need to run?

SKILL.md names no scripts, command-line tools or credentials: Augmented Coding Patterns Reference is instructions for the agent only. Our summary lists: A local copy of the patterns repository, kept current by the bundled script.

Does Augmented Coding Patterns Reference access the network?

SKILL.md names 1 domain. As links in the text: lexler.github.io. This is read from the text; nothing was executed.

Is Augmented Coding Patterns Reference safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Augmented Coding Patterns Reference use?

Augmented Coding Patterns Reference is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Augmented Coding Patterns Reference use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Augmented Coding Patterns Reference?

Skills that share tags, products or a category with Augmented Coding Patterns Reference: Context Engineering (abashev/vfs-s3, 106 stars), Harness Engineering (10xChengTu/harness-engineering, 102 stars), Cc Dev Agent (sangrokjung/claude-forge, 849 stars) and Caveman Learn Token Fixes (JuliusBrussee/caveman, 110k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Augmented Coding Patterns Reference?

lexler (a GitHub user) maintains it in lexler/skill-factory, which has 239 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on August 26, 2026.

Source: lexler/skill-factory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.