Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

Python Testing Patterns
Core Testing Philosophy
Coverage Requirements

Coverage Requirements

**Target**: 80%+ code coverage

**Critical paths**: 100% coverage required

Use `pytest --cov` to measure coverage


Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures.

Healthcare Eval Harness — Patient Safety Verification

Pass/Fail Matrix

| Category | Threshold | On Failure |
|----------|-----------|------------|
| CDSS Accuracy | 100% | **BLOCK deployment** |
| PHI Exposure | 100% | **BLOCK deployment** |
| Data Integrity | 100% | **BLOCK deployment** |
| Clinical Workflow | 95%+ | WARN, allow with review |
| Integration | 95%+ | WARN, allow with review |


Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.

Swift Protocol-Based Dependency Injection for Testing

Patterns for making Swift code testable by abstracting external dependencies (file system, network, iCloud) behind small, focused protocols. Enables deterministic tests without I/O.


Offers the user an informed choice about how much response depth to consume before answering. Use this skill when the user explicitly wants to control response length, depth, or token budget. TRIGGER when: "token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed answer", "exhaustive answer", "respuesta corta vs larga", "cuántos tokens", "ahorrar tokens", "responde al 50%", "dame la versión corta", "quiero controlar cuánto usas", or clear variants where the user is explicitly asking to control answer size or depth. DO NOT TRIGGER when: user has already specified a level in the current session (maintain it), the request is clearly a one-word answer, or "token" refers to auth/session/payment tokens rather than response size.

Token Budget Advisor (TBA)

Intercept the response flow to offer the user a choice about response depth **before** Claude answers.


Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.

Hexagonal Architecture
Multi-Language Mapping

Multi-Language Mapping

Use the same boundary rules across ecosystems; only syntax and wiring style change.

**TypeScript/JavaScript**

Ports: `application/ports/*` as interfaces/types.

Use cases: classes/functions with constructor/argument injection.

Adapters: `adapters/inbound/*`, `adapters/outbound/*`.

Composition: explicit factory/container module (no hidden globals).

**Java**

Packages: `domain`, `application.port.in`, `application.port.out`, `application.usecase`, `adapter.in`, `adapter.out`.

Ports: interfaces in `application.port.*`.

Use cases: plain classes (Spring `@Service` is optional, not required).

Composition: Spring config or manual wiring class; keep wiring out of domain/use-case classes.

**Kotlin**

Modules/packages mirror the Java split (`domain`, `application.port`, `application.usecase`, `adapter`).

Ports: Kotlin interfaces.

Use cases: classes with constructor injection (Koin/Dagger/Spring/manual).

Composition: module definitions or dedicated composition functions; avoid service locator patterns.

**Go**

Packages: `internal/<feature>/domain`, `application`, `ports`, `adapters/inbound`, `adapters/outbound`.

Ports: small interfaces owned by the consuming application package.

Use cases: structs with interface fields plus explicit `New...` constructors.

Composition: wire in `cmd/<app>/main.go` (or dedicated wiring package), keep constructors explicit.


Build monitoring dashboards that answer real operator questions for Grafana, SigNoz, and similar platforms. Use when turning metrics into a working dashboard instead of a vanity board.

Dashboard Builder
Example Panel Sets
Elasticsearch

Example Panel Sets

Elasticsearch

cluster health

shard allocation

search latency

indexing rate

JVM heap / GC


Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.

MCP Server Patterns
Examples
Install and server setup

Examples

Install and server setup

Register tools and resources using the API your SDK version provides: some versions use `server.tool(name, description, schema, handler)` (positional args), others use `server.tool({ name, description, inputSchema }, handler)` or `registerTool()`. Same for resources — include a `uri` in the handler when the API provides it. Check the official MCP docs or Context7 for the current `@modelcontextprotocol/sdk` signatures to avoid copy-paste errors.

Use **Zod** (or the SDK’s preferred schema format) for input validation.


Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.

Go Development Patterns
When to Activate

When to Activate

Writing new Go code

Reviewing Go code

Refactoring existing Go code

Designing Go packages/modules


Comprehensive Perl security covering taint mode, input validation, safe process execution, DBI parameterized queries, web security (XSS/SQLi/CSRF), and perlcritic security policies.

When to Activate

Handling user input in Perl applications

Building Perl web applications (CGI, Mojolicious, Dancer2, Catalyst)

Reviewing Perl code for security vulnerabilities

Performing file operations with user-supplied paths

Executing system commands from Perl

Writing DBI database queries


Audit the active repo, MCP servers, plugins, connectors, env surfaces, and harness setup, then recommend the highest-value ECC-native skills, hooks, agents, and operator workflows. Use when the user wants help setting up Claude Code or understanding what capabilities are actually available in their environment.

When to Use

User says "set up Claude Code", "recommend automations", "what plugins or MCPs should I use?", or "what am I missing?"

Auditing a machine or repo before installing more skills, hooks, or connectors

Comparing official marketplace plugins against ECC-native coverage

Reviewing `.env`, `.mcp.json`, plugin settings, or connected-app surfaces to find missing workflow layers

Deciding whether a capability should be a skill, hook, agent, MCP, or external connector


Codified expertise for customs documentation, tariff classification, duty optimization, restricted party screening, and regulatory compliance across multiple jurisdictions. Informed by trade compliance specialists with 15+ years experience. Includes HS classification logic, Incoterms application, FTA utilization, and penalty mitigation. Use when handling customs clearance, tariff classification, trade compliance, import/export documentation, or duty optimization.

Customs & Trade Compliance

Role and Context

You are a senior trade compliance specialist with 15+ years managing customs operations across US, EU, UK, and Asia-Pacific jurisdictions. You sit at the intersection of importers, exporters, customs brokers, freight forwarders, government agencies, and legal counsel. Your systems include ACE (Automated Commercial Environment), CHIEF/CDS (UK), ATLAS (DE), customs broker portals, denied party screening platforms, and ERP trade management modules. Your job is to ensure lawful, cost-optimized movement of goods across borders while protecting the organization from penalties, seizures, and debarment.


GAN-inspired Generator-Evaluator agent harness for building high-quality applications autonomously. Based on Anthropic's March 2026 harness design paper.

Anti-Patterns

**Evaluator too lenient** — If the evaluator passes everything on iteration 1, your rubric is too generous. Tighten scoring criteria and add explicit penalties for common AI patterns.

**Generator ignoring feedback** — Ensure feedback is passed as a file, not inline. The generator should read `feedback-NNN.md` at the start of each iteration.

**Infinite loops** — Always set `GAN_MAX_ITERATIONS`. If the generator can't improve past a score plateau after 3 iterations, stop and flag for human review.

**Evaluator testing superficially** — The evaluator must use Playwright to **interact** with the live app, not just screenshot it. Click buttons, fill forms, test error states.

**Evaluator praising its own fixes** — Never let the evaluator suggest fixes and then evaluate those fixes. The evaluator only critiques; the generator fixes.

**Context exhaustion** — For long sessions, use Claude Agent SDK's automatic compaction or reset context between major phases.


Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

When to Activate

the user wants content or outreach in a specific voice

writing for X, LinkedIn, email, launch posts, threads, or product updates

adapting a known author's tone across channels

the existing content lane needs a reusable style system instead of one-off mimicry


Weighted social-graph ranking for warm intro discovery, bridge scoring, and network gap analysis across X and LinkedIn. Use when the user wants the reusable graph-ranking engine itself, not the broader outreach or network-maintenance workflow layered on top of it.

Core Model

Given:

`T` = weighted target set

`M` = your current mutuals / direct connections

`d(m, t)` = shortest hop distance from mutual `m` to target `t`

`w(t)` = target weight from signal scoring

Base bridge score:

Where:

`λ` is the decay factor, usually `0.5`

a direct path contributes full value

each extra hop halves the contribution

Second-order expansion:

Where:

`N(m) \\ M` is the set of people the mutual knows that you do not

`α` discounts second-order reach, usually `0.3`

Response-adjusted final ranking:

Where:

`engagement(m)` is normalized responsiveness or relationship strength

`β` is the engagement bonus, usually `0.2`

Interpretation:

Tier 1: high `R(m)` and direct bridge paths -> warm intro asks

Tier 2: medium `R(m)` and one-hop bridge paths -> conditional intro asks

Tier 3: low `R(m)` or no viable bridge -> direct outreach or follow-gap fill


EMR/EHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry.

Healthcare EMR Development Patterns
How It Works
Locked Encounter Pattern

Locked Encounter Pattern

Once a clinical encounter is signed:

No edits allowed — only an addendum (a separate linked record)

Both original and addendum appear in the patient timeline

Audit trail captures who signed, when, and any addendum records


Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.

Carrier Relationship Management
Core Knowledge
FMCSA Compliance Vetting

FMCSA Compliance Vetting

Every carrier in your portfolio must pass compliance screening before their first load and on a recurring quarterly basis:

**Operating authority:** Verify active MC (Motor Carrier) or FF (Freight Forwarder) authority via FMCSA SAFER. An "authorized" status that hasn't been updated in 12+ months may indicate a carrier that's technically authorized but operationally inactive. Check the "authorized for" field — a carrier authorized for "property" cannot legally carry household goods.

**Insurance minimums:** $750K minimum for general freight (per FMCSA §387.9), $1M for hazmat, $5M for household goods. Require $1M minimum from all carriers regardless of commodity — the FMCSA minimum of $750K doesn't cover a serious accident. Verify insurance through the FMCSA Insurance tab, not just the certificate the carrier provides — certificates can be forged or outdated.

**Safety rating:** FMCSA assigns Satisfactory, Conditional, or Unsatisfactory ratings based on compliance reviews. Never use a carrier with an Unsatisfactory rating. Conditional carriers require case-by-case evaluation — understand what the conditions are. Carriers with no rating ("unrated") make up the majority — use their CSA (Compliance, Safety, Accountability) scores instead. Focus on Unsafe Driving, Hours-of-Service, and Vehicle Maintenance BASICs. A carrier in the top 25% percentile (worst) on Unsafe Driving is a liability risk.

**Broker bond verification:** If using brokers, verify their $75K surety bond or trust fund is active. A broker whose bond has been revoked or reduced is likely in financial distress. Check the FMCSA Bond/Trust tab. Also verify the broker has contingent cargo insurance — this protects you if the broker's underlying carrier causes a loss and the carrier's insurance is insufficient.


Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

Installation

Basic Message

Streaming

Tool Use

Define tools and let Claude call them:


Process, convert, OCR, extract, redact, sign, and fill documents using the Nutrient DWS API. Works with PDFs, DOCX, XLSX, PPTX, HTML, and images.

Nutrient Document Processing
Operations
OCR Scanned Documents

Extract Text and Data

OCR Scanned Documents

Languages: Supports 100+ languages via ISO 639-2 codes (e.g., `eng`, `deu`, `fra`, `spa`, `jpn`, `kor`, `chi_sim`, `chi_tra`, `ara`, `hin`, `rus`). Full language names like `english` or `german` also work. See the [complete OCR language table](https://www.nutrient.io/guides/document-engine/ocr/language-support/) for all supported codes.


Codified expertise for quality control, non-conformance investigation, root cause analysis, corrective action, and supplier quality management in regulated manufacturing. Informed by quality engineers with 15+ years experience across FDA, IATF 16949, and AS9100 environments. Includes NCR lifecycle management, CAPA systems, SPC interpretation, and audit methodology. Use when investigating non-conformances, performing root cause analysis, managing CAPAs, interpreting SPC data, or handling supplier quality issues.

Quality & Non-Conformance Management
Core Knowledge
CAPA System

CAPA System

CAPA is the regulatory backbone. FDA cites CAPA deficiencies more than any other subsystem:

**Initiation:** Not every NCR requires a CAPA. Triggers: repeat non-conformances (same failure mode 3+ times), customer complaints, audit findings, field failures, trend analysis (SPC signals), regulatory observations. Over-initiating CAPAs dilutes resources and creates closure backlogs. Under-initiating creates audit findings.

**Corrective Action vs. Preventive Action:** Corrective addresses an existing non-conformance and prevents its recurrence. Preventive addresses a potential non-conformance that hasn't occurred yet — typically identified through trend analysis, risk assessment, or near-miss events. FDA expects both; don't conflate them.

**Writing Effective CAPAs:** The action must be specific, measurable, and address the verified root cause. Bad: "Improve inspection procedures." Good: "Add torque verification step at Station 12 with calibrated torque wrench (±2%), documented on traveler checklist WI-4401 Rev C, effective by 2025-04-15." Every CAPA must have an owner, a target date, and defined evidence of completion.

**Verification vs. Validation of Effectiveness:** Verification confirms the action was implemented as planned (did we install the poka-yoke fixture?). Validation confirms the action actually prevented recurrence (did the defect rate drop to zero over 90 days of production data?). FDA expects both. Closing a CAPA at verification without validation is a common audit finding.

**Closure Criteria:** Objective evidence that the corrective action was implemented AND effective. Minimum effectiveness monitoring period: 90 days for process changes, 3 production lots for material changes, or the next audit cycle for system changes. Document the effectiveness data — charts, rejection rates, audit results.

**Regulatory Expectations:** FDA 21 CFR 820.198 (complaint handling) and 820.90 (nonconforming product) feed into 820.100 (CAPA). IATF 16949 §10.2.3-10.2.6. AS9100 §10.2. ISO 13485 §8.5.2-8.5.3. Each standard has specific documentation and timing expectations.


When to Use

Classifying goods under HS/HTS tariff codes for import or export

Preparing customs documentation (commercial invoices, certificates of origin, ISF filings)

Screening parties against denied/restricted entity lists (SDN, Entity List, EU sanctions)

Evaluating FTA qualification and duty savings opportunities

Responding to customs audits, CF-28/CF-29 requests, or penalty notices


Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

When to Use

Use this skill when:

auditing crawlability, indexability, canonicals, or redirects

improving title tags, meta descriptions, and heading structure

adding or validating structured data

improving Core Web Vitals

doing keyword research and mapping keywords to URLs

planning internal linking or sitemap / robots changes


Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

Kotlin Testing Patterns
Examples
Property-Based Testing

Property-Based Testing

Kotest Property Testing

Kotest Property Testing

Custom Generators

Custom Generators


PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.

PyTorch Development Patterns
Performance Optimization
Mixed Precision Training

Checkpointing Patterns

Save and Load Checkpoints

Performance Optimization

Mixed Precision Training


Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance, accessibility, security, and clean architecture.

Flutter/Dart Code Review Best Practices
4. State Management (Library-Agnostic)

4. State Management (Library-Agnostic)

These principles apply to all Flutter state management solutions (BLoC, Riverpod, Provider, GetX, MobX, Signals, ValueNotifier, etc.).


JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

Kotlin Exposed Patterns
Quick Reference: Exposed Patterns

Testing with Exposed

In-Memory Database for Tests

Gradle Dependencies

Quick Reference: Exposed Patterns

| Pattern | Description |
|---------|-------------|
| `object Table : UUIDTable("name")` | Define table with UUID primary key |
| `newSuspendedTransaction { }` | Coroutine-safe transaction block |
| `Table.selectAll().where { }` | Query with conditions |
| `Table.insertAndGetId { }` | Insert and return generated ID |
| `Table.update({ condition }) { }` | Update matching rows |
| `Table.deleteWhere { }` | Delete matching rows |
| `Table.batchInsert(items) { }` | Efficient bulk insert |
| `innerJoin` / `leftJoin` | Join tables |
| `orderBy` / `limit` / `offset` | Sort and paginate |
| `count()` / `sum()` / `avg()` | Aggregation functions |

**Remember**: Use the DSL style for simple queries and the DAO style when you need entity lifecycle management. Always use `newSuspendedTransaction` for coroutine support, and wrap database operations behind a repository interface for testability.


Evidence-first mailbox triage, drafting, send verification, and sent-mail-safe follow-up workflow for ECC. Use when the user wants to organize email, draft or send through the real mail surface, or prove what landed in Sent.

Output Format

Pitfalls

do not claim send success without a sent-copy check

do not ignore the thread history and write a contextless reply

do not mix mailbox work with DM or text-message workflows

do not expose secrets, auth details, or unnecessary message metadata


Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

Python Testing Patterns
Markers and Test Selection

Multiple Parameters

Parametrize with IDs

Parametrized Fixtures

Markers and Test Selection


Quality & Non-Conformance Management
Key Edge Cases

Key Edge Cases

These are situations where the obvious approach is wrong. Brief summaries are included here so you can expand them into project-specific playbooks if needed.

**Customer-reported field failure with no internal detection:** Your inspection and testing passed this lot, but customer field data shows failures. The instinct is to question the customer's data — resist it. Check whether your inspection plan covers the actual failure mode. Often, field failures expose gaps in test coverage rather than test execution errors.

**Supplier audit reveals falsified Certificates of Conformance:** The supplier has been submitting CoCs with fabricated test data. Quarantine all material from that supplier immediately, including WIP and finished goods. This is a regulatory reportable event in aerospace (counterfeit prevention per AS9100) and potentially in medical devices. The scale of the containment drives the response, not the individual NCR.

**SPC shows process in-control but customer complaints are rising:** The chart is stable within control limits, but the customer's assembly process is sensitive to variation within your spec. Your process is "capable" by the numbers but not capable enough. This requires customer collaboration to understand the true functional requirement, not just a spec review.

**Non-conformance discovered on already-shipped product:** Containment must extend to the customer's incoming stock, WIP, and potentially their customers. The speed of notification depends on safety risk — safety-critical issues require immediate customer notification, others can follow the standard process with urgency.

**CAPA that addresses a symptom, not the root cause:** The defect recurs after CAPA closure. Before reopening, verify the original root cause analysis — if the root cause was "operator error" and the corrective action was "retrain," neither the root cause nor the action was adequate. Start the RCA over with the assumption the first investigation was insufficient.

**Multiple root causes for a single non-conformance:** A single defect results from the interaction of machine wear, material lot variation, and a measurement system limitation. The 5 Whys forces a single chain — use Ishikawa or FTA to capture the interaction. Corrective actions must address all contributing causes; fixing only one may reduce frequency but won't eliminate the failure mode.

**Intermittent defect that cannot be reproduced on demand:** Cannot reproduce ≠ does not exist. Increase sample size and monitoring frequency. Check for environmental correlations (shift, ambient temperature, humidity, vibration from adjacent equipment). Component of Variation studies (Gauge R&R with nested factors) can reveal intermittent measurement system contributions.

**Non-conformance discovered during a regulatory audit:** Do not attempt to minimize or explain away. Acknowledge the finding, document it in the audit response, and treat it as you would any NCR — with a formal investigation, root cause analysis, and CAPA. Auditors specifically test whether your system catches what they find; demonstrating a robust response is more valuable than pretending it's an anomaly.


Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.

Voice Handling

If the user's voice matters, run `brand-voice` first and reuse its `VOICE PROFILE`.
This skill should keep the investor-specific structure and ask discipline, not recreate its own parallel voice system.


Flutter/Dart Code Review Best Practices
5. Performance
Expensive operations in build():

Expensive operations in build():

[ ] No sorting, filtering, or mapping large collections in `build()` — compute in state management layer

[ ] No regex compilation in `build()`

[ ] `MediaQuery.of(context)` usage is specific (e.g., `MediaQuery.sizeOf(context)`)


Transform Claude Code into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing. Replaces standalone agent frameworks (Hermes, AutoGPT) by leveraging Claude Code's native crons, dispatch, MCP tools, and memory. Use when the user wants continuous autonomous operation, scheduled tasks, or a self-directing agent loop.

Autonomous Agent Harness

Turn Claude Code into a persistent, self-directing agent system using only native features and MCP servers.


Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.

Autonomous Loops Skill
3. Infinite Agentic Loop
Implementation via Claude Code Commands

Implementation via Claude Code Commands

Create `.claude/commands/infinite.md`:

**Invoke:**


Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

Docker Patterns
Docker Compose for Local Development
Development vs Production Dockerfile

Docker Compose for Local Development

Standard Web App Stack

Development vs Production Dockerfile


Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.

Agent Introspection Debugging
Four-Phase Loop
Phase 1: Failure Capture

Four-Phase Loop

Phase 1: Failure Capture

Before trying to recover, record the failure precisely.

Capture:

error type, message, and stack trace when available

last meaningful tool call sequence

what the agent was trying to do

current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes

current environment assumptions: cwd, branch, relevant service state, expected files

Minimum capture template:


GitHub repository operations, automation, and management. Issue triage, PR management, CI/CD operations, release management, and security monitoring using the gh CLI. Use when the user wants to manage GitHub issues, PRs, CI status, releases, contributors, stale items, or any GitHub operational task beyond simple git commands.

Release Management

When preparing a release:

Check all CI is green on main

Review unreleased changes: `gh pr list --state merged --base main`

Generate changelog from PR titles

Create release: `gh release create`


This skill should be used when the user asks to create a hookify rule, write a hook rule, configure hookify, add a hookify rule, or needs guidance on hookify rule syntax and patterns.

Writing Hookify Rules
Rule File Format
Advanced Format (Multiple Conditions)

Advanced Format (Multiple Conditions)

**Condition fields by event:**

bash: `command`

file: `file_path`, `new_text`, `old_text`, `content`

prompt: `user_prompt`

**Operators:** `regex_match`, `contains`, `equals`, `not_contains`, `starts_with`, `ends_with`

All conditions must match for rule to trigger.


See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

VideoDB Skill
When to use
Index + search (timestamps + evidence)

Index + search (timestamps + evidence)

Build **visual**, **spoken**, and **keyword** indexes

Search and return exact moments with **timestamps** and **playable evidence**

Auto-create **clips** from search results


Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

Database Migration Patterns
Prisma (TypeScript/Node.js)
Custom SQL Migration

Schema Example

Custom SQL Migration

For operations Prisma cannot express (concurrent indexes, data backfills):


Persistent per-project memory for Claude Code. Auto-loads project context on session start, tracks sessions with git activity, and writes to native memory. Commands run deterministic Node.js scripts — behavior is consistent across model versions.

`/ck:info [name|number]` — Quick Snapshot

Display output verbatim. No follow-up question.


Evidence-first repo execution workflow for ECC. Use when the user wants a command run, a repo checked, a CI failure debugged, or a narrow fix pushed with exact proof of what was executed and verified.

Guardrails

inspect before editing

stay read-only if the user asked for audit/review only

prefer repo-local scripts and helpers over improvised ad hoc wrappers

do not claim fixed until the proving command was rerun

do not claim pushed unless the branch actually moved upstream


Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.

Django Security Best Practices
Authorization
Custom Permissions

Password Hashing

Session Management

Authorization

Permissions

Custom Permissions


C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.

C++ Coding Standards (C++ Core Guidelines)

Quick Reference Checklist

Before marking C++ work complete:

[ ] No raw `new`/`delete` -- use smart pointers or RAII (R.11)

[ ] Objects initialized at declaration (ES.20)

[ ] Variables are `const`/`constexpr` by default (Con.1, ES.25)

[ ] Member functions are `const` where possible (Con.2)

[ ] `enum class` instead of plain `enum` (Enum.3)

[ ] `nullptr` instead of `0`/`NULL` (ES.47)

[ ] No narrowing conversions (ES.46)

[ ] No C-style casts (ES.48)

[ ] Single-argument constructors are `explicit` (C.46)

[ ] Rule of Zero or Rule of Five applied (C.20, C.21)

[ ] Base class destructors are public virtual or protected non-virtual (C.35)

[ ] Templates are constrained with concepts (T.10)

[ ] No `using namespace` in headers at global scope (SF.7)

[ ] Headers have include guards and are self-contained (SF.8, SF.11)

[ ] Locks use RAII (`scoped_lock`/`lock_guard`) (CP.20)

[ ] Exceptions are custom types, thrown by value, caught by reference (E.14, E.15)

[ ] `'\n'` instead of `std::endl` (SL.io.50)

[ ] No magic numbers (ES.45)


Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.

Best Practices

**Schema first**: Define input schemas for every tool; document parameters and return shape.

**Errors**: Return structured errors or messages the model can interpret; avoid raw stack traces.

**Idempotency**: Prefer idempotent tools where possible so retries are safe.

**Rate and cost**: For tools that call external APIs, consider rate limits and cost; document in the tool description.

**Versioning**: Pin SDK version in package.json; check release notes when upgrading.


Codified expertise for handling freight exceptions, shipment delays, damages, losses, and carrier disputes. Informed by logistics professionals with 15+ years operational experience. Includes escalation protocols, carrier-specific behaviors, claims procedures, and judgment frameworks. Use when handling shipping exceptions, freight claims, delivery issues, or carrier disputes.

Logistics Exception Management
Escalation Protocols
Escalation Chain

Escalation Chain

Level 1 (Analyst) → Level 2 (Team Lead, 4 hours) → Level 3 (Manager, 24 hours) → Level 4 (Director, 48 hours) → Level 5 (VP, 72+ hours or any Level 5 severity)


Build a fully automated AI-powered data collection agent for any public source — job boards, prices, news, GitHub, sports, anything. Scrapes on a schedule, enriches data with a free LLM (Gemini Flash), stores results in Notion/Sheets/Supabase, and learns from user feedback. Runs 100% free on GitHub Actions. Use when the user wants to monitor, collect, or track any public data automatically.

Data Scraper Agent
Reference Implementation

Real-World Examples

Reference Implementation

A complete working agent built with this exact architecture would scrape 4+ sources,
batch Gemini calls, learn from Applied/Rejected decisions stored in Notion, and run
100% free on GitHub Actions. Follow Steps 1–9 above to build your own.


EMR/EHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry.

Healthcare EMR Development Patterns
When to Use

When to Use

Building patient encounter workflows (complaint, exam, diagnosis, prescription)

Implementing clinical note-taking (structured + free text + voice-to-text)

Designing prescription/medication modules with drug interaction checking

Integrating Clinical Decision Support Systems (CDSS)

Building lab result displays with reference range highlighting

Implementing audit trails for clinical data

Designing healthcare-accessible UIs for clinical data entry


Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

Test-Driven Development Workflow
Test Coverage Verification
Run Coverage Report

Supabase Mock

Redis Mock

OpenAI Mock

Test Coverage Verification

Run Coverage Report


Operate customer billing workflows such as subscriptions, refunds, churn triage, billing-portal recovery, and plan analysis using connected billing tools like Stripe. Use when the user needs to help a customer, inspect subscription state, or manage revenue-impacting billing operations.

Customer Billing Ops
Preferred Tool Surface

Preferred Tool Surface

Use connected billing tools such as Stripe first

Use email, GitHub, or issue trackers only as supporting evidence

Prefer hosted billing/customer portals over custom account-management code when the platform already provides the needed controls


VideoDB Skill
How it works
Common inputs

How it works

Common inputs

Local **file path**, public **URL**, or **RTSP URL**

Desktop capture request: **start / stop / summarize session**

Desired operations: get context for understanding, transcode spec, index spec, search query, clip ranges, timeline edits, alert rules


HIPAA-specific entrypoint for healthcare privacy and security work. Use when a task is explicitly framed around HIPAA, PHI handling, covered entities, BAAs, breach posture, or US healthcare compliance requirements.

HIPAA Compliance
Examples
Example 2: Vendor/tooling decision

Example 2: Vendor/tooling decision

User request:

Can we send support transcripts and patient messages into our analytics stack?

Response pattern:

Assume those messages may contain PHI

Block the design unless the analytics vendor is approved for HIPAA-bound workloads and the data path is minimized

Require redaction or a non-PHI event model when possible


Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.

Hexagonal Architecture
How It Works
Step 4: Build adapters at the edge

Step 4: Build adapters at the edge

Inbound adapter converts protocol input to use-case input.

Outbound adapter maps app contracts to concrete APIs/ORM/query builders.

Mapping stays in adapters, not inside use cases.


When to Use

Customer says billing is broken, they want a refund, or they cannot cancel

Investigating duplicate subscriptions, accidental charges, failed renewals, or churn risk

Reviewing plan mix, active subscriptions, yearly vs monthly conversion, or team-seat confusion

Creating or validating a billing portal flow

Auditing support complaints that touch subscriptions, invoices, refunds, or payment methods


Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).

Accessibility (WCAG 2.2)
How It Works
Step 3: Implement Operable Controls

Step 3: Implement Operable Controls

Ensure a minimum **24x24 CSS pixel** target size (WCAG 2.2 SC 2.5.8).

Verify all interactive elements are reachable via keyboard and have a visible focus indicator (SC 2.4.11).

Provide single-pointer alternatives for dragging movements.


JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

Kotlin Exposed Patterns
Database Setup
HikariCP Connection Pooling

Examples

DSL Query

DAO Entity Usage

HikariCP Configuration

Database Setup

HikariCP Connection Pooling


Related Skills

`healthcare-phi-compliance`

`healthcare-reviewer`

`healthcare-emr-patterns`

`healthcare-eval-harness`

`security-review`


NestJS architecture patterns for modules, controllers, providers, DTO validation, guards, interceptors, config, and production-grade TypeScript backends.

NestJS Development Patterns
Config and Environment Validation

Config and Environment Validation

Validate env at boot, not lazily at first request.

Keep config access behind typed helpers or config services.

Split dev/staging/prod concerns in config factories instead of branching throughout feature code.


Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.

C++ Testing (Agent Skill)
Code Examples
CMake/CTest Quickstart

Code Examples

Basic Unit Test (gtest)

Fixture (gtest)

Mock (gmock)

CMake/CTest Quickstart


Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.

Quality Gate

Before delivering:

all numbers are sourced or labeled as estimates

old data is flagged

the recommendation follows from the evidence

risks and counterarguments are included

the output makes a decision easier


Evidence-first live messaging workflow for ECC. Use when the user wants to read texts or DMs, recover a recent one-time code, inspect a thread before replying, or prove which message source was actually checked.

Messages Ops

Use this when the task is live-message retrieval: iMessage, DMs, recent one-time codes, or thread inspection before a follow-up.

This is not email work. If the dominant surface is a mailbox, use `email-ops`.


Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.

3. EAFP - Easier to Ask Forgiveness Than Permission

Python prefers exception handling over checking conditions.


Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.

Route Rules

Prefer `routeRules` in `nuxt.config.ts` for rendering and caching strategy:

`prerender`: static HTML at build time

`swr`: serve cached content and revalidate in the background

`isr`: incremental static regeneration on supported platforms

`ssr: false`: client-rendered route

`cache` or `redirect`: Nitro-level response behavior

Pick route rules per route group, not globally. Marketing pages, catalogs, dashboards, and APIs usually need different strategies.


Decision framework for choosing between regex and LLM when parsing structured text — start with regex, add LLM only for low-confidence edge cases.

Regex vs LLM for Structured Text Parsing

Decision Framework

Architecture Pattern

Implementation

1. Regex Parser (Handles the Majority)


Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.

Spring Boot Security Review
Rate Limiting

Rate Limiting

Apply Bucket4j or gateway-level limits on expensive endpoints

Log and alert on bursts; return 429 with retry hints


Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

Content-Hash File Cache Pattern
When to Activate

When to Activate

Building file processing pipelines (PDF, images, text extraction)

Processing cost is high and same files are processed repeatedly

Need a `--cache/--no-cache` CLI option

Want to add caching to existing pure functions without modifying them


Turn a one-line objective into a step-by-step construction plan for multi-session, multi-agent engineering projects. Each step has a self-contained context brief so a fresh agent can execute it cold. Includes adversarial review gate, dependency graph, parallel step detection, anti-pattern catalog, and plan mutation protocol. TRIGGER when: user requests a plan, blueprint, or roadmap for a complex multi-PR task, or describes work that needs multiple sessions. DO NOT TRIGGER when: task is completable in a single PR or fewer than 3 tool calls, or user says "just do it".

Blueprint — Construction Plan Generator
When to Use

When to Use

Breaking a large feature into multiple PRs with clear dependency order

Planning a refactor or migration that spans multiple sessions

Coordinating parallel workstreams across sub-agents

Any task where context loss between sessions would cause rework

**Do not use** for tasks completable in a single PR, fewer than 3 tool calls, or when the user says "just do it."


Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.

Autonomous Loops Skill
5. The De-Sloppify Pattern

5. The De-Sloppify Pattern

**An add-on pattern for any loop.** Add a dedicated cleanup/refactor step after each Implementer step.


Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

Python Testing Patterns
Test Organization
Test Classes

Testing with tmpdir Fixture

Test Organization

Directory Structure

Test Classes


Cost optimization patterns for LLM API usage — model routing by task complexity, budget tracking, retry logic, and prompt caching.

Cost-Aware LLM Pipeline
Core Concepts
3. Narrow Retry Logic

3. Narrow Retry Logic

Retry only on transient errors. Fail fast on authentication or bad request errors.


Codified expertise for quality control, non-conformance investigation, root cause analysis, corrective action, and supplier quality management in regulated manufacturing. Informed by quality engineers with 15+ years experience across FDA, IATF 16949, and AS9100 environments. Includes NCR lifecycle management, CAPA systems, SPC interpretation, and audit methodology. Use when investigating non-conformances, performing root cause analysis, managing CAPAs, interpreting SPC data, or handling supplier quality issues.

Quality & Non-Conformance Management
Core Knowledge
Root Cause Analysis

Root Cause Analysis

Stopping at symptoms is the most common failure mode in quality investigations:

**5 Whys:** Simple, effective for straightforward process failures. Limitation: assumes a single linear causal chain. Fails on complex, multi-factor problems. Each "why" must be verified with data, not opinion — "Why did the dimension drift?" → "Because the tool wore" is only valid if you measured tool wear.

**Ishikawa (Fishbone) Diagram:** Use the 6M framework (Man, Machine, Material, Method, Measurement, Mother Nature/Environment). Forces consideration of all potential cause categories. Most useful as a brainstorming framework to prevent premature convergence on a single cause. Not a root cause tool by itself — it generates hypotheses that need verification.

**Fault Tree Analysis (FTA):** Top-down, deductive. Start with the failure event and decompose into contributing causes using AND/OR logic gates. Quantitative when failure rate data is available. Required or expected in aerospace (AS9100) and medical device (ISO 14971 risk analysis) contexts. Most rigorous method but resource-intensive.

**8D Methodology:** Team-based, structured problem-solving. D0: Symptom recognition and emergency response. D1: Team formation. D2: Problem definition (IS/IS-NOT). D3: Interim containment. D4: Root cause identification (use fishbone + 5 Whys within 8D). D5: Corrective action selection. D6: Implementation. D7: Prevention of recurrence. D8: Team recognition. Automotive OEMs (GM, Ford, Stellantis) expect 8D reports for significant supplier quality issues.

**Red flags that you stopped at symptoms:** Your "root cause" contains the word "error" (human error is never a root cause — why did the system allow the error?), your corrective action is "retrain the operator" (training alone is the weakest corrective action), or your root cause matches the problem statement reworded.


Formal evaluation framework for Claude Code sessions implementing eval-driven development (EDD) principles

Regression Evals

Ensure changes don't break existing functionality:

Grader Types


Transform Claude Code into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing. Replaces standalone agent frameworks (Hermes, AutoGPT) by leveraging Claude Code's native crons, dispatch, MCP tools, and memory. Use when the user wants continuous autonomous operation, scheduled tasks, or a self-directing agent loop.

Autonomous Agent Harness
Core Components
3. Dispatch / Remote Agents

3. Dispatch / Remote Agents

Trigger Claude Code agents remotely for event-driven workflows.

**Dispatch patterns:**


Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.

/search-first — Research Before You Code

Examples

Example 1: "Add dead link checking"

Example 2: "Add HTTP client wrapper"


Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.

Django Development Patterns
When to Activate

When to Activate

Building Django web applications

Designing Django REST Framework APIs

Working with Django ORM and models

Setting up Django project structure

Implementing caching, signals, middleware


Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.

Cost Analysis

Santa Method costs approximately 2-3x the token cost of generation alone per verification cycle. For most high-stakes output, this is a bargain:

For batch operations, the sampling pattern reduces cost to ~15-20% of full verification while catching >90% of systematic issues.


Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

Spring Boot Verification Loop

Run before PRs, after major changes, and pre-deploy.


Use this skill to monitor a deployed URL for regressions after deploys, merges, or dependency upgrades.

Canary Watch — Post-Deploy Monitoring
How It Works
Notifications

Alert Thresholds

Notifications

When a critical threshold is crossed:

Desktop notification (macOS/Linux)

Optional: Slack/Discord webhook

Log to `~/.claude/canary-watch.log`


Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).

Accessibility (WCAG 2.2)
How It Works
Step 2: Define Perceivable Attributes

Step 2: Define Perceivable Attributes

Ensure text contrast meets **4.5:1** (normal) or **3:1** (large/UI).

Add text alternatives for non-text content (images, icons).

Implement responsive reflow (up to 400% zoom without loss of function).


Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics

Agent Eval Skill

A lightweight CLI tool for comparing coding agents head-to-head on reproducible tasks. Every "which coding agent is best?" comparison runs on vibes — this tool systematizes it.


Codified expertise for electricity and gas procurement, tariff optimization, demand charge management, renewable PPA evaluation, and multi-facility energy cost management. Informed by energy procurement managers with 15+ years experience at large commercial and industrial consumers. Includes market structure analysis, hedging strategies, load profiling, and sustainability reporting frameworks. Use when procuring energy, optimizing tariffs, managing demand charges, evaluating PPAs, or developing energy strategies.

Energy Procurement
Escalation Protocols
Escalation Chain

Escalation Chain

Energy Analyst → Energy Procurement Manager (24 hours) → Director of Procurement (48 hours) → VP Finance/CFO (>$500K exposure or long-term commitment >5 years)


Build a new API connector or provider by matching the target repo's existing integration pattern exactly. Use when adding one more integration without inventing a second architecture.

API Connector Builder
Workflow
1. Learn the house style

Workflow

1. Learn the house style

Inspect at least 2 existing connectors/providers and map:

file layout

abstraction boundaries

config model

retry / pagination conventions

registry hooks

test fixtures and naming


Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.

Market Research
Common Research Modes
Investor / Fund Diligence

Common Research Modes

Investor / Fund Diligence

Collect:

fund size, stage, and typical check size

relevant portfolio companies

public thesis and recent activity

reasons the fund is or is not a fit

any obvious red flags or mismatches


This skill should be used when the user asks to create a hookify rule, write a hook rule, configure hookify, add a hookify rule, or needs guidance on hookify rule syntax and patterns.

Writing Hookify Rules

Overview

Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in `.claude/hookify.{rule-name}.local.md` files.


AI-native lead intelligence and outreach pipeline. Replaces Apollo, Clay, and ZoomInfo with agent-powered signal scoring, mutual ranking, warm path discovery, source-derived voice modeling, and channel-specific outreach across email, LinkedIn, and X. Use when the user wants to find, qualify, and reach high-value contacts.

Configuration

Users should set these environment variables:

Agents

This skill includes specialized agents in the `agents/` subdirectory:

**signal-scorer** — Searches and ranks prospects by relevance signals

**mutual-mapper** — Maps social graph connections and finds warm paths

**enrichment-agent** — Pulls detailed profile and company data

**outreach-drafter** — Generates personalized messages


Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

Security Review Skill
Security Checklist
7. Rate Limiting

7. Rate Limiting

API Rate Limiting

API Rate Limiting

Expensive Operations

Expensive Operations

Verification Steps

Verification Steps

[ ] Rate limiting on all API endpoints

[ ] Stricter limits on expensive operations

[ ] IP-based rate limiting

[ ] User-based rate limiting (authenticated)


Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.

Django Testing with TDD
Testing Best Practices
DON'T

DON'T

**Don't test Django internals**: Trust Django to work

**Don't test third-party code**: Trust libraries to work

**Don't ignore failing tests**: All tests must pass

**Don't make tests dependent**: Tests should run in any order

**Don't over-mock**: Mock only external dependencies

**Don't test private methods**: Test public interface

**Don't use production database**: Always use test database


Evidence-first live messaging workflow for ECC. Use when the user wants to read texts or DMs, recover a recent one-time code, inspect a thread before replying, or prove which message source was actually checked.

3. Handle codes as a focused retrieval task

For one-time codes:

search the recent local message window first

narrow by service or sender when possible

stop once the code is found or the focused search is exhausted


Modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications.

Modern Perl Development Patterns
Core Principles
5. The `isa` Operator (5.32+)

5. The `isa` Operator (5.32+)

Infix type-check — replaces `blessed($o) && $o->isa('X')`.


Canary Watch — Post-Deploy Monitoring
How It Works
Watch Modes

What It Watches

Watch Modes

**Quick check** (default): single pass, report results

**Sustained watch**: check every N minutes for M hours

**Diff mode**: compare staging vs production


Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.

Go Testing Patterns
Test Coverage
Coverage Targets

Test Coverage

Running Coverage

Coverage Targets

| Code Type | Target |
|-----------|--------|
| Critical business logic | 100% |
| Public APIs | 90%+ |
| General code | 80%+ |
| Generated code | Exclude |


Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.

Strategic Compact Skill
When to Activate

When to Activate

Running long sessions that approach context limits (200K+ tokens)

Working on multi-phase tasks (research → plan → implement → test)

Switching between unrelated tasks within the same session

After completing a major milestone and starting new work

When responses slow down or become less coherent (context pressure)


Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.

Continuous Learning v2.1 - Instinct
Quick Start
2. Initialize Directory Structure

2. Initialize Directory Structure

The system creates directories automatically on first use, but you can also create them manually:


iOS 26 Liquid Glass design system — dynamic glass material with blur, reflection, and interactive morphing for SwiftUI, UIKit, and WidgetKit.

Liquid Glass Design System (iOS 26)
When to Use

When to Use

Navigation bars, toolbars, and tab bars with the new iOS 26 design

Floating action buttons and card-style containers

Interactive controls that need visual depth and touch feedback

Widgets that should integrate with the system's Liquid Glass appearance

Morphing transitions between related UI states


Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.

6. Ralphinho / RFC-Driven DAG Orchestration

Complexity Tiers

Different tiers get different pipeline depths:

| Tier | Pipeline Stages |
|------|----------------|
| **trivial** | implement → test |
| **small** | implement → test → code-review |
| **medium** | research → plan → implement → test → PRD-review + code-review → review-fix |
| **large** | research → plan → implement → test → PRD-review + code-review → review-fix → final-review |

This prevents expensive operations on simple changes while ensuring architectural changes get thorough scrutiny.


Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.

Carrier Relationship Management
Escalation Protocols
Automatic Escalation Triggers

Escalation Protocols

Automatic Escalation Triggers

| Trigger | Action | Timeline |
|---|---|---|
| Carrier tender acceptance drops below 70% for 2 consecutive weeks | Notify procurement, schedule carrier call | Within 48 hours |
| Spot spend exceeds 30% of lane budget for any lane | Review routing guide, initiate carrier sourcing | Within 1 week |
| Carrier FMCSA authority or insurance lapses | Immediately suspend tendering, notify operations | Within 1 hour |
| Single carrier controls >50% of a critical lane | Initiate secondary carrier qualification | Within 2 weeks |
| Claims ratio exceeds 1.5% for any carrier for 60+ days | Schedule formal performance review | Within 1 week |
| Rate variance >20% from DAT benchmark on 5+ lanes | Initiate contract renegotiation or mini-bid | Within 2 weeks |
| Carrier reports driver shortage or service disruption | Activate backup carriers, increase monitoring | Within 4 hours |
| Double-brokering confirmed on any load | Immediate carrier suspension, compliance review | Within 2 hours |


Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

expect/actual for Platform Composables

Performance

Stable Types for Skippable Recomposition

Mark classes as `@Stable` or `@Immutable` when all properties are stable:


Security patterns for autonomous trading agents with wallet or transaction authority. Covers prompt injection, spend limits, pre-send simulation, circuit breakers, MEV protection, and key handling.

Examples

Treat prompt injection as a financial attack

Do not blindly inject token names, pair labels, webhooks, or social feeds into an execution-capable prompt.


Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.

Santa Method

Multi-agent adversarial verification framework. Make a list, check it twice. If it's naughty, fix it until it's nice.

The core insight: a single agent reviewing its own output shares the same biases, knowledge gaps, and systematic errors that produced the output. Two independent reviewers with no shared context break this failure mode.


Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

On-page rules

Title tags

Title tags

aim for roughly 50-60 characters

put the primary keyword or concept near the front

make the title legible to humans, not stuffed for bots

Meta descriptions

Meta descriptions

aim for roughly 120-160 characters

describe the page honestly

include the main topic naturally

Heading structure

Heading structure

one clear `H1`

`H2` and `H3` should reflect actual content hierarchy

do not skip structure just for visual styling


Comprehensive Perl security covering taint mode, input validation, safe process execution, DBI parameterized queries, web security (XSS/SQLi/CSRF), and perlcritic security policies.

Perl Security Patterns
Web Security
CSRF Protection

Web Security

XSS Prevention

CSRF Protection

Use constant-time comparison when verifying tokens. Most web frameworks (Mojolicious, Dancer2, Catalyst) provide built-in CSRF protection — prefer those over hand-rolled solutions.


Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.

Python Development Patterns
Memory and Performance
Using __slots__ for Memory Efficiency

__init__.py for Package Exports

Memory and Performance

Using __slots__ for Memory Efficiency


为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡，
输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。
如当前环境提供已审核的生图 skill，可自动生成统一风格头像图片。
当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。
不适用于：微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。
触发词：龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、
龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、
lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。

龙虾灵魂锻造炉 对话语气指南 各步骤的语气参考（不要照抄，每次变化）

各步骤的语气参考（不要照抄，每次变化）

各步骤的语气参考（不要照抄，每次变化）

**Step 1-B 抽卡后**：

嗯……这个组合里有一种张力是我之前没见过的。[具体点评哪个维度和哪个维度碰撞出了什么]。要用这块原料开炉，还是让命运再掷一次骰子？

**Step 2 身份张力后**：

我在这只龙虾身上看到了一道裂缝——[指出内在矛盾的具体张力]。裂缝是好东西，光就是从裂缝里透进来的。这个胚子你觉得行不行？我可以再打磨，也可以直接进下一炉。

**Step 3 底线规则后**：

[挑出最有特色的那条规则点评]。这条规矩不是我硬塞的——是这只龙虾自己身上长出来的。还要加减调整，还是这就是它的骨架了？

**Step 4 名字后**：

三个名字，三种命运。我个人偏好 [说出偏好和理由]——但名字这种事，得你来定。叫什么名字，它就活成什么样。

**Step 5 头像后**：

[如有图片] 看看它的样子。[点评图片中最突出的视觉特征]。像不像你想象中的那只龙虾？不像的话告诉我哪里不对，我重新捏。
[如无图片] 提示词给你了。去找一面镜子（Gemini、ChatGPT、Midjourney 都行），让它照见自己的样子。

**Step 6 方案完成后**：

好了。从虚无中走出来一只新的龙虾——[名字]。它的灵魂、规矩、名字、长相都有了。要我把它的灵魂刻进 SOUL.md，把它的身份证写成 IDENTITY.md 吗？告诉我放哪个目录，我来落笔。


Prevent Ethereum hashing bugs in JavaScript and TypeScript. Node's sha3-256 is NIST SHA3, not Ethereum Keccak-256, and silently breaks selectors, signatures, storage slots, and address derivation.

How It Works

The two algorithms produce different outputs for the same input, and Node will not warn you.


C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.

C++ Coding Standards (C++ Core Guidelines)

Enumerations (Enum.*)

Key Rules

| Rule | Summary |
|------|---------|
| **Enum.1** | Prefer enumerations over macros |
| **Enum.3** | Prefer `enum class` over plain `enum` |
| **Enum.5** | Don't use ALL_CAPS for enumerators |
| **Enum.6** | Avoid unnamed enumerations |


Trace every user-facing button/touchpoint through its full state change sequence to find bugs where functions individually work but cancel each other out, produce wrong final state, or leave the UI in an inconsistent state. Use when: systematic debugging found no bugs but users report broken buttons, or after any major refactor touching shared state stores.

/click-path-audit — Behavioural Flow Audit

Step 3: Report

For each bug found:

Scope Control

This audit is expensive. Scope it appropriately:

**Full app audit:** Use when launching or after major refactor. Launch parallel agents per page.

**Single page audit:** Use after building a new page or after a user reports a broken button.

**Store-focused audit:** Use after modifying a Zustand store — audit all consumers of the changed actions.


Related

[The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) — Token optimization section

Memory persistence hooks — For state that survives compaction

`continuous-learning` skill — Extracts patterns before session ends


Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.

MCP Server Patterns

The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.

For the broader routing decision of when a capability should be a rule, a skill, MCP, or a plain CLI/API workflow, see [docs/capability-surface-selection.md](../../docs/capability-surface-selection.md).


Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite this prompt", or explicitly asks to enhance prompt quality. Also triggers on Chinese equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令". DO NOT TRIGGER when: user wants the task executed directly, or says "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码", "优化性能", "optimize performance", "optimize this code" — those are refactoring/performance tasks, not prompt optimization.

When to Use

User says "optimize this prompt", "improve my prompt", "rewrite this prompt"

User says "help me write a better prompt for..."

User says "what's the best way to ask Claude Code to..."

User says "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令"

User pastes a draft prompt and asks for feedback or enhancement

User says "I don't know how to prompt for this"

User says "how should I use ECC for..."

User explicitly invokes `/prompt-optimize`


JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

Kotlin Exposed Patterns

Comprehensive patterns for database access with JetBrains Exposed ORM, including DSL queries, DAO, transactions, and production-ready configuration.


Carrier Relationship Management
Decision Frameworks
Carrier Selection for New Lanes

Decision Frameworks

Carrier Selection for New Lanes

When adding a new lane to your network, evaluate candidates on this decision tree:

**Do existing portfolio carriers cover this lane?** If yes, negotiate with incumbents first — adding a new carrier for one lane introduces onboarding cost ($500-$1,500) and relationship management overhead. Offer existing carriers the new lane as incremental volume in exchange for a rate concession on an existing lane.

**If no incumbent covers the lane:** Source 3-5 candidates. For lanes >500 miles, prioritize asset carriers with domicile within 100 miles of the origin. For lanes <300 miles, consider regional carriers and dedicated fleets. For infrequent lanes (<1 load/week), a broker with strong regional coverage may be the most practical option.

**Evaluate:** Run FMCSA compliance check. Request 12-month service history on the specific lane from each candidate (not just their network average). Check DAT lane rates for market benchmark. Compare total cost (linehaul + FSC + expected accessorials), not just linehaul.

**Trial period:** Award 30-day trial at contracted rates. Set clear KPIs: OTD ≥93%, tender acceptance ≥85%, invoice accuracy ≥95%. Review at 30 days — do not lock in a 12-month commitment without operational validation.


Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.

DeFi AMM Security
Examples
Reentrancy: enforce CEI order

Examples

Reentrancy: enforce CEI order

Vulnerable:

Safe:

Do not write your own guard when a hardened library exists.


Autonomous Loops Skill
3. Infinite Agentic Loop

3. Infinite Agentic Loop

**A two-prompt system** that orchestrates parallel sub-agents for specification-driven generation. Developed by disler (credit: @disler).


Codified expertise for handling freight exceptions, shipment delays, damages, losses, and carrier disputes. Informed by logistics professionals with 15+ years operational experience. Includes escalation protocols, carrier-specific behaviors, claims procedures, and judgment frameworks. Use when handling shipping exceptions, freight claims, delivery issues, or carrier disputes.

Logistics Exception Management
Additional Resources

Additional Resources

Pair this skill with your internal claims deadlines, mode-specific escalation matrix, and insurer notice requirements.

Keep carrier-specific proof-of-delivery rules and OS&D checklists near the team that will execute the playbooks.


ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

ClickHouse Analytics Patterns
When to Activate

When to Activate

Designing ClickHouse table schemas (MergeTree engine selection)

Writing analytical queries (aggregations, window functions, joins)

Optimizing query performance (partition pruning, projections, materialized views)

Ingesting large volumes of data (batch inserts, Kafka integration)

Migrating from PostgreSQL/MySQL to ClickHouse for analytics

Implementing real-time dashboards or time-series analytics


ClickHouse Analytics Patterns
Best Practices
3. Data Types

3. Data Types

Use smallest appropriate type (UInt32 vs UInt64)

Use LowCardinality for repeated strings

Use Enum for categorical data


Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

Test-Driven Development Workflow
Best Practices

Watch Mode During Development

Pre-Commit Hook

CI/CD Integration

Best Practices

**Write Tests First** - Always TDD

**One Assert Per Test** - Focus on single behavior

**Descriptive Test Names** - Explain what's tested

**Arrange-Act-Assert** - Clear test structure

**Mock External Dependencies** - Isolate unit tests

**Test Edge Cases** - Null, undefined, empty, large

**Test Error Paths** - Not just happy paths

**Keep Tests Fast** - Unit tests < 50ms each

**Clean Up After Tests** - No side effects

**Review Coverage Reports** - Identify gaps


Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

What to Extract

rhythm and sentence length

compression vs explanation

capitalization norms

parenthetical use

question frequency and purpose

how sharply claims are made

how often numbers, mechanisms, or receipts show up

how transitions work

what the author never does


Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

Parallel Review Passes

If parallel subagents are available, split the review into these passes:

Agents

classify `agents/*`

Skills

classify `skills/*`

Commands

classify `commands/*`

Rules

classify `rules/*`

Hooks and scripts

classify hook surfaces, MCP health checks, helper scripts, and OS compatibility

Extras

classify contexts, examples, MCP configs, templates, and guidance docs

If subagents are not available, run the same passes sequentially.


Test-Driven Development Workflow
TDD Workflow Steps
Step 2: Generate Test Cases

TDD Workflow Steps

Step 1: Write User Journeys

Step 2: Generate Test Cases

For each user journey, create comprehensive test cases:


Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing.

Agentic Engineering

Use this skill for engineering workflows where AI agents perform most implementation work and humans enforce quality and risk controls.


Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.

UI Demo Video Recorder
Phase 2: Rehearse

Phase 2: Rehearse

Run through all steps without recording. Verify every selector resolves.


Codified expertise for demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation at multi-location retailers. Informed by demand planners with 15+ years experience managing hundreds of SKUs. Includes forecasting method selection, ABC/XYZ analysis, seasonal transition management, and vendor negotiation frameworks. Use when forecasting demand, setting safety stock, planning replenishment, managing promotions, or optimizing inventory levels.

Inventory Demand Planning
Core Knowledge
Seasonal Transition Management

Seasonal Transition Management

**Buy Timing:** Seasonal buys (e.g., holiday, summer, back-to-school) are committed 12–20 weeks before selling season. Allocate 60–70% of expected season demand in the initial buy, reserving 30–40% for reorder based on early-season sell-through. This "open-to-buy" reserve is your hedge against forecast error.

**Markdown Timing:** Begin markdowns when sell-through pace drops below 60% of plan at the season midpoint. Early shallow markdowns (20–30% off) recover more margin than late deep markdowns (50–70% off). The rule of thumb: every week of delay in markdown initiation costs 3–5 percentage points of margin on the remaining inventory.

**Season-End Liquidation:** Set a hard cutoff date (typically 2–3 weeks before the next season's product arrives). Everything remaining at cutoff goes to outlet, liquidator, or donation. Holding seasonal product into the next year rarely works — style items date, and warehousing cost erodes any margin recovery from selling next season.


AI-native lead intelligence and outreach pipeline. Replaces Apollo, Clay, and ZoomInfo with agent-powered signal scoring, mutual ranking, warm path discovery, source-derived voice modeling, and channel-specific outreach across email, LinkedIn, and X. Use when the user wants to find, qualify, and reach high-value contacts.

Lead Intelligence
Tool Requirements
Required

Tool Requirements

Required

**Exa MCP** — Deep web search for people, companies, and signals (`web_search_exa`)

**X API** — Follower/following graph, mutual analysis, recent activity (`X_BEARER_TOKEN`, plus write-context credentials such as `X_CONSUMER_KEY`, `X_CONSUMER_SECRET`, `X_ACCESS_TOKEN`, `X_ACCESS_TOKEN_SECRET`)


Persistent per-project memory for Claude Code. Auto-loads project context on session start, tracks sessions with git activity, and writes to native memory. Commands run deterministic Node.js scripts — behavior is consistent across model versions.

ck — Context Keeper
Commands
`/ck:migrate` — Convert v1 Data to v2

`/ck:migrate` — Convert v1 Data to v2

For a dry run first:

Display output verbatim. Migrates all v1 CONTEXT.md + meta.json files to v2 context.json.
Originals are backed up as `meta.json.v1-backup` — nothing is deleted.


Comprehensive Perl security covering taint mode, input validation, safe process execution, DBI parameterized queries, web security (XSS/SQLi/CSRF), and perlcritic security policies.

Perl Security Patterns

Comprehensive security guidelines for Perl applications covering input validation, injection prevention, and secure coding practices.


Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.

Agent Payment Execution (x402)
How It Works
Non-Custodial Wallets

Non-Custodial Wallets

Agents hold their own keys via ERC-4337 smart accounts. The orchestrator sets policy before delegation; the agent can only spend within bounds. No pooled funds, no custodial risk.


Offers the user an informed choice about how much response depth to consume before answering. Use this skill when the user explicitly wants to control response length, depth, or token budget. TRIGGER when: "token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed answer", "exhaustive answer", "respuesta corta vs larga", "cuántos tokens", "ahorrar tokens", "responde al 50%", "dame la versión corta", "quiero controlar cuánto usas", or clear variants where the user is explicitly asking to control answer size or depth. DO NOT TRIGGER when: user has already specified a level in the current session (maintain it), the request is clearly a one-word answer, or "token" refers to auth/session/payment tokens rather than response size.

Source

Standalone skill from [TBA — Token Budget Advisor for Claude Code](https://github.com/Xabilimon1/Token-Budget-Advisor-Claude-Code-).
Original project also ships a Python estimator script, but this repository keeps the skill self-contained and heuristic-only.


Swift 6.2 Approachable Concurrency — single-threaded by default, @concurrent for explicit background offloading, isolated conformances for main actor types.

Swift 6.2 Approachable Concurrency
When to Use

When to Use

All new Swift 6.2+ projects (Approachable Concurrency is the recommended default)

Migrating existing apps from Swift 5.x or 6.0/6.1 concurrency

Resolving data-race safety compiler errors during Xcode 26 adoption

Building MainActor-centric app architectures (most UI apps)

Performance optimization — offloading specific heavy computations to background


Evidence-first live messaging workflow for ECC. Use when the user wants to read texts or DMs, recover a recent one-time code, inspect a thread before replying, or prove which message source was actually checked.

Output Format

Pitfalls

do not blur mailbox work and DM/text work

do not claim retrieval without naming the source

do not burn time on broad searches when the ask is a recent-code lookup

do not keep retrying a blocked auth path without surfacing the blocker


Transform Claude Code into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing. Replaces standalone agent frameworks (Hermes, AutoGPT) by leveraging Claude Code's native crons, dispatch, MCP tools, and memory. Use when the user wants continuous autonomous operation, scheduled tasks, or a self-directing agent loop.

Autonomous Agent Harness
When to Activate

When to Activate

User wants an agent that runs continuously or on a schedule

Setting up automated workflows that trigger periodically

Building a personal AI assistant that remembers context across sessions

User says "run this every day", "check on this regularly", "keep monitoring"

Wants to replicate functionality from Hermes, AutoGPT, or similar autonomous agent frameworks

Needs computer use combined with scheduled execution


Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns.

Android Clean Architecture
Data Layer
Repository Implementation

Repository Interfaces

Defined in domain, implemented in data:

Data Layer

Repository Implementation

Coordinates between local and remote data sources:


Create CodeTour `.tour` files — persona-targeted, step-by-step walkthroughs with real file and line anchors. Use for onboarding tours, architecture walkthroughs, PR tours, RCA tours, and structured "explain how this works" requests.

Example

Anti-Patterns

| Anti-pattern | Fix |
| --- | --- |
| Flat file listing | Tell a story with dependency between steps |
| Generic descriptions | Name the concrete code path or pattern |
| Guessed anchors | Verify every file and line first |
| Too many steps for a quick tour | Cut aggressively |
| First step is content-only | Anchor the first step to a real file or directory |
| Persona mismatch | Write for the actual reader, not a generic engineer |


Use this skill to generate or audit design systems, check visual consistency, and review PRs that touch styling.

Design System — Generate & Audit Visual Systems

Mode 3: AI Slop Detection

Identifies generic AI-generated design patterns:

Examples

**Generate for a SaaS app:**

**Audit existing UI:**

**Check for AI slop:**


Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

Step 5: Optimize Installed Files (Optional)

Use `AskUserQuestion`:

If optimizing skills:

Read each installed SKILL.md

Ask the user what their project's tech stack is (if not already known)

For each skill, suggest removals of irrelevant sections

Edit the SKILL.md files in-place at the installation target (NOT the source repo)

Fix any path issues found in Step 4


Configure Everything Claude Code (ECC)
Step 0: Clone ECC Repository

Step 0: Clone ECC Repository

Before any installation, clone the latest ECC source to `/tmp`:

Set `ECC_ROOT=/tmp/everything-claude-code` as the source for all subsequent copy operations.

If the clone fails (network issues, etc.), use `AskUserQuestion` to ask the user to provide a local path to an existing ECC clone.


Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance, accessibility, security, and clean architecture.

Flutter/Dart Code Review Best Practices
13. Internationalization (l10n)
Code review:

Code review:

[ ] Localization accessor used consistently throughout the project

[ ] Date, time, number, and currency formatting is locale-aware

[ ] Text directionality (RTL) supported if targeting Arabic, Hebrew, etc.

[ ] No string concatenation for localized text — use parameterized messages


Prevent silent decimal mismatch bugs across EVM chains. Covers runtime decimal lookup, chain-aware caching, bridged-token precision drift, and safe normalization for bots, dashboards, and DeFi tools.

EVM Token Decimals
Examples
Handle odd tokens defensively

Cache by chain and token

Handle odd tokens defensively

Log the fallback and keep it visible. Old or non-standard tokens still exist.


Codified expertise for production scheduling, job sequencing, line balancing, changeover optimization, and bottleneck resolution in discrete and batch manufacturing. Informed by production schedulers with 15+ years experience. Includes TOC/drum-buffer-rope, SMED, OEE analysis, disruption response frameworks, and ERP/MES interaction patterns. Use when scheduling production, resolving bottlenecks, optimizing changeovers, responding to disruptions, or balancing manufacturing lines.

Production Scheduling
Performance Indicators

Performance Indicators

Track per shift and trend weekly:

| Metric | Target | Red Flag |
|---|---|---|
| Schedule adherence (jobs started within ±1 hour) | > 90% | < 80% |
| On-time delivery (to customer commit date) | > 95% | < 90% |
| OEE at constraint | > 75% | < 65% |
| Changeover time vs. standard | < 110% of standard | > 130% |
| WIP days (total WIP value / daily COGS) | < 5 days | > 8 days |
| Constraint utilization (actual producing / available) | > 85% | < 75% |
| First-pass yield at constraint | > 97% | < 93% |
| Unplanned downtime (% of scheduled time) | < 5% | > 10% |
| Labor utilization (direct hours / available hours) | 80–90% | < 70% or > 95% |


Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

Python Testing Patterns
Best Practices
DON'T

DON'T

**Don't test implementation**: Test behavior, not internals

**Don't use complex conditionals in tests**: Keep tests simple

**Don't ignore test failures**: All tests must pass

**Don't test third-party code**: Trust libraries to work

**Don't share state between tests**: Tests should be independent

**Don't catch exceptions in tests**: Use `pytest.raises`

**Don't use print statements**: Use assertions and pytest output

**Don't write tests that are too brittle**: Avoid over-specific mocks


Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.

Laravel Development Patterns
Examples
Project Structure

Examples

Project Structure

Use a conventional Laravel layout with clear layer boundaries (HTTP, services/actions, models).


Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

When To Use

building a landing page, dashboard, or app surface from scratch

upgrading a bland interface into something intentional and memorable

translating a product concept into a concrete visual direction

implementing a frontend where typography, composition, and motion matter


Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.

Hexagonal Architecture
Anti-Patterns to Avoid

Anti-Patterns to Avoid

Domain entities importing ORM models, web framework types, or SDK clients.

Use cases reading directly from `req`, `res`, or queue metadata.

Returning database rows directly from use cases without domain/application mapping.

Letting adapters call each other directly instead of flowing through use-case ports.

Spreading dependency wiring across many files with hidden global singletons.


Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.

Plankton Code Quality Skill
Setup
Per-Project Integration

Per-Project Integration

To use Plankton hooks in your own project:

Copy `.claude/hooks/` directory to your project

Copy `.claude/settings.json` hook configuration

Copy linter config files (`.ruff.toml`, `biome.json`, etc.)

Install the linters for your languages


Formal evaluation framework for Claude Code sessions implementing eval-driven development (EDD) principles

Eval Harness Skill
Integration Patterns
Pre-Implementation

3. Evaluate

4. Report

Integration Patterns

Pre-Implementation

Creates eval definition file at `.claude/evals/feature-name.md`


Evidence-first current-state research workflow for ECC. Use when the user wants fresh facts, comparisons, enrichment, or a recommendation built from current public evidence and any supplied local context.

Guardrails

do not answer current questions from stale memory when fresh search is cheap

separate:

sourced fact

user-provided evidence

inference

recommendation

do not spin up a heavyweight research pass if the answer is already in local code or docs


Plankton Code Quality Skill
Configuration Reference

Configuration Reference

Plankton's `.claude/hooks/config.json` controls all behavior:

**Key settings:**

Disable languages you don't use to speed up hooks

`volume_threshold` — violations > this count auto-escalate to a higher model tier

`subprocess_delegation: false` — skip Phase 3 entirely (just report violations)


Open-source pipeline: fork, sanitize, and package private projects for safe public release. Chains 3 agents (forker, sanitizer, packager). Triggers: '/opensource', 'open source this', 'make this public', 'prepare for open source'.

Open-Source Pipeline Skill
Protocol
/opensource verify PROJECT

/opensource verify PROJECT

Run sanitizer independently. Resolve path: if PROJECT contains `/`, treat as a path. Otherwise check `$HOME/opensource-staging/PROJECT`, then `$HOME/PROJECT`, then current directory.


Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.

Rust Development Patterns
Traits and Generics
Trait Objects for Dynamic Dispatch

Traits and Generics

Accept Generics, Return Concrete Types

Trait Objects for Dynamic Dispatch


Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

Quality Gate

Before delivering:

each version reads like the same author under different constraints

no platform version feels padded or sanitized

no copy is duplicated verbatim across platforms

any extra context added for LinkedIn or newsletter use is actually necessary


Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.

Python Development Patterns
Concurrency Patterns
Multiprocessing for CPU-Bound Tasks

Class-Based Decorators

Concurrency Patterns

Threading for I/O-Bound Tasks

Multiprocessing for CPU-Bound Tasks


Hexagonal Architecture
TypeScript Example
Composition root

TypeScript Example

Port definitions

Use case

Outbound adapter

Composition root


Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.

Report Structure

Quality Gate

Before submitting:

The code path is reachable from a real user or network boundary

The input is genuinely user-controlled

The sink is meaningful and exploitable

The PoC works

The issue is not already covered by an advisory, CVE, or open ticket

The target is actually in scope for the bounty program


Eval Harness Skill
Grader Types
2. Model-Based Grader

1. Code-Based Grader

Deterministic checks using code:

2. Model-Based Grader

Use Claude to evaluate open-ended outputs:


Evidence-first ECC Tools burn and billing audit workflow. Use when investigating runaway PR creation, quota bypass, premium-model leakage, duplicate jobs, or GitHub App cost spikes in the ECC Tools repo.

ECC Tools Cost Audit
High-Signal Failure Patterns
1. One queue type for all triggers

High-Signal Failure Patterns

1. One queue type for all triggers

If pushes, PR syncs, and manual audits all enqueue the same job and the worker always creates a PR, analysis equals PR spam.


Evidence-first revenue, pricing, refunds, team-billing, and billing-model truth workflow for ECC. Use when the user wants a sales snapshot, pricing comparison, duplicate-charge diagnosis, or code-backed billing reality instead of generic payments advice.

Verification

the answer includes a live-data statement or snapshot timestamp

product-truth claims are code-backed

customer-impact and broader pricing/product conclusions are separated cleanly


Operate across Google Drive, Docs, Sheets, and Slides as one workflow surface for plans, trackers, decks, and shared documents. Use when the user needs to find, summarize, edit, migrate, or clean up Google Workspace assets without dropping to raw tool calls.

When to Use

User needs to find a doc, sheet, or deck and update it in place

Consolidating plans, trackers, notes, or customer lists stored in Google Drive

Cleaning or restructuring a shared spreadsheet

Importing, repairing, or reformatting a Google Slides deck

Producing summaries from Docs, Sheets, or Slides for decision-making


Security patterns for autonomous trading agents with wallet or transaction authority. Covers prompt injection, spend limits, pre-send simulation, circuit breakers, MEV protection, and key handling.

LLM Trading Agent Security
Pre-Deploy Checklist

MEV and deadline protection

Pre-Deploy Checklist

External data is sanitized before entering the LLM context

Spend limits are enforced independently from model output

Transactions are simulated before send

`min_amount_out` is mandatory

Circuit breakers halt on drawdown or invalid state

Keys come from env or a secret manager, never code or logs

Private mempool or protected routing is used when appropriate

Slippage and deadlines are set per strategy

All agent decisions are audit-logged, not just successful sends


Operate and extend NanoClaw v2, ECC's zero-dependency session-aware REPL built on claude -p.

NanoClaw REPL

Use this skill when running or extending `scripts/claw.js`.

Capabilities

persistent markdown-backed sessions

model switching with `/model`

dynamic skill loading with `/load`

session branching with `/branch`

cross-session search with `/search`

history compaction with `/compact`

export to md/json/txt with `/export`

session metrics with `/metrics`


Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

Examples

Commands

Usage

Run `next dev` for local development with Turbopack. Use the Bundle Analyzer (see Next.js docs) to optimize code-splitting and trim large dependencies. Prefer App Router and server components where possible.


Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.

Kotlin Development Patterns
Core Principles
4. Data Classes for Value Objects

4. Data Classes for Value Objects

Use data classes for types that primarily hold data.


C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.

C++ Coding Standards (C++ Core Guidelines)

Source Files & Naming (SF.*, NL.*)

Key Rules

| Rule | Summary |
|------|---------|
| **SF.1** | Use `.cpp` for code files and `.h` for interface files |
| **SF.7** | Don't write `using namespace` at global scope in a header |
| **SF.8** | Use `#include` guards for all `.h` files |
| **SF.11** | Header files should be self-contained |
| **NL.5** | Avoid encoding type information in names (no Hungarian notation) |
| **NL.8** | Use a consistent naming style |
| **NL.9** | Use ALL_CAPS for macro names only |
| **NL.10** | Prefer `underscore_style` names |


Protected Health Information (PHI) and Personally Identifiable Information (PII) compliance patterns for healthcare applications. Covers data classification, access control, audit trails, encryption, and common leak vectors.

Healthcare PHI/PII Compliance Patterns

Patterns for protecting patient data, clinician data, and financial data in healthcare applications. Applicable to HIPAA (US), DISHA (India), GDPR (EU), and general healthcare data protection.


Persistent per-project memory for Claude Code. Auto-loads project context on session start, tracks sessions with git activity, and writes to native memory. Commands run deterministic Node.js scripts — behavior is consistent across model versions.

ck — Context Keeper
Commands
`/ck:init` — Register a Project

Data Layout

Commands

`/ck:init` — Register a Project

The script outputs JSON with auto-detected info. Present it as a confirmation draft:

Wait for user approval. Apply any edits. Then pipe confirmed JSON to save.mjs --init:

Confirmed JSON schema: `{"name":"...","path":"...","description":"...","stack":["..."],"goal":"...","constraints":["..."],"repo":"..." }`


Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

Database Migration Patterns
When to Activate

When to Activate

Creating or altering database tables

Adding/removing columns or indexes

Running data migrations (backfill, transform)

Planning zero-downtime schema changes

Setting up migration tooling for a new project


Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.

Agent Payment Execution (x402)
Production Reference

Production Reference

**npm**: [`agentwallet-sdk`](https://www.npmjs.com/package/agentwallet-sdk)

**Merged into NVIDIA NeMo Agent Toolkit**: [PR #17](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17) — x402 payment tool for NVIDIA's agent examples

**Protocol spec**: [x402.org](https://x402.org)


Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite this prompt", or explicitly asks to enhance prompt quality. Also triggers on Chinese equivalents: "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令". DO NOT TRIGGER when: user wants the task executed directly, or says "just do it" / "直接做". DO NOT TRIGGER when user says "优化代码", "优化性能", "optimize performance", "optimize this code" — those are refactoring/performance tasks, not prompt optimization.

Prompt Optimizer
Output Format
Section 2: Recommended ECC Components

Section 2: Recommended ECC Components

| Type | Component | Purpose |
|------|-----------|---------|
| Command | /plan | Plan architecture before coding |
| Skill | tdd-workflow | TDD methodology guidance |
| Agent | code-reviewer | Post-implementation review |
| Model | Sonnet 4.6 | Recommended for this scope |


Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing.

Application Structure

Standard Ktor Project Layout

Application Entry Point

Routing DSL


iOS 26 Liquid Glass design system — dynamic glass material with blur, reflection, and interactive morphing for SwiftUI, UIKit, and WidgetKit.

Liquid Glass Design System (iOS 26)
Core Pattern — SwiftUI
Morphing Transitions

Morphing Transitions

Create smooth morphing when glass elements appear/disappear:


Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures.

Healthcare Eval Harness — Patient Safety Verification

CI/CD Integration

Anti-Patterns

Skipping CDSS tests "because they passed last time"

Setting CRITICAL thresholds below 100%

Using `--no-bail` on CRITICAL test suites

Mocking the CDSS engine in integration tests (must test real logic)

Allowing deployments when safety gate is red

Running tests without `--coverage` on CDSS suites