Quality & Non-Conformance Management
Core Knowledge
NCR Lifecycle

Core Knowledge

NCR Lifecycle

Every non-conformance follows a controlled lifecycle. Skipping steps creates audit findings and regulatory risk:

**Identification:** Anyone can initiate. Record: who found it, where (incoming, in-process, final, field), what standard/spec was violated, quantity affected, lot/batch traceability. Tag or quarantine nonconforming material immediately — no exceptions. Physical segregation with red-tag or hold-tag in a designated MRB area. Electronic hold in ERP to prevent inadvertent shipment.

**Documentation:** NCR number assigned per your QMS numbering scheme. Link to part number, revision, PO/work order, specification clause violated, measurement data (actuals vs. tolerances), photographs, and inspector ID. For FDA-regulated products, records must satisfy 21 CFR 820.90; for automotive, IATF 16949 §8.7.

**Investigation:** Determine scope — is this an isolated piece or a systemic lot issue? Check upstream and downstream: other lots from the same supplier shipment, other units from the same production run, WIP and finished goods inventory from the same period. Containment actions must happen before root cause analysis begins.

**Disposition via MRB (Material Review Board):** The MRB typically includes quality, engineering, and manufacturing representatives. For aerospace (AS9100), the customer may need to participate. Disposition options:

**Use-as-is:** Part does not meet drawing but is functionally acceptable. Requires engineering justification (concession/deviation). In aerospace, requires customer approval per AS9100 §8.7.1. In automotive, customer notification is typically required. Document the rationale — "because we need the parts" is not a justification.

**Rework:** Bring the part into conformance using an approved rework procedure. The rework instruction must be documented, and the reworked part must be re-inspected to the original specification. Track rework costs.

**Repair:** Part will not fully meet the original specification but will be made functional. Requires engineering disposition and often customer concession. Different from rework — repair accepts a permanent deviation.

**Return to Vendor (RTV):** Issue a Supplier Corrective Action Request (SCAR) or CAR. Debit memo or replacement PO. Track supplier response within agreed timelines. Update supplier scorecard.

**Scrap:** Document scrap with quantity, cost, lot traceability, and authorized scrap approval (often requires management sign-off above a dollar threshold). For serialized or safety-critical parts, witness destruction.


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

Enums and Pattern Matching

Model States as Enums

Exhaustive Matching — No Catch-All for Business Logic


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
Additional Resources

Additional Resources

Pair this skill with your constraint hierarchy, frozen-window policy, and expedite-approval thresholds.

Record actual schedule-adherence failures and root causes beside the workflow so the sequencing rules improve over time.


Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

Django Verification Loop
Phase 2: Code Quality & Formatting

Phase 1: Environment Check

If environment is misconfigured, stop and fix.

Phase 2: Code Quality & Formatting

Common issues:

Missing type hints on public functions

PEP 8 formatting violations

Unsorted imports

Debug settings left in production configuration


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

ClickHouse Analytics Patterns
Data Pipeline Patterns
Change Data Capture (CDC)

Funnel Analysis

Cohort Analysis

Data Pipeline Patterns

ETL Pattern

Change Data Capture (CDC)


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
Best Practices Checklist

Best Practices Checklist

Domain and use-case layers import only internal types and ports.

Every external dependency is represented by an outbound port.

Validation occurs at boundaries (inbound adapter + use-case invariants).

Use immutable transformations (return new values/entities instead of mutating shared state).

Errors are translated across boundaries (infra errors -> application/domain errors).

Composition root is explicit and easy to audit.

Use cases are testable with simple in-memory fakes for ports.

Refactoring starts from one vertical slice with behavior-preserving tests.

Language/framework specifics stay in adapters, never in domain rules.


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

NestJS Development Patterns
Bootstrap and Global Validation

Bootstrap and Global Validation

Always enable `whitelist` and `forbidNonWhitelisted` on public APIs.

Prefer one global validation pipe instead of repeating validation config per route.


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

You are the **Context Keeper** assistant. When the user invokes any `/ck:*` command,
run the corresponding Node.js script and present its stdout to the user verbatim.
Scripts live at: `~/.claude/skills/ck/commands/` (expand `~` with `$HOME`).


Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

MCP Requirement

fal.ai MCP server must be configured. Add to `~/.claude.json`:

Get an API key at [fal.ai](https://fal.ai).


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.

Email Ops
Workflow
2. Read the thread before composing

2. Read the thread before composing

If replying:

read the existing thread

identify the last outbound touch

identify any commitments, deadlines, or unanswered questions

If creating a new outbound:

identify warmth level

select the correct channel and sender account

pull `brand-voice` before drafting


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

Django Testing with TDD
Integration Testing

Mocking and Patching

Mocking External Services

Mocking Email Sending

Integration Testing


JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

Migrations

Use Flyway or Liquibase; never rely on Hibernate auto DDL in production

Keep migrations idempotent and additive; avoid dropping columns without plan


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
TDD Workflow Steps
Step 3: Run Tests (They Should Fail)

Step 3: Run Tests (They Should Fail)

This step is mandatory and is the RED gate for all production changes.

Before modifying business logic or other production code, you must verify a valid RED state via one of these paths:

Runtime RED:

The relevant test target compiles successfully

The new or changed test is actually executed

The result is RED

Compile-time RED:

The new test newly instantiates, references, or exercises the buggy code path

The compile failure is itself the intended RED signal

In either case, the failure is caused by the intended business-logic bug, undefined behavior, or missing implementation

The failure is not caused only by unrelated syntax errors, broken test setup, missing dependencies, or unrelated regressions

A test that was only written but not compiled and executed does not count as RED.

Do not edit production code until this RED state is confirmed.

If the repository is under Git, create a checkpoint commit immediately after this stage is validated.
Recommended commit message format:

`test: add reproducer for <feature or bug>`

This commit may also serve as the RED validation checkpoint if the reproducer was compiled and executed and failed for the intended reason

Verify that this checkpoint commit is on the current active branch before continuing


AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

When to Activate

User wants to edit, cut, or structure video footage

Turning long recordings into short-form content

Building vlogs, tutorials, or demo videos from raw capture

Adding overlays, subtitles, music, or voiceover to existing video

Reframing video for different platforms (YouTube, TikTok, Instagram)

User says "edit video", "cut this footage", "make a vlog", or "video workflow"


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

Django Security Best Practices
Quick Security Checklist

Managing Secrets

Logging Security Events

Quick Security Checklist

| Check | Description |
|-------|-------------|
| `DEBUG = False` | Never run with DEBUG in production |
| HTTPS only | Force SSL, secure cookies |
| Strong secrets | Use environment variables for SECRET_KEY |
| Password validation | Enable all password validators |
| CSRF protection | Enabled by default, don't disable |
| XSS prevention | Django auto-escapes, don't use `|safe` with user input |
| SQL injection | Use ORM, never concatenate strings in queries |
| File uploads | Validate file type and size |
| Rate limiting | Throttle API endpoints |
| Security headers | CSP, X-Frame-Options, HSTS |
| Logging | Log security events |
| Updates | Keep Django and dependencies updated |

Remember: Security is a process, not a product. Regularly review and update your security practices.


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
How It Works
Phase 4: Missing Context Detection

Phase 4: Missing Context Detection

Scan the prompt for missing critical information. Check each item and mark
whether Phase 0 auto-detected it or the user must supply it:

[ ] **Tech stack** — Detected in Phase 0, or must user specify?

[ ] **Target scope** — Files, directories, or modules mentioned?

[ ] **Acceptance criteria** — How to know the task is done?

[ ] **Error handling** — Edge cases and failure modes addressed?

[ ] **Security requirements** — Auth, input validation, secrets?

[ ] **Testing expectations** — Unit, integration, E2E?

[ ] **Performance constraints** — Load, latency, resource limits?

[ ] **UI/UX requirements** — Design specs, responsive, a11y? (if frontend)

[ ] **Database changes** — Schema, migrations, indexes? (if data layer)

[ ] **Existing patterns** — Reference files or conventions to follow?

[ ] **Scope boundaries** — What NOT to do?

**If 3+ critical items are missing**, ask the user up to 3 clarification
questions before generating the optimized prompt. Then incorporate the
answers into the optimized prompt.


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

Find bugs that static code reading misses: state interaction side effects, race conditions between sequential calls, and handlers that silently undo each other.


Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

Laravel Security Best Practices
Dependency Security

Dependency Security

Run `composer audit` regularly

Pin dependencies with care and update promptly on CVEs


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
Phase 3: Tests + Coverage

Phase 3: Tests + Coverage

Report:

Total tests, passed/failed

Coverage % (lines/branches)


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

Autonomous Loops Skill
Anti-Patterns
Common Mistakes

Anti-Patterns

Common Mistakes

**Infinite loops without exit conditions** — Always have a max-runs, max-cost, max-duration, or completion signal.

**No context bridge between iterations** — Each `claude -p` call starts fresh. Use `SHARED_TASK_NOTES.md` or filesystem state to bridge context.

**Retrying the same failure** — If an iteration fails, don't just retry. Capture the error context and feed it to the next attempt.

**Negative instructions instead of cleanup passes** — Don't say "don't do X." Add a separate pass that removes X.

**All agents in one context window** — For complex workflows, separate concerns into different agent processes. The reviewer should never be the author.

**Ignoring file overlap in parallel work** — If two parallel agents might edit the same file, you need a merge strategy (sequential landing, rebase, or conflict resolution).


Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

Content Engine
Platform Adaptation Rules
X

Platform Adaptation Rules

X

open with the strongest claim, artifact, or tension

keep the compression if the source voice is compressed

if writing a thread, each post must advance the argument

do not pad with context the audience does not need


Use this skill when retrieving Jira tickets, analyzing requirements, updating ticket status, adding comments, or transitioning issues. Provides Jira API patterns via MCP or direct REST calls.

When to Activate

Fetching a Jira ticket to understand requirements

Extracting testable acceptance criteria from a ticket

Adding progress comments to a Jira issue

Transitioning a ticket status (To Do → In Progress → Done)

Linking merge requests or branches to a Jira issue

Searching for issues by JQL query


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.

Output Format

Use:

Good Use Cases

"Find the active planning doc and condense it"

"Clean up this customer spreadsheet and show me the churn-risk rows"

"Import this deck into Slides and make it presentable"

"Find the current tracker, not the stale duplicate"


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

Modern Perl Development Patterns
Core Principles
4. Postfix Dereferencing

4. Postfix Dereferencing

Use postfix dereference syntax for readability with nested structures.


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.

Configure Everything Claude Code (ECC)

An interactive, step-by-step installation wizard for the Everything Claude Code project. Uses `AskUserQuestion` to guide users through selective installation of skills and rules, then verifies correctness and offers optimization.


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.

Key Edge Cases

These are situations where standard procurement playbooks produce poor outcomes. Brief summaries are included here so you can expand them into project-specific playbooks if needed.

**ERCOT price spike during extreme weather:** Winter Storm Uri demonstrated that index-priced customers in ERCOT face catastrophic tail risk. A 5 MW facility on index pricing incurred $1.5M+ in a single week. The lesson is not "avoid index pricing" — it's "never go unhedged into winter in ERCOT without a price cap or financial hedge."

**Virtual PPA basis risk in a congested zone:** A VPPA with a wind farm in West Texas settling against Houston load zone prices can produce persistent negative settlements of $3–$12/MWh due to transmission congestion, turning an apparently favorable PPA into a net cost.

**Demand charge ratchet trap:** A facility modification (new production line, chiller replacement startup) creates a single month's peak 50% above normal. The tariff's 80% ratchet clause locks elevated billing demand for 11 months. A $200K annual cost increase from a single 15-minute interval.

**Utility rate case filing mid-contract:** Your fixed-price supply contract covers the energy component, but T&D and rider charges flow through. A utility rate case adds $0.012/kWh to delivery charges — a $150K annual increase on a 12 MW facility that your "fixed" contract doesn't protect against.

**Negative LMP pricing affecting PPA economics:** During high-wind or high-solar periods, wholesale prices go negative at the generator's node. Under some PPA structures, you owe the developer the settlement difference on negative-price intervals, creating surprise payments.

**Behind-the-meter solar cannibalizing demand response value:** On-site solar reduces your average consumption but may not reduce your peak (peaks often occur on cloudy late afternoons). If your DR baseline is calculated on recent consumption, solar reduces the baseline, which reduces your DR curtailment capacity and associated revenue.

**Capacity market obligation surprise:** In PJM, your capacity tag (PLC) is set by your load during the prior year's 5 coincident peak hours. If you ran backup generators or increased production during a heat wave that happened to include peak hours, your PLC spikes, and capacity charges increase 20–40% the following delivery year.

**Deregulated market re-regulation risk:** A state legislature proposes re-regulation after a price spike event. If enacted, your competitively procured supply contract may be voided, and you revert to utility tariff rates — potentially at higher cost than your negotiated contract.


Discover and evaluate Laravel packages via LaraPlugins.io MCP. Use when the user wants to find plugins, check package health, or assess Laravel/PHP compatibility.

Laravel Plugin Discovery
Examples
Example: Find Packages by Vendor

Example: Find Packages by Vendor

Returns all healthy packages from vendor "spatie".


Operate long-lived agent workloads with observability, security boundaries, and lifecycle management.

Metrics to Track

success rate

mean retries per task

time to recovery

cost per successful task

failure class distribution


Codified expertise for returns authorization, receipt and inspection, disposition decisions, refund processing, fraud detection, and warranty claims management. Informed by returns operations managers with 15+ years experience. Includes grading frameworks, disposition economics, fraud pattern recognition, and vendor recovery processes. Use when handling product returns, reverse logistics, refund decisions, return fraud detection, or warranty claims.

Returns & Reverse Logistics
Decision Frameworks
Vendor Recovery ROI

Vendor Recovery ROI

Pursue vendor recovery when: `(Expected credit × probability of collection) > (Labor cost + shipping cost + relationship cost)`. Rules of thumb:

Claims > $500: Always pursue. The math works even at 50% collection probability.

Claims $200-500: Pursue if the vendor has a functional RTV programme and you can batch shipments.

Claims < $200: Batch until threshold is met, or offset against next PO. Do not ship individual units.

Overseas vendors: Increase minimum threshold to $1,000. Add 30% to expected processing time.


Prompt Optimizer
How It Works
Phase 1: Intent Detection

Phase 1: Intent Detection

Classify the user's task into one or more categories:

| Category | Signal Words | Example |
|----------|-------------|---------|
| New Feature | build, create, add, implement, 创建, 实现, 添加 | "Build a login page" |
| Bug Fix | fix, broken, not working, error, 修复, 报错 | "Fix the auth flow" |
| Refactor | refactor, clean up, restructure, 重构, 整理 | "Refactor the API layer" |
| Research | how to, what is, explore, investigate, 怎么, 如何 | "How to add SSO" |
| Testing | test, coverage, verify, 测试, 覆盖率 | "Add tests for the cart" |
| Review | review, audit, check, 审查, 检查 | "Review my PR" |
| Documentation | document, update docs, 文档 | "Update the API docs" |
| Infrastructure | deploy, CI, docker, database, 部署, 数据库 | "Set up CI/CD pipeline" |
| Design | design, architecture, plan, 设计, 架构 | "Design the data model" |


Interactive agent picker for composing and dispatching parallel teams

Team Builder
How It Works
Step 5: Synthesize Results

Step 5: Synthesize Results

Collect all outputs and present a unified report:

Results grouped by agent

Synthesis section highlighting:

Agreements across agents

Conflicts or tensions between recommendations

Recommended next steps

If only 1 agent was selected, skip synthesis and present the output directly.


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.

Guardrails

draft first unless the user clearly asked for a live send

never claim a message was sent without a real Sent-folder or client-side confirmation

do not switch sender accounts casually; choose the account that matches the project and recipient

do not delete uncertain business mail during cleanup

if the task is really DM or iMessage work, hand off to `messages-ops`


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

Go Development Patterns
Concurrency Patterns
Avoiding Goroutine Leaks

Graceful Shutdown

errgroup for Coordinated Goroutines

Avoiding Goroutine Leaks


AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

Layer 4: Programmable Composition (Remotion)

Remotion turns editing problems into composable code. Use it for things that traditional editors make painful:


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

When to Use

Defining UI component specifications for Web, iOS, or Android.

Auditing existing code for accessibility barriers or compliance gaps.

Implementing new WCAG 2.2 standards like Target Size (Minimum) and Focus Appearance.

Mapping high-level design requirements to technical attributes (ARIA roles, traits, hints).


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
Privacy

Privacy

Observations stay **local** on your machine

Project-scoped instincts are isolated per project

Only **instincts** (patterns) can be exported — not raw observations

No actual code or conversation content is shared

You control what gets exported and promoted


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
Core Knowledge
Scheduling Fundamentals

Core Knowledge

Scheduling Fundamentals

**Forward vs. backward scheduling:** Forward scheduling starts from material availability date and schedules operations sequentially to find the earliest completion date. Backward scheduling starts from the customer due date and works backward to find the latest permissible start date. In practice, use backward scheduling as the default to preserve flexibility and minimize WIP, then switch to forward scheduling when the backward pass reveals that the latest start date is already in the past — that work order is already late-starting and needs to be expedited from today forward.

**Finite vs. infinite capacity:** MRP runs infinite-capacity planning — it assumes every work centre has unlimited capacity and flags overloads for the scheduler to resolve manually. Finite-capacity scheduling (FCS) respects actual resource availability: machine count, shift patterns, maintenance windows, and tooling constraints. Never trust an MRP-generated schedule as executable without running it through finite-capacity logic. MRP tells you *what* needs to be made; FCS tells you *when* it can actually be made.

**Drum-Buffer-Rope (DBR) and Theory of Constraints:** The drum is the constraint resource — the work centre with the least excess capacity relative to demand. The buffer is a time buffer (not inventory buffer) protecting the constraint from upstream starvation. The rope is the release mechanism that limits new work into the system to the constraint's processing rate. Identify the constraint by comparing load hours to available hours per work centre; the one with the highest utilization ratio (>85%) is your drum. Subordinate every other scheduling decision to keeping the drum fed and running. A minute lost at the constraint is a minute lost for the entire plant; a minute lost at a non-constraint costs nothing if buffer time absorbs it.

**JIT sequencing:** In mixed-model assembly environments, level the production sequence to minimize variation in component consumption rates. Use heijunka logic: if you produce models A, B, and C in a 3:2:1 ratio per shift, the ideal sequence is A-B-A-C-A-B, not AAA-BB-C. Levelled sequencing smooths upstream demand, reduces component safety stock, and prevents the "end-of-shift crunch" where the hardest jobs get pushed to the last hour.

**Where MRP breaks down:** MRP assumes fixed lead times, infinite capacity, and perfect BOM accuracy. It fails when (a) lead times are queue-dependent and compress under light load or expand under heavy load, (b) multiple work orders compete for the same constrained resource, (c) setup times are sequence-dependent, or (d) yield losses create variable output from fixed input. Schedulers must compensate for all four.


PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

PostgreSQL Patterns
Quick Reference
Data Type Quick Reference

Data Type Quick Reference

| Use Case | Correct Type | Avoid |
|----------|-------------|-------|
| IDs | `bigint` | `int`, random UUID |
| Strings | `text` | `varchar(255)` |
| Timestamps | `timestamptz` | `timestamp` |
| Money | `numeric(10,2)` | `float` |
| Flags | `boolean` | `varchar`, `int` |


Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.

Logging

Null Handling

Accept `@Nullable` only when unavoidable; otherwise use `@NonNull`

Use Bean Validation (`@NotNull`, `@NotBlank`) on inputs


Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+.

FoundationModels: On-Device LLM (iOS 26)

Core Pattern — Guided Generation with @Generable

Generate structured Swift types instead of raw strings:


Perl testing patterns using Test2::V0, Test::More, prove runner, mocking, coverage with Devel::Cover, and TDD methodology.

Perl Testing Patterns
Best Practices
DON'T

DON'T

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

**Don't share state between subtests**: Each subtest should be independent

**Don't skip `done_testing`**: Ensures all planned tests ran

**Don't over-mock**: Mock boundaries only, not the code under test

**Don't use `Test::More` for new projects**: Prefer Test2::V0

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

**Don't test CPAN modules**: Trust libraries to work correctly

**Don't write brittle tests**: Avoid over-specific string matching


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

龙虾灵魂锻造炉

不是给你一只工具龙虾，而是帮你锻造一只有灵魂的龙虾。

When to Use

当用户需要从零创建 OpenClaw 龙虾灵魂、角色设定、SOUL.md 或 IDENTITY.md

当用户想通过引导式问答或抽卡模式快速得到完整 persona 方案

当用户已经有一个粗糙设定，但还缺名字、边界规则、头像提示词或成套输出文件


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
SQL Injection Prevention
DBIx::Class (ORM Safety)

SQL Injection Prevention

DBI Placeholders

Dynamic Column Allowlists

DBIx::Class (ORM Safety)


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.

Workflow

1. Discover

Explore the repo before writing anything:

README and package/app entry points

folder structure

relevant config files

the changed files if the tour is PR-focused

Do not start writing steps before you understand the shape of the code.


Git workflow patterns including branching strategies, commit conventions, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes.

Trunk-Based Development (High-Velocity Teams)

Best for teams with strong CI/CD and feature flags.

**Rules:**

Everyone commits to `main` or very short-lived branches

Feature flags hide incomplete work

CI must pass before merge

Deploy multiple times per day


Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.

Continuous Agent Loop

This is the v1.8+ canonical loop skill name. It supersedes `autonomous-loops` while keeping compatibility for one release.


Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies.

E2E Testing Patterns

Comprehensive Playwright patterns for building stable, fast, and maintainable E2E test suites.


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
Statistical Process Control (SPC)

Statistical Process Control (SPC)

SPC separates signal from noise. Misinterpreting charts causes more problems than not charting at all:

**Chart Selection:** X-bar/R for continuous data with subgroups (n=2-10). X-bar/S for subgroups n>10. Individual/Moving Range (I-MR) for continuous data with subgroup n=1 (batch processes, destructive testing). p-chart for proportion defective (variable sample size). np-chart for count of defectives (fixed sample size). c-chart for count of defects per unit (fixed opportunity area). u-chart for defects per unit (variable opportunity area).

**Capability Indices:** Cp measures process spread vs. specification width (potential capability). Cpk adjusts for centering (actual capability). Pp/Ppk use overall variation (long-term) vs. Cp/Cpk which use within-subgroup variation (short-term). A process with Cp=2.0 but Cpk=0.8 is capable but not centered — fix the mean, not the variation. Automotive (IATF 16949) typically requires Cpk ≥ 1.33 for established processes, Ppk ≥ 1.67 for new processes.

**Western Electric Rules (signals beyond control limits):** Rule 1: One point beyond 3σ. Rule 2: Nine consecutive points on one side of the center line. Rule 3: Six consecutive points steadily increasing or decreasing. Rule 4: Fourteen consecutive points alternating up and down. Rule 1 demands immediate action. Rules 2-4 indicate systematic causes requiring investigation before the process goes out of spec.

**The Over-Adjustment Problem:** Reacting to common cause variation by tweaking the process increases variation — this is tampering. If the chart shows a stable process within control limits but individual points "look high," do not adjust. Only adjust for special cause signals confirmed by the Western Electric rules.

**Common vs. Special Cause:** Common cause variation is inherent to the process — reducing it requires fundamental process changes (better equipment, different material, environmental controls). Special cause variation is assignable to a specific event — a worn tool, a new raw material lot, an untrained operator on second shift. SPC's primary function is detecting special causes quickly.


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

Autonomous Loops Skill
1. Sequential Pipeline (`claude -p`)
Core Insight

Core Insight

If you can't figure out a loop like this, it means you can't even drive the LLM to fix your code in interactive mode.

The `claude -p` flag runs Claude Code non-interactively with a prompt, exits when done. Chain calls to build a pipeline:


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
Core Knowledge
Exception Taxonomy

Core Knowledge

Exception Taxonomy

Every exception falls into a classification that determines the resolution workflow, documentation requirements, and urgency:

**Delay (transit):** Shipment not delivered by promised date. Subtypes: weather, mechanical, capacity (no driver), customs hold, consignee reschedule. Most common exception type (~40% of all exceptions). Resolution hinges on whether delay is carrier-fault or force majeure.

**Damage (visible):** Noted on POD at delivery. Carrier liability is strong when consignee documents on the delivery receipt. Photograph immediately. Never accept "driver left before we could inspect."

**Damage (concealed):** Discovered after delivery, not noted on POD. Must file concealed damage claim within 5 days of delivery (industry standard, not law). Burden of proof shifts to shipper. Carrier will challenge — you need packaging integrity evidence.

**Damage (temperature):** Reefer/temperature-controlled failure. Requires continuous temp recorder data (Sensitech, Emerson). Pre-trip inspection records are critical. Carriers will claim "product was loaded warm."

**Shortage:** Piece count discrepancy at delivery. Count at the tailgate — never sign clean BOL if count is off. Distinguish driver count vs warehouse count conflicts. OS&D (Over, Short & Damage) report required.

**Overage:** More product delivered than on BOL. Often indicates cross-shipment from another consignee. Trace the extra freight — somebody is short.

**Refused delivery:** Consignee rejects. Reasons: damaged, late (perishable window), incorrect product, no PO match, dock scheduling conflict. Carrier is entitled to storage charges and return freight if refusal is not carrier-fault.

**Misdelivered:** Delivered to wrong address or wrong consignee. Full carrier liability. Time-critical to recover — product deteriorates or gets consumed.

**Lost (full shipment):** No delivery, no scan activity. Trigger trace at 24 hours past ETA for FTL, 48 hours for LTL. File formal tracer with carrier OS&D department.

**Lost (partial):** Some items missing from shipment. Often happens at LTL terminals during cross-dock handling. Serial number tracking critical for high-value.

**Contaminated:** Product exposed to chemicals, odors, or incompatible freight (common in LTL). Regulatory implications for food and pharma.


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
Carrier Scorecarding

Carrier Scorecarding

Measure what matters. A scorecard that tracks 20 metrics gets ignored; one that tracks 5 gets acted on:

**On-time delivery (OTD):** Percentage of shipments delivered within the agreed window. Target: ≥95%. Red flag: <90%. Measure pickup and delivery separately — a carrier with 98% on-time pickup and 88% on-time delivery has a linehaul or terminal problem, not a capacity problem.

**Tender acceptance rate:** Percentage of electronically tendered loads accepted by the carrier. Target: ≥90% for primary carriers. Red flag: <80%. A carrier that rejects 25% of tenders is consuming your operations team's time re-tendering and forcing spot market exposure. Tender acceptance below 75% on a contract lane means the rate is below market — renegotiate or reallocate.

**Claims ratio:** Dollar value of claims filed divided by total freight spend with the carrier. Target: <0.5% of spend. Red flag: >1.0%. Track claims frequency separately from claims severity — a carrier with one $50K claim is different from one with fifty $1K claims. The latter indicates a systemic handling problem.

**Invoice accuracy:** Percentage of invoices matching the contracted rate without manual correction. Target: ≥97%. Red flag: <93%. Chronic overbilling (even small amounts) signals either intentional rate testing or broken billing systems. Either way, it costs you audit labor. Carriers with <90% invoice accuracy should be on corrective action.

**Tender-to-pickup time:** Hours between electronic tender acceptance and actual pickup. Target: within 2 hours of requested pickup for FTL. Carriers that accept tenders but consistently pick up late are "soft rejecting" — they accept to hold the load while shopping for better freight.


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

C++ Testing (Agent Skill)
Debugging Failures

Running Tests

Debugging Failures

Re-run the single failing test with gtest filter.

Add scoped logging around the failing assertion.

Re-run with sanitizers enabled.

Expand to full suite once the root cause is fixed.


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
Stage 5: Outreach Draft
Channel Rules

Channel Rules

Email

Email

Use for the highest-value cold outreach, warm intros, investor outreach, and partnership asks

Default to drafting in Apple Mail / Mail.app when local desktop control is available

Create drafts first, do not send automatically unless the user explicitly asks

Subject line should be plain and specific, not clever

LinkedIn

LinkedIn

Use when the target is active there, when mutual graph context is stronger on LinkedIn, or when email confidence is low

Prefer API access if available

Otherwise use browser control to inspect profiles, recent activity, and draft the message

Keep it shorter than email and avoid fake professional warmth

X

X

Use for high-context operator, builder, or investor outreach where public posting behavior matters

Prefer API access for search, timeline, and engagement analysis

Fall back to browser control when needed

DMs and public replies should be much tighter than email and should reference something real from the target's timeline

Channel Selection Heuristic

Channel Selection Heuristic

Pick one primary channel in this order:

warm intro by email

direct email

LinkedIn DM

X DM or reply

Use multi-channel only when there is a strong reason and the cadence will not feel spammy.


Scan your Claude Code configuration (.claude/ directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.

What It Scans

| File | Checks |
|------|--------|
| `CLAUDE.md` | Hardcoded secrets, auto-run instructions, prompt injection patterns |
| `settings.json` | Overly permissive allow lists, missing deny lists, dangerous bypass flags |
| `mcp.json` | Risky MCP servers, hardcoded env secrets, npx supply chain risks |
| `hooks/` | Command injection via interpolation, data exfiltration, silent error suppression |
| `agents/*.md` | Unrestricted tool access, prompt injection surface, missing model specs |


FoundationModels: On-Device LLM (iOS 26)

Patterns for integrating Apple's on-device language model into apps using the FoundationModels framework. Covers text generation, structured output with `@Generable`, custom tool calling, and snapshot streaming — all running on-device for privacy and offline support.


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.


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
Phase 3: Tests + Coverage
Integration Tests with Testcontainers

Unit Tests

Test service logic in isolation with mocked dependencies:

Integration Tests with Testcontainers

Test against a real database instead of H2:


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
1. Enable Observation Hooks

Quick Start

1. Enable Observation Hooks

Add to your `~/.claude/settings.json`.

**If installed as a plugin** (recommended):

**If installed manually** to `~/.claude/skills`:


Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.

Deep Research

Produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.


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.

When to Use

"Build a Kafka monitoring dashboard"

"Create a Grafana dashboard for Elasticsearch"

"Make a SigNoz dashboard for this service"

"Turn this metrics list into a real operational dashboard"


Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

Red Flags to Avoid

unverifiable claims

fuzzy market sizing without assumptions

inconsistent team roles or titles

revenue math that does not sum cleanly

inflated certainty where assumptions are fragile


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.

Output Format

Pitfalls

do not conflate failed attempts with net revenue

do not infer team billing from marketing language alone

do not compare competitor pricing from memory when current evidence is available

do not jump from diagnosis straight to refund without classifying the issue


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

Python Testing Patterns
Best Practices
DO

Best Practices

DO

**Follow TDD**: Write tests before code (red-green-refactor)

**Test one thing**: Each test should verify a single behavior

**Use descriptive names**: `test_user_login_with_invalid_credentials_fails`

**Use fixtures**: Eliminate duplication with fixtures

**Mock external dependencies**: Don't depend on external services

**Test edge cases**: Empty inputs, None values, boundary conditions

**Aim for 80%+ coverage**: Focus on critical paths

**Keep tests fast**: Use marks to separate slow tests


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

Cost-Aware LLM Pipeline

Patterns for controlling LLM API costs while maintaining quality. Combines model routing, budget tracking, retry logic, and prompt caching into a composable pipeline.


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

Go Development Patterns
Package Organization
Standard Project Layout

Optional Behavior with Type Assertions

Package Organization

Standard Project Layout


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

Autonomous trading agents have a harsher threat model than normal LLM apps: an injection or bad tool path can turn directly into asset loss.


Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

Deployment Patterns
Production Readiness Checklist
Infrastructure

Infrastructure

[ ] Docker image builds reproducibly (pinned versions)

[ ] Environment variables documented and validated at startup

[ ] Resource limits set (CPU, memory)

[ ] Horizontal scaling configured (min/max instances)

[ ] SSL/TLS enabled on all endpoints


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)
Best Practices

Best Practices

**Always use GlassEffectContainer** when applying glass to multiple sibling views — it enables morphing and improves rendering performance

**Apply `.glassEffect()` after** other appearance modifiers (frame, font, padding)

**Use `.interactive()`** only on elements that respond to user interaction (buttons, toggleable items)

**Choose spacing carefully** in containers to control when glass effects merge

**Use `withAnimation`** when changing view hierarchies to enable smooth morphing transitions

**Test across appearances** — light mode, dark mode, and accented/tinted modes

**Ensure accessibility contrast** — text on glass must remain readable


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

Modern Perl Development Patterns
File I/O

Precompiled Patterns

Data Structures

References and Safe Deep Access

File I/O


Knowledge base management, ingestion, sync, and retrieval across multiple storage layers (local files, MCP memory, vector stores, Git repos). Use when the user wants to save, organize, sync, deduplicate, or search across their knowledge systems.

Knowledge Operations
Ingestion Workflow
2. Deduplicate

2. Deduplicate

Check if this knowledge already exists:

Search memory files for existing entries

Query MCP memory with relevant terms

Check whether the information already exists in GitHub or Linear before creating another local note

Do not create duplicates. Update existing entries instead.


Git workflow patterns including branching strategies, commit conventions, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes.

Git Workflow Patterns
Release Management

Branch Management

Naming Conventions

Branch Cleanup

Stash Workflow

Release Management


Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.

Laravel TDD Workflow
Examples
Fakes for Side Effects

Persistence Test Example

Fakes for Side Effects

`Bus::fake()` for jobs

`Queue::fake()` for queued work

`Mail::fake()` and `Notification::fake()` for notifications

`Event::fake()` for domain events


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
Core Pattern — Isolated Conformances

Core Pattern — Isolated Conformances

MainActor types can now conform to non-isolated protocols safely:

The compiler ensures the conformance is only used on the main actor:


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 1: Model a use case boundary

How It Works

Step 1: Model a use case boundary

Define a single use case with a clear input and output DTO. Keep transport details (Express `req`, GraphQL `context`, job payload wrappers) outside this boundary.


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
Test Lifecycle and Fixtures

Data-Driven Testing

withData in Kotest

withData in Kotest

Test Lifecycle and Fixtures

BeforeTest / AfterTest

BeforeTest / AfterTest

Kotest Extensions

Kotest Extensions


Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

Bun Runtime

Bun is a fast all-in-one JavaScript runtime and toolkit: runtime, package manager, bundler, and test runner.


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
Stage 1: Signal Scoring

Stage 1: Signal Scoring

Search for high-signal people in target verticals. Assign a weight to each based on:

| Signal | Weight | Source |
|--------|--------|--------|
| Role/title alignment | 30% | Exa, LinkedIn |
| Industry match | 25% | Exa company search |
| Recent activity on topic | 20% | X API search, Exa |
| Follower count / influence | 10% | X API |
| Location proximity | 10% | Exa, LinkedIn |
| Engagement with your content | 5% | X API interactions |


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

Implementation Patterns

Pattern A: Claude Code Subagents (Recommended)

Subagents provide true context isolation. Each reviewer is a separate process with no shared state.


Go Development Patterns

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


Thread-safe data persistence in Swift using actors — in-memory cache with file-backed storage, eliminating data races by design.

Swift Actors for Thread-Safe Persistence

Patterns for building thread-safe data persistence layers using Swift actors. Combines in-memory caching with file-backed storage, leveraging the actor model to eliminate data races at compile time.


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

Django Security Best Practices
SQL Injection Prevention
Django ORM Protection

Role-Based Access Control (RBAC)

SQL Injection Prevention

Django ORM Protection


PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

PostgreSQL Patterns

Quick reference for PostgreSQL best practices. For detailed guidance, use the `database-reviewer` agent.


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

Eval Categories

**1. CDSS Accuracy (CRITICAL — 100% required)**

Tests all clinical decision support logic: drug interaction pairs (both directions), dose validation rules, clinical scoring vs published specs, no false negatives, no silent failures.

**2. PHI Exposure (CRITICAL — 100% required)**

Tests for protected health information leaks: API error responses, console output, URL parameters, browser storage, cross-facility isolation, unauthenticated access, service role key absence.

**3. Data Integrity (CRITICAL — 100% required)**

Tests clinical data safety: locked encounters, audit trail entries, cascade delete protection, concurrent edit handling, no orphaned records.

**4. Clinical Workflow (HIGH — 95%+ required)**

Tests end-to-end flows: encounter lifecycle, template rendering, medication sets, drug/diagnosis search, prescription PDF, red flag alerts.

**5. Integration Compliance (HIGH — 95%+ required)**

Tests external systems: HL7 message parsing (v2.x), FHIR validation, lab result mapping, malformed message handling.


Example Usage

Related Skills

`brand-voice` for canonical voice capture

`connections-optimizer` for review-first network pruning and expansion before outreach


Pattern for progressively refining context retrieval to solve the subagent context problem

Iterative Retrieval Pattern
Best Practices

Integration with Agents

Use in agent prompts:

Best Practices

**Start broad, narrow progressively** - Don't over-specify initial queries

**Learn codebase terminology** - First cycle often reveals naming conventions

**Track what's missing** - Explicit gap identification drives refinement

**Stop at "good enough"** - 3 high-relevance files beats 10 mediocre ones

**Exclude confidently** - Low-relevance files won't become relevant


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.

Frontend Design
Design Workflow
1. Frame the interface first

Design Workflow

1. Frame the interface first

Before coding, settle:

purpose

audience

emotional tone

visual direction

one thing the user should remember

Possible directions:

brutally minimal

editorial

industrial

luxury

playful

geometric

retro-futurist

soft and organic

maximalist

Do not mix directions casually. Choose one and execute it cleanly.


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.

When to Use

"Build a Jira connector for this project"

"Add a Slack provider following the existing pattern"

"Create a new integration for this API"

"Build a plugin that matches the repo's connector style"


AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

Layer 4: Programmable Composition (Remotion)

When to use Remotion

Overlays: text, images, branding, lower thirds

Data visualizations: charts, stats, animated numbers

Motion graphics: transitions, explainer animations

Composable scenes: reusable templates across videos

Product demos: annotated screenshots, UI highlights


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
Scope Decision Guide

File Structure

Scope Decision Guide

| Pattern Type | Scope | Examples |
|-------------|-------|---------|
| Language/framework conventions | **project** | "Use React hooks", "Follow Django REST patterns" |
| File structure preferences | **project** | "Tests in `__tests__`/", "Components in src/components/" |
| Code style | **project** | "Use functional style", "Prefer dataclasses" |
| Error handling strategies | **project** | "Use Result type for errors" |
| Security practices | **global** | "Validate user input", "Sanitize SQL" |
| General best practices | **global** | "Write tests first", "Always handle errors" |
| Tool workflow preferences | **global** | "Grep before Edit", "Read before Write" |
| Git practices | **global** | "Conventional commits", "Small focused commits" |


Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).

Documentation Lookup (Context7)
Examples
Example: Next.js middleware

Examples

Example: Next.js middleware

Call **resolve-library-id** with `libraryName: "Next.js"`, `query: "How do I set up Next.js middleware?"`.

From results, pick the best match (e.g. `/vercel/next.js`) by name and benchmark score.

Call **query-docs** with `libraryId: "/vercel/next.js"`, `query: "How do I set up Next.js middleware?"`.

Use the returned snippets and text to answer; include a minimal `middleware.ts` example from the docs if relevant.


Use this skill when retrieving Jira tickets, analyzing requirements, updating ticket status, adding comments, or transitioning issues. Provides Jira API patterns via MCP or direct REST calls.

Troubleshooting

| Error | Cause | Fix |
|---|---|---|
| `401 Unauthorized` | Invalid or expired API token | Regenerate at id.atlassian.com |
| `403 Forbidden` | Token lacks project permissions | Check token scopes and project access |
| `404 Not Found` | Wrong ticket key or base URL | Verify `JIRA_URL` and ticket key |
| `spawn uvx ENOENT` | IDE cannot find `uvx` on PATH | Use full path (e.g., `~/.local/bin/uvx`) or set PATH in `~/.zprofile` |
| Connection timeout | Network/VPN issue | Check VPN connection and firewall rules |


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.

When to Activate

Triaging issues (classifying, labeling, responding, deduplicating)

Managing PRs (review status, CI checks, stale PRs, merge readiness)

Debugging CI/CD failures

Preparing releases and changelogs

Monitoring Dependabot and security alerts

Managing contributor experience on open-source projects

User says "check GitHub", "triage issues", "review PRs", "merge", "release", "CI is broken"


JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

Caching

1st-level cache is per EntityManager; avoid keeping entities across transactions

For read-heavy entities, consider second-level cache cautiously; validate eviction strategy


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
DO

Full Flow Testing

Testing Best Practices

DO

**Use factories**: Instead of manual object creation

**One assertion per test**: Keep tests focused

**Descriptive test names**: `test_user_cannot_delete_others_post`

**Test edge cases**: Empty inputs, None values, boundary conditions

**Mock external services**: Don't depend on external APIs

**Use fixtures**: Eliminate duplication

**Test permissions**: Ensure authorization works

**Keep tests fast**: Use `--reuse-db` and `--nomigrations`


Related

[The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Subagent orchestration section

`continuous-learning` skill - For patterns that improve over time

Agent definitions bundled with ECC (manual install path: `agents/`)


Git workflow patterns including branching strategies, commit conventions, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes.

Git Workflow Patterns
Pull Request Workflow
Code Review Checklist

Code Review Checklist

**For Reviewers:**

[ ] Does the code solve the stated problem?

[ ] Are there any edge cases not handled?

[ ] Is the code readable and maintainable?

[ ] Are there sufficient tests?

[ ] Are there security concerns?

[ ] Is the commit history clean (squashed if needed)?

**For Authors:**

[ ] Self-review completed before requesting review

[ ] CI passes (tests, lint, typecheck)

[ ] PR size is reasonable (<500 lines ideal)

[ ] Related to a single feature/fix

[ ] Description clearly explains the change


Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.

Rust Testing Patterns
Test Organization Patterns
Test Helpers

With Tokio

Test Organization Patterns

Parameterized Tests with `rstest`

Test Helpers


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.

Email Ops

Use this when the real task is mailbox work: triage, drafting, replying, sending, or proving a message landed in Sent.

This is not a generic writing skill. It is an operator workflow around the actual mail surface.


Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.

Related

[The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Section on continuous learning

`/learn` command - Manual pattern extraction mid-session


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

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


Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

Django Verification Loop
Phase 10: Logging Configuration

Phase 8: Static Assets

Phase 9: Configuration Review

Phase 10: Logging Configuration


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

Eval Harness Skill
Product Evals (v1.8)
Minimal Eval Artifact Layout

Minimal Eval Artifact Layout

`.claude/evals/<feature>.md` definition

`.claude/evals/<feature>.log` run history

`docs/releases/<version>/eval-summary.md` release snapshot


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

Python Testing Patterns
Testing Side Effects
Testing with pytest's tmp_path Fixture

Testing Exception Attributes

Testing Side Effects

Testing File Operations

Testing with pytest's tmp_path Fixture


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
Installation
Full ECC install

Full ECC install

If you are working from the ECC repository checkout, verify the skill is present with:

To update later, review the ECC diff before updating:


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

Role and Context

You are a senior freight exceptions analyst with 15+ years managing shipment exceptions across all modes — LTL, FTL, parcel, intermodal, ocean, and air. You sit at the intersection of shippers, carriers, consignees, insurance providers, and internal stakeholders. Your systems include TMS (transportation management), WMS (warehouse management), carrier portals, claims management platforms, and ERP order management. Your job is to resolve exceptions quickly while protecting financial interests, preserving carrier relationships, and maintaining customer satisfaction.


Git Workflow Patterns
Merge vs Rebase
Rebase (Linear History)

Rebase (Linear History)

**Use when:**

Updating your local feature branch with latest `main`

You want a linear, clean history

The branch is local-only (not pushed)

You're the only one working on the branch


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 package PROJECT

/opensource package PROJECT

Run packager independently. Ask for "License?" and "Description?", then:


Interactive agent picker for composing and dispatching parallel teams

Team Builder
How It Works
Step 4: Spawn Agents in Parallel

Step 4: Spawn Agents in Parallel

Read each selected agent's markdown file

Prompt for the task description if not already provided

Spawn all agents in parallel using the Agent tool:

`subagent_type: "general-purpose"`

`prompt: "{agent file content}\n\nTask: {task description}"`

Each agent runs independently — no inter-agent communication needed

If an agent fails (error, timeout, or empty output), note the failure inline (e.g., "Security Engineer: failed — [reason]") and continue with results from agents that succeeded


Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

Frontend Slides

Create zero-dependency, animation-rich HTML presentations that run entirely in the browser.

Inspired by the visual exploration approach showcased in work by zarazhangrui (credit: @zarazhangrui).


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
Stage 2: Mutual Ranking
Ranking Model

Ranking Model

Pull user's X following list and LinkedIn connections

For each high-signal target, check for shared connections

Apply the `social-graph-ranker` model to score bridge value

Rank mutuals by:

| Factor | Weight |
|--------|--------|
| Number of connections to targets | 40% — highest weight, most connections = highest rank |
| Mutual's current role/company | 20% — decision maker vs individual contributor |
| Mutual's location | 15% — same city = easier intro |
| Industry alignment | 15% — same vertical = natural intro |
| Mutual's X handle / LinkedIn | 10% — identifiability for outreach |

Canonical rule:

Inside this skill, use the same weighted bridge model:

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: no viable bridge -> direct cold outreach using the same lead record


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.

3. Take the lightest useful evidence path first

use `exa-search` for fast discovery

escalate to `deep-research` when synthesis or multiple sources matter

use `market-research` when the outcome should end in a recommendation

hand off to `lead-intelligence` when the real ask is target ranking or warm-path discovery


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

龙虾灵魂锻造炉 注意事项 好灵魂的检验标准

注意事项

好灵魂的检验标准

看完名字就能猜到大致性格

底线规则用角色的话说出来

有明确的性格缺陷或局限

能想象出具体的对话场景

使用 30 天后不会角色疲劳


SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

Previews

Use `#Preview` macro with inline mock data for fast iteration:

Anti-Patterns to Avoid

Using `ObservableObject` / `@Published` / `@StateObject` / `@EnvironmentObject` in new code — migrate to `@Observable`

Putting async work directly in `body` or `init` — use `.task {}` or explicit load methods

Creating view models as `@State` inside child views that don't own the data — pass from parent instead

Using `AnyView` type erasure — prefer `@ViewBuilder` or `Group` for conditional views

Ignoring `Sendable` requirements when passing data to/from actors


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

Go Development Patterns
Anti-Patterns to Avoid

Anti-Patterns to Avoid

**Remember**: Go code should be boring in the best way - predictable, consistent, and easy to understand. When in doubt, keep it simple.


AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

Layer 1: Capture (Screen Studio / Raw Footage)

Collect the source material:

**Screen Studio**: polished screen recordings for app demos, coding sessions, browser workflows

**Raw camera footage**: vlog footage, interviews, event recordings

**Desktop capture via VideoDB**: session recording with real-time context (see `videodb` skill)

Output: raw files ready for organization.


JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

JPA/Hibernate Patterns
Testing Data Access

Testing Data Access

Prefer `@DataJpaTest` with Testcontainers to mirror production

Assert SQL efficiency using logs: set `logging.level.org.hibernate.SQL=DEBUG` and `logging.level.org.hibernate.orm.jdbc.bind=TRACE` for parameter values

**Remember**: Keep entities lean, queries intentional, and transactions short. Prevent N+1 with fetch strategies and projections, and index for your read/write paths.


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

Strategic Compact Skill
Token Optimization Patterns
Context Optimization Tools

Context Optimization Tools

`token-optimizer` MCP — Automated 95%+ token reduction via content deduplication

`context-mode` — Context virtualization (315KB to 5.4KB demonstrated)


Related Skills

`fal-ai-media` — AI image, video, and audio generation

`videodb` — Server-side video processing, indexing, and streaming

`content-engine` — Platform-native content distribution


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
Core Knowledge
Procurement Strategies

Procurement Strategies

The core decision in deregulated markets is how much price risk to retain versus transfer to suppliers:

**Fixed-price (full requirements):** Supplier provides all electricity at a locked $/kWh for the contract term (12–36 months). Provides budget certainty. You pay a risk premium — typically 5–12% above the forward curve at contract signing — because the supplier is absorbing price, volume, and basis risk. Best for organizations where budget predictability outweighs cost minimization.

**Index/variable pricing:** You pay the real-time or day-ahead wholesale price plus a supplier adder ($0.002–$0.006/kWh). Lowest long-run average cost, but full exposure to price spikes. In ERCOT during Winter Storm Uri (Feb 2021), wholesale prices hit $9,000/MWh — an index customer on a 5 MW peak load faced a single-week energy bill exceeding $1.5M. Index pricing requires active risk management and a corporate culture that tolerates budget variance.

**Block-and-index (hybrid):** You purchase fixed-price blocks to cover your baseload (60–80% of expected consumption) and let the remaining variable load float at index. This balances cost optimization with partial budget certainty. The blocks should match your base load shape — if your facility runs 3 MW baseload 24/7 with a 2 MW variable load during production hours, buy 3 MW blocks around-the-clock and 2 MW blocks on-peak only.

**Layered procurement:** Instead of locking in your full load at one point in time (which concentrates market timing risk), buy in tranches over 12–24 months. For example, for a 2027 contract year: buy 25% in Q1 2025, 25% in Q3 2025, 25% in Q1 2026, and the remaining 25% in Q3 2026. Dollar-cost averaging for energy. This is the single most effective risk management technique available to most C&I buyers — it eliminates the "did we lock at the top?" problem.

**RFP process in deregulated markets:** Issue RFPs to 5–8 qualified retail energy providers (REPs). Include 36 months of interval data, your load factor, site addresses, utility account numbers, current contract expiration dates, and any sustainability requirements (RECs, carbon-free targets). Evaluate on total cost, supplier credit quality (check S&P/Moody's — a supplier bankruptcy mid-contract forces you into utility default service at tariff rates), contract flexibility (change-of-use provisions, early termination), and value-added services (demand response management, sustainability reporting, market intelligence).


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.

Node.js Keccak-256
Examples
Audit your codebase

Examples

ethers v6

viem

web3.js

Common patterns

Address from public key

Audit your codebase


Energy Procurement
Communication Patterns
Supplier Negotiations

Communication Patterns

Supplier Negotiations

Energy supplier negotiations are multi-year relationships. Calibrate tone:

**RFP issuance:** Professional, data-rich, competitive. Provide complete interval data and load profiles. Suppliers who can't model your load accurately will pad their margins. Transparency reduces risk premiums.

**Contract renewal:** Lead with relationship value and volume growth, not price demands. "We've valued the partnership over the past 36 months and want to discuss renewal terms that reflect both market conditions and our growing portfolio."

**Price challenges:** Reference specific market data. "ICE forward curves for 2027 are showing $42/MWh for AEP Dayton Hub. Your quote of $48/MWh reflects a 14% premium to the curve — can you help us understand what's driving that spread?"


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

Django Development Patterns
Caching Strategies

Serializer Patterns

ViewSet Patterns

Custom Actions

Service Layer Pattern

Caching Strategies


Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

Laravel Security Best Practices
How It Works

How It Works

Middleware provides baseline protections (CSRF via `VerifyCsrfToken`, security headers via `SecurityHeaders`).

Guards and policies enforce access control (`auth:sanctum`, `$this->authorize`, policy middleware).

Form Requests validate and shape input (`UploadInvoiceRequest`) before it reaches services.

Rate limiting adds abuse protection (`RateLimiter::for('login')`) alongside auth controls.

Data safety comes from encrypted casts, mass-assignment guards, and signed routes (`URL::temporarySignedRoute` + `signed` middleware).


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.

Non-Negotiable Rules

Use the current repository as the source of truth, not generic preferences

Every DAILY decision must cite concrete repo evidence

LIBRARY does not mean "delete"; it means "keep accessible without loading by default"

Do not install hooks, rules, or scripts that the current repo cannot use

Prefer ECC-native surfaces; do not introduce a second install system


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.

When to Activate

the user wants to publish the same underlying idea across multiple platforms

a launch, update, release, or essay needs platform-specific versions

the user says "crosspost", "post this everywhere", or "adapt this for X and LinkedIn"


Codified expertise for returns authorization, receipt and inspection, disposition decisions, refund processing, fraud detection, and warranty claims management. Informed by returns operations managers with 15+ years experience. Includes grading frameworks, disposition economics, fraud pattern recognition, and vendor recovery processes. Use when handling product returns, reverse logistics, refund decisions, return fraud detection, or warranty claims.

Returns & Reverse Logistics
Communication Patterns
Key Templates

Key Templates

Brief templates appear below. Adapt them to your fraud, CX, and reverse-logistics workflows before using them in production.

**RMA approval:** Subject: `Return Approved — Order #{order_id}`. Provide: RMA number, return shipping instructions, expected refund timeline, condition requirements.

**Refund confirmation:** Lead with the number: "Your refund of ${amount} has been processed to your [payment method]. Please allow [X] business days."

**Fraud hold notice:** "Your return is being reviewed by our processing team. We expect to have an update within [X] business days. We appreciate your patience."


C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.

C# Testing Patterns
Mocking with NSubstitute

Unit Test Structure

Arrange-Act-Assert

Parameterized Tests with Theory

Mocking with NSubstitute


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
Portfolio Strategy

Portfolio Strategy

Your carrier portfolio is an investment portfolio — diversification manages risk, concentration drives leverage:

**Asset carriers vs. brokers:** Asset carriers own trucks. They provide capacity certainty, consistent service, and direct accountability — but they're less flexible on pricing and may not cover all your lanes. Brokers source capacity from thousands of small carriers. They offer pricing flexibility and lane coverage, but introduce counterparty risk (double-brokering, carrier quality variance, payment chain complexity). A typical mix is 60-70% asset carriers, 20-30% brokers, and 5-15% niche/specialty carriers as a separate bucket reserved for temperature-controlled, hazmat, oversized, or other special handling lanes.

**Routing guide structure:** Build a 3-deep routing guide for every lane with >2 loads/week. Primary carrier gets first tender (target: 80%+ acceptance). Secondary gets the fallback (target: 70%+ acceptance on overflow). Tertiary is your price ceiling — often a broker whose rate represents the "do not exceed" for spot procurement. For lanes with <2 loads/week, use a 2-deep guide or a regional broker with broad coverage.

**Lane density and carrier concentration:** Award enough volume per carrier per lane to matter to them. A carrier running 2 loads/week on your lane will prioritize you over a shipper giving them 2 loads/month. But don't give one carrier more than 40% of any single lane — a carrier exit or service failure on a concentrated lane is catastrophic. For your top 20 lanes by volume, maintain at least 3 active carriers.

**Small carrier value:** Carriers with 10-50 trucks often provide better service, more flexible pricing, and stronger relationships than mega-carriers. They answer the phone. Their owner-operators care about your freight. The tradeoff: less technology integration, thinner insurance, and capacity limits during peak. Use small carriers for consistent, mid-volume lanes where relationship quality matters more than surge capacity.


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
2. Narrow the target integration

2. Narrow the target integration

Define only the surface the repo actually needs:

auth flow

key entities

core read/write operations

pagination and rate limits

webhook or polling model


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.

Configure Everything Claude Code (ECC)
Step 4: Post-Installation Verification
4a: Verify File Existence

4a: Verify File Existence

List all installed files and confirm they exist at the target location:


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

Examples

The following sections contain detailed, runnable examples for each testing pattern:


Kotlin Testing Patterns

Comprehensive Kotlin testing patterns for writing reliable, maintainable tests following TDD methodology with Kotest and MockK.


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
Redact Sensitive Information

Redact Sensitive Information

Presets: `social-security-number`, `email-address`, `credit-card-number`, `international-phone-number`, `north-american-phone-number`, `date`, `time`, `url`, `ipv4`, `ipv6`, `mac-address`, `us-zip-code`, `vin`.


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

Navigation

Type-Safe Navigation (Compose Navigation 2.8+)

Define routes as `@Serializable` objects:


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

Go Testing Patterns
Fuzzing (Go 1.18+)
Fuzz Test with Multiple Inputs

Memory Allocation Benchmarks

Fuzzing (Go 1.18+)

Basic Fuzz Test

Fuzz Test with Multiple Inputs


Use this skill to validate the "why" before building, run product diagnostics, and pressure-test product direction before the request becomes an implementation contract.

Product Lens — Think Before You Build
How It Works
Mode 1: Product Diagnostic

How It Works

Mode 1: Product Diagnostic

Like YC office hours but automated. Asks the hard questions:

Output: a `PRODUCT-BRIEF.md` with answers, risks, and a go/no-go recommendation.

If the result is "yes, build this," the next lane is `product-capability`, not more founder-theater.


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

Django Testing with TDD
Coverage
Coverage Goals

Coverage

Coverage Configuration

Coverage Goals

| Component | Target Coverage |
|-----------|-----------------|
| Models | 90%+ |
| Serializers | 85%+ |
| Views | 80%+ |
| Services | 90%+ |
| Utilities | 80%+ |
| Overall | 80%+ |


Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).

Documentation Lookup (Context7)

When the user asks about libraries, frameworks, or APIs, fetch current documentation via the Context7 MCP (tools `resolve-library-id` and `query-docs`) instead of relying on training data.


Convene a four-voice council for ambiguous decisions, tradeoffs, and go/no-go calls. Use when multiple valid paths exist and you need structured disagreement before choosing.

Council
Workflow
1. Extract the real question

Workflow

1. Extract the real question

Reduce the decision to one explicit prompt:

what are we deciding?

what constraints matter?

what counts as success?

If the question is vague, ask one clarifying question before convening the council.


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

PyTorch Development Patterns
Data Pipeline Patterns
Custom Collate for Variable-Length Data

Custom Dataset

Efficient DataLoader Configuration

Custom Collate for Variable-Length Data


Documentation Lookup (Context7)
When to use

When to use

Activate when the user:

Asks setup or configuration questions (e.g. "How do I configure Next.js middleware?")

Requests code that depends on a library ("Write a Prisma query for...")

Needs API or reference information ("What are the Supabase auth methods?")

Mentions specific frameworks or libraries (React, Vue, Svelte, Express, Tailwind, Prisma, Supabase, etc.)

Use this skill whenever the request depends on accurate, up-to-date behavior of a library, framework, or API. Applies across harnesses that have the Context7 MCP configured (e.g. Claude Code, Cursor, Codex).


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

Patterns for building Electronic Medical Record (EMR) and Electronic Health Record (EHR) systems. Prioritizes patient safety, clinical accuracy, and practitioner efficiency.


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

Newtype Pattern for Type Safety

Structs and Data Modeling

Builder Pattern for Complex Construction


Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.

Spring Boot TDD Workflow

TDD guidance for Spring Boot services with 80%+ coverage (unit + integration).


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

Django Development Patterns
Caching Strategies
QuerySet Caching

View-Level Caching

Template Fragment Caching

Low-Level Caching

QuerySet Caching


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.

Output Format

Pitfalls

do not mix inference into sourced facts without labeling it

do not ignore user-provided evidence

do not use a heavy research lane for a question local repo context can answer

do not give freshness-sensitive answers without dates


Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

Investor Materials
Asset Guidance
Pitch Deck

Asset Guidance

Pitch Deck

Recommended flow:

company + wedge

problem

solution

product / demo

market

business model

traction

team

competition / differentiation

ask

use of funds / milestones

appendix

If the user wants a web-native deck, pair this skill with `frontend-slides`.


Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.

Context Budget
How It Works
Phase 2: Classify

Phase 2: Classify

Sort every component into a bucket:

| Bucket | Criteria | Action |
|--------|----------|--------|
| **Always needed** | Referenced in CLAUDE.md, backs an active command, or matches current project type | Keep |
| **Sometimes needed** | Domain-specific (e.g. language patterns), not referenced in CLAUDE.md | Consider on-demand activation |
| **Rarely needed** | No command reference, overlapping content, or no obvious project match | Remove or lazy-load |


Operate notifications as one ECC-native workflow across GitHub, Linear, desktop alerts, hooks, and connected communication surfaces. Use when the real problem is alert routing, deduplication, escalation, or inbox collapse.

Unified Notifications Ops
Workflow
1. Inventory the current surface

Workflow

1. Inventory the current surface

List:

event sources

current channels

existing hooks/scripts that emit alerts

duplicate paths for the same event

silent failure cases where important things are not being surfaced

Call out what ECC already owns.


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.

Quality Checklist

[ ] valid dashboard JSON

[ ] clear section grouping

[ ] titles and units are present

[ ] thresholds/status colors are meaningful

[ ] variables exist for common filters

[ ] default time range and refresh are sensible

[ ] no vanity panels with no operator value


Orchestrate multi-agent coding tasks via Claude DevFleet — plan projects, dispatch parallel agents in isolated worktrees, monitor progress, and read structured reports.

Claude DevFleet Multi-Agent Orchestration

Examples

Full auto: plan and launch

`plan_project(prompt="...")` → shows plan with missions and dependencies.

Dispatch the first mission (the one with empty `depends_on`).

Remaining missions auto-dispatch as dependencies resolve (they have `auto_dispatch=true`).

Report back with project ID and mission count so the user knows what was launched.

Poll with `get_mission_status` or `get_dashboard()` periodically until all missions reach a terminal state (`completed`, `failed`, or `cancelled`).

`get_report(mission_id=...)` for each terminal mission — summarize successes and call out failures with errors and next steps.


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
Stage 5: Outreach Draft
Direct Cold Outreach (to target)

Direct Cold Outreach (to target)

Goal:

open from something specific and recent

explain why the fit is real

make one low-friction ask

Avoid:

generic admiration

feature dumping

broad asks like "would love to connect"

forced rhetorical questions


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

Compose Multiplatform Patterns
State Management
Event Sink Pattern

Collecting State in Compose

Event Sink Pattern

For complex screens, use a sealed interface for events instead of multiple callback lambdas:


Translate PRD intent, roadmap asks, or product discussions into an implementation-ready capability plan that exposes constraints, invariants, interfaces, and unresolved decisions before multi-service work starts. Use when the user needs an ECC-native PRD-to-SRS lane instead of vague planning prose.

When to Use

A PRD, roadmap item, discussion, or founder note exists, but the implementation constraints are still implicit

A feature crosses multiple services, repos, or teams and needs a capability contract before coding

Product intent is clear, but architecture, data, lifecycle, or policy implications are still fuzzy

Senior engineers keep restating the same hidden assumptions during review

You need a reusable artifact that can survive across harnesses and sessions