claude

norvig-patterns

54 elegant coding patterns derived from Peter Norvig's pytudes. Guides Claude to write cleaner, more Pythonic code using proven patterns for algorithms, data structures, testing, and code structure.

4 on GitHubby jimmc414v1.0.0MITupdated 2 days ago

Not in a marketplace yet, so it loads for one session with --plugin-dir.

Plugin norvig-patterns in jimmc414/claude-code-plugin-marketplace. Commands read from the repo's manifest — yesterday.

What it installs

Skills (54)

  • apply-decorator-wrap

    For cross-cutting concerns: add behavior without modifying functions, caching, timing, logging, validation wrappers.

  • benchmark-before-optimize

    For performance work: measure before changing, profile to find bottlenecks, compare before and after.

  • build-expression-tree

    For symbolic computation: ASTs, mathematical expressions, code that manipulates code structure, expression transformations.

  • build-priority-queue

    For ordered processing: A* search, Dijkstra, event simulation, task scheduling. Efficient min/max extraction with heap-based queue.

  • cache-recursive-calls

    For dynamic programming: overlapping subproblems, recursive solutions with repeated computations, memoization to avoid redundant work.

  • capture-state-closure

    For persistent state: closures capture outer variables, alternative to classes for simple state, factory functions that remember context.

  • cascade-type-conversion

    For flexible parsing: try multiple type conversions in order, graceful fallback from specific to general types.

  • catch-expected-errors

    For iteration with errors: catch exceptions during exploration, skip invalid cases, continue to next attempt.

  • compile-once-call-many

    For hot loop optimization: repeated formula evaluation, regex patterns, expression compilation. Transform string to callable once, call many times.

  • compose-small-helpers

    For complex behavior: build from tiny functions, chain transformations, make code read like a pipeline of operations.

  • count-combinations

    For probability and counting: permutations, combinations, sample spaces, Monte Carlo simulation, brute-force enumeration, card/dice problems.

  • define-domain-types

    For new modules: define type aliases as vocabulary, make code self-documenting, create domain-specific language feel.

  • dispatch-on-structure

    For heterogeneous data: pattern matching on type/structure, interpreter eval loops, handling different expression types.

  • display-grid-state

    For 2D debugging: visualize grid/board state, show puzzle progress, make algorithm behavior visible.

  • fallback-compatibility

    For cross-version support: try/except imports, optional dependencies, graceful degradation across Python versions.

  • find-convex-hull

    For computational geometry: convex hull, point enclosure, polygon operations. Uses monotone chain algorithm with stack-based turn detection.

  • find-shortest-path

    For pathfinding and search: shortest path, maze solving, game AI, route planning, graph traversal, BFS/DFS, Dijkstra, A* problems.

  • format-statistics-table

    For result reporting: tabular output, aligned columns, statistics summaries, human-readable reports.

  • frontier-based-explore

    For graph exploration: frontier collection with configurable pop order, BFS/DFS/random via strategy change.

  • generate-tree-structure

    For tree/maze generation: spanning trees, random mazes, graph coverage. Uses frontier-based exploration with configurable traversal order.

  • handle-edge-cases

    For boundary conditions: empty collections, zero values, recursive base cases, null checks, prevent crashes at edges.

  • intern-symbols-identity

    For fast comparison: ensure only one instance of each symbol, use 'is' instead of '==', symbol tables for interpreters.

  • iterate-with-itertools

    For combinatorial iteration: permutations, combinations, cartesian products, without storing all results in memory.

  • match-stable-pairs

    For two-sided matching: hospital-resident, stable marriage, college admissions. Gale-Shapley algorithm for stable matching with preferences.

  • optimize-local-search

    For NP-hard optimization: TSP, scheduling, assignment problems. Uses greedy construction + local improvement (2-opt, hill climbing).

  • overload-operators-dsl

    For domain-specific languages: operator overloading, make Python look like math/domain notation, expression builders.

  • parse-extract-input

    For text processing: extract numbers, words, structured data from messy text using regex patterns, parsing utilities.

  • pass-function-as-arg

    For generic algorithms: strategy pattern, callbacks, configurable behavior. Pass functions as parameters to customize algorithm behavior.

  • precompute-relationships

    For static relationships: graph structure, grid neighbors, constraint peers. Calculate once at module load, reference throughout program.

  • propagate-then-search

    For constraint problems: eliminate impossibilities before guessing, reduce search space through inference, fail fast on contradictions.

  • refactor-decompose-function

    For long functions: break into smaller pieces, extract helper functions, reduce nesting, improve testability and readability.

  • return-none-for-failure

    For graceful failure: return None or False instead of exceptions, let caller decide how to handle failure.

  • show-side-by-side

    For comparison: display before/after, multiple solutions, diffs side by side for visual comparison.

  • solve-constraint-puzzle

    For constraint satisfaction: Sudoku, scheduling, N-queens, logic puzzles, SAT-like problems, assignment problems. Uses propagate-then-search pattern.

  • solve-grid-maze

    For 2D grid problems: mazes, board games, tile maps, pixel grids, coordinate systems, cellular automata, flood fill. Uses dict-based Grid class pattern.

  • stack-based-backtrack

    For search with undo: explicit decision stack, backtracking when paths fail, depth-first exploration with state restoration.

  • test-structural-invariants

    For data structure validation: test lengths, relationships, constraints that must hold, verify setup is correct.

  • test-with-examples

    For example-driven development: test cases as specifications, input/output pairs, documentation through examples.

  • time-and-report

    For performance reporting: timing wrappers, throughput calculations, profiling summaries.

  • tokenize-then-parse

    For interpreters: separate lexing from parsing, token stream to AST, structured text processing in stages.

  • use-class-for-state

    For complex state: encapsulate multiple interacting variables, stateful algorithms, backtracking search state.

  • use-comprehension-chain

    For data transformation: list/dict/set comprehensions, chained filtering and mapping, creating lookup structures concisely.

  • use-counter-frequency

    For counting and frequency: histograms, most common elements, vote tallying, neighbor counting, word frequencies, distribution analysis.

  • use-defaultdict-groups

    For grouping and auto-initialization: adjacency lists, grouping by key, multi-maps, nested structures without KeyError handling.

  • use-generator-lazy

    For memory efficiency: large sequences, infinite streams, early termination possible, pipeline processing without materializing all data.

  • use-lambda-inline

    For inline callbacks: anonymous one-liner functions, key functions for sorting, trivial transformations as dict values.

  • use-namedtuple-record

    For lightweight records: immutable data with named fields, hashable structures for sets/dicts, self-documenting tuple alternatives.

  • use-operator-module

    For functional operations: named functions for operators, cleaner than lambdas for arithmetic, building interpreter environments.

  • use-sparse-set

    For sparse data: infinite grids, large spaces with few active elements, membership testing, set operations on coordinates or states.

  • use-table-driven-rules

    For rule-based systems: store rules as data, easier to add/modify than if-elif chains, simplification tables, configuration.

  • validate-before-process

    For input validation: check format and constraints before processing, fail fast with clear errors, defensive parsing.

  • verify-solution-properties

    For solution checking: independent verification that result is correct, separate from how it was computed.

  • verify-with-inline-tests

    For test co-location: tests in same file as code, run with main, tests as documentation and examples.

  • write-docstring-first

    For writing clean functions: start with docstring, iterate until code matches docstring exactly, achieve docstring-code isomorphism.

View source on GitHub

Problems found in this repo's manifests

  • "example-deployment" points to ./plugins/example-deployment, which doesn't exist in the repo — install will fail

More from jimmc414/claude-code-plugin-marketplace

All 13 plugins →

Parallel workflow orchestration using git worktrees for concurrent Claude Code sessions

3 skills · 3 agents

4

Adversarial test generation that finds real bugs by inverting the reward structure

2 skills · 3 agents

4

Extract local skills, agents, and hooks and publish them to plugin marketplaces

1 skill · 3 agents

4

Problem diagnosis and solution generation workflow. Separates problem clarification from solution generation for better outcomes.

2 commands · 1 agent

4

Thought refinement workflow with clarification and Socratic examination. Orchestrates brain dump clarification through rigorous but honest intellectual exploration.

2 commands · 1 agent

4

Collaborative planning commands with iterative requirements gathering. Ensures thorough understanding before implementation through structured Q&A sessions.

2 commands

4

Similar plugins

superpowers

claudecodex

Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques

15 skills · hooks

obra/superpowers 316,836

ecc

claudecodex

Harness-native ECC operator layer - 71 agents, 314 skills, 98 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses

200 skills · 98 commands · 71 agents · 1 MCP server · hooks

affaan-m/ECC 302,088

Collection of example skills demonstrating various capabilities including skill creation, MCP building, visual design, algorithmic art, internal communications, web testing, artifact building, Slack GIFs, and theme styling

19 skills

anthropics/skills 193,780

hookify

claude

Easily create custom hooks to prevent unwanted behaviors by analyzing conversation patterns or from explicit instructions. Define rules via simple markdown files.

1 skill · 4 commands · 1 agent · hooks

anthropics/claude-code 155,476

Design fluency for frontend development. 1 skill with 24 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.

1 skill · 4 agents · hooks

pbakaus/impeccable 109,099

Core Ruflo MCP tools, commands, and Claude Code orchestration patterns

5 skills · 2 commands · 4 agents · 1 MCP server · hooks

ruvnet/ruflo 81,589

Maintain norvig-patterns?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins13 plugins