coding-patterns

A skill that finds relevant coding patterns and project conventions before new code is written. Conventions are shared rules such as naming, file layout, and error handling.

In plain words
What is it for?
For creating files, components, modules, functions, tests, endpoints, and services, or deciding how code should be organized.
Why use it?
It helps new code match the existing codebase instead of introducing inconsistent structures or styles.

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/runtimenoteslabs/memory-layer/coding-patterns
Any agent
npx skills add runtimenoteslabs/memory-layer --skill coding-patterns
Clone the repo
git clone --depth 1 https://github.com/runtimenoteslabs/memory-layer

Made for: Claude Code, Codex.

Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,045 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.01045
Opus 5 $0.00005 $0.00522
Sonnet 5 $0.00002 $0.00209
Haiku 4.5 $0.00001 $0.00104

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

Security

Grade A, and why

coding-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 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.

.claude/skills/coding-patterns/SKILL.md · 164 lines

How it starts

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

Coding Patterns Skill

This skill proactively surfaces relevant patterns and conventions when the user is about to write new code. It helps maintain consistency across the codebase.

Activation Triggers

Activate this skill when the user:

Creating New Code

  • "create a new file/component/module"
  • "implement a/the..."
  • "write a function/class/test"
  • "add a new endpoint/route/handler"
  • "build a service/controller/model"
  • "scaffold a..."

Asking About Structure

  • "how should I structure..."
  • "what's the best way to..."
  • "how do I organize..."
  • "where should I put..."

Starting Work in Familiar Areas

  • Beginning work in a directory with known patterns
  • Creating something similar to existing code
  • Working on a component type that has conventions

Pattern Categories

Conventions (category: convention)

  • Naming patterns (snake_case, camelCase, etc.)
  • File organization rules
  • Import ordering
  • Comment styles
  • Variable naming

Architecture Patterns (category: architecture)

  • Component structure
  • Layer separation (controller/service/repository)
  • Dependency injection approaches
  • Error handling strategies
  • Module boundaries

Code Patterns (category: pattern)

  • Common idioms for this codebase
  • Utility function patterns
  • Testing patterns (arrange/act/assert, fixtures)
  • API design patterns
  • State management patterns

Retrieval Strategy

  1. Detect code creation context:

    • What type of code? (component, service, test, API, etc.)
    • What language/framework?
    • What directory/module?
  2. Search for relevant patterns:

    mem search "<code-type> pattern convention" --category pattern,convention,architecture --limit 5
    
  3. Check for existing examples:

    • Look for similar files in the project
    • Cross-reference with memory patterns

Response Integration

Before providing code, check for relevant patterns and surface them:

Pattern Summary Block

Project patterns to follow:

  • [Convention]: Use snake_case for all function names
  • [Pattern]: Services should inherit from BaseService
  • [Architecture]: Keep business logic in services, not controllers

Read the full file on GitHub · 164 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. 2d ago First seen · 164 lines · 11 tokens per session scan A a493087ecabc

Subscribe to this mod's changes

coding-patterns is a skill published in the GitHub repository runtimenoteslabs/memory-layer (10 stars, last pushed 3mo ago), licensed MIT. It adds 11 tokens to every session and 1,045 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

openclaw

Wire mnemostack into OpenClaw as an MCP server, alongside the native OpenClaw memory tools (memorysearch / memoryget). The two coexist — mnemostack handles the hybrid pipeline (Vector + BM25 + Memgraph + Temporal + 8-stage rerank), while the native tools do fast file-scoped retrieval.

udjin-labs/mnemostack · 0 tokens

claude-code

Wire mnemostack into Claude Desktop (and by extension Claude Code, which reads the same MCP config) as an MCP server.

udjin-labs/mnemostack · 0 tokens

cursor

Wire mnemostack into Cursor as an MCP server. Cursor reads MCP servers from its own settings, not from Claude Desktop's config.

udjin-labs/mnemostack · 0 tokens

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens

selfhost-emem-guard

Stand up an emem-guard verdict server, verify it against the conformance checks, and point any agent at it. Use when asked to self-host emem-guard, add a grounding gate to an agent on any model or framework, wire a checkpoint into Claude Code or Claude Enterprise or MCP, or run a signed allow/deny server for…

Vortx-AI/emem · 81 tokens

emem-field-tokens

Get a native-resolution raster field over an area from emem, or a field over time, as a signed, verifiable artifact rather than a set of per-cell scalars. Use when the user needs the actual grid of values over an area of interest (a world model input, an NDVI/band drape, change analysis over a scene window, exportable…

Vortx-AI/emem · 132 tokens