home / skills / pchalasani / claude-code-tools / add-pattern

This skill helps you capture and organize Langroid design patterns into well-structured notes for future reference.

npx playbooks add skill pchalasani/claude-code-tools --skill add-pattern

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.0 KB
---
name: add-pattern
description: Use this skill when you learn one or more design pattern(s) in the
  Langroid (multi) agent framework, and want to make a note for future reference
  for yourself. Use this either autonomously, or when asked by the user to record 
  a new pattern.
---

# add-pattern

## Instructions

When you learn a new Langroid design pattern, do the following:

1. Add an entry in the sibling `patterns/SKILL.md` file in the appropriate category
   section, containing a DESCRIPTION of the goal of the pattern (i.e. what it enables
   you to implement), accompanied by a `- Reference:` pointer to a markdown DOCUMENT
   in the `patterns/` directory.

   IMPORTANT - The DESCRIPTION should be clear enough that future YOU can effectively
   use it to MATCH design problems you may encounter in future.

2. In that DOCUMENT, describe the idea of the implementation along with code examples.
   Follow the format of existing pattern files (Problem, Solution, Complete Code
   Example, Key Points, When to Use).

Overview

This skill records newly learned Langroid design patterns so you can reuse them later. It captures a concise description that helps you match future design problems, and links to a detailed pattern document with implementation guidance. Use it either autonomously or when the user asks to note a pattern for future reference.

How this skill works

When you identify a pattern, the skill creates or updates an index entry in the project’s patterns index under the appropriate category, including a clear DESCRIPTION and a reference to a detailed pattern document. It then creates or updates the corresponding document in the patterns directory with an explicit Problem, Solution, code examples, key points, and When to Use guidance.

When to use it

  • After discovering a reusable design idea while building a Langroid agent
  • When a user asks you to store a pattern for future recall
  • When formalizing a repeatable solution found during debugging or refactoring
  • When consolidating best practices across multiple agents or sessions

Best practices

  • Write a short, actionable DESCRIPTION that lets future you match the pattern to new problems
  • Place the entry in the most specific category so retrieval is easier later
  • Include a link to a dedicated document that covers Problem, Solution, code, key points, and When to Use
  • Provide complete code examples that are runnable and minimal
  • Keep the document updated when the pattern evolves or new pitfalls emerge

Example use cases

  • Capture a coordination pattern for multi-agent task delegation in Langroid
  • Document a CLI-agent restart-and-recover strategy discovered during testing
  • Record a context-window management approach used to scale long-running conversations
  • Save a recommended tmux orchestration pattern used to run multiple CLI agents together

FAQ

What should the short DESCRIPTION contain?

A goal-oriented sentence about what the pattern enables and the situations where it applies, concise enough for quick matching later.

What belongs in the detailed document?

A clear Problem statement, a Solution overview, a complete code example, Key Points, and When to Use guidance.