Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows.

Healthcare CDSS Development Patterns
How It Works
Alert Severity and UI Behavior

Alert Severity and UI Behavior

| Severity | UI Behavior | Clinician Action Required |
|----------|-------------|--------------------------|
| Critical | Block action. Non-dismissable modal. Red. | Must document override reason to proceed |
| Major | Warning banner inline. Orange. | Must acknowledge before proceeding |
| Minor | Info note inline. Yellow. | Awareness only, no action required |

Critical alerts must NEVER be auto-dismissed or implemented as toast notifications. Override reasons must be stored in the audit trail.


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
Sealed Classes and Interfaces
Sealed Interfaces for API Responses

Sealed Classes and Interfaces

Modeling Restricted Hierarchies

Sealed Interfaces for API Responses


Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

Benchmarking

Track:

completion rate

retries per task

pass@1 and pass@3

cost per successful task


Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

Kotlin Coroutines & Flows
Flow Patterns
StateFlow for UI State

Flow Patterns

Cold Flow — One-Shot to Stream Conversion

StateFlow for UI State

`WhileSubscribed(5_000)` keeps the upstream active for 5 seconds after the last subscriber leaves — survives configuration changes without restarting.


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.

Step 5: Wire everything in a composition root

Instantiate adapters, then inject them into use cases. Keep this wiring centralized to avoid hidden service-locator behavior.


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

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

State shape design:

[ ] Mutually exclusive states use sealed types, union variants, or the solution's built-in async state type (e.g. Riverpod's `AsyncValue`) — not boolean flags (`isLoading`, `isError`, `hasData`)

[ ] Every async operation models loading, success, and error as distinct states

[ ] All state variants are handled exhaustively in UI — no silently ignored cases

[ ] Error states carry error information for display; loading states don't carry stale data

[ ] Nullable data is not used as a loading indicator — states are explicit


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.

When to Activate

Creating a talk deck, pitch deck, workshop deck, or internal presentation

Converting `.ppt` or `.pptx` slides into an HTML presentation

Improving an existing HTML presentation's layout, motion, or typography

Exploring presentation styles with a user who does not know their design preference yet


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
Workflow
Step 4: Deep-Read Key Sources

Step 4: Deep-Read Key Sources

For the most promising URLs, fetch full content:

**With firecrawl:**

**With exa:**

Read 3-5 key sources in full for depth. Do not rely only on search snippets.


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

When to Activate

Hydration mismatches between server HTML and client state

Route-level rendering decisions such as prerender, SWR, ISR, or client-only sections

Performance work around lazy loading, lazy hydration, or payload size

Page or component data fetching with `useFetch`, `useAsyncData`, or `$fetch`

Nuxt routing issues tied to route params, middleware, or SSR/client differences


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
Confidence Scoring

Confidence Scoring

Confidence evolves over time:

| Score | Meaning | Behavior |
|-------|---------|----------|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |

**Confidence increases** when:

Pattern is repeatedly observed

User doesn't correct the suggested behavior

Similar instincts from other sources agree

**Confidence decreases** when:

User explicitly corrects the behavior

Pattern isn't observed for extended periods

Contradicting evidence appears


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

Token Budget Advisor (TBA)
Examples
Triggers

Examples

Triggers

"Give me the short version first."

"How many tokens will your answer use?"

"Respond at 50% depth."

"I want the exhaustive answer, not the summary."

"Dame la version corta y luego la detallada."


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
How It Works

How It Works

Classify the exception by type (delay, damage, loss, shortage, refusal) and severity

Apply the appropriate resolution workflow based on classification and financial exposure

Document evidence per carrier-specific requirements and filing deadlines

Escalate through defined tiers based on time elapsed and dollar thresholds

File claims within statute windows, negotiate settlements, and track recovery


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

Data Scraper Agent
Workflow
Step 3: Build the Scraper Source

Step 3: Build the Scraper Source

Template for any data source:

**HTML scraping pattern:**

**RSS feed pattern:**


Visualize whether skills, rules, and agent definitions are actually followed — auto-generates scenarios at 3 prompt strictness levels, runs agents, classifies behavioral sequences, and reports compliance rates with full tool call timelines

skill-comply: Automated Compliance Measurement

Supported Targets

**Skills** (`skills/*/SKILL.md`): Workflow skills like search-first, TDD guides

**Rules** (`rules/common/*.md`): Mandatory rules like testing.md, security.md, git-workflow.md

**Agent definitions** (`agents/*.md`): Whether an agent gets invoked when expected (internal workflow verification not yet supported)


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

Customs & Trade Compliance
Decision Frameworks
FTA Qualification Analysis

FTA Qualification Analysis

**Identify applicable FTAs** based on origin and destination countries.

**Determine the product-specific rule of origin.** Look up the HS heading in the relevant FTA's annex. Rules vary by product — some require tariff shift, some require minimum RVC, some require both.

**Trace all non-originating materials** through the bill of materials. Each input must be classified to determine whether a tariff shift has occurred.

**Calculate RVC if required.** Choose the method that yields the most favourable result (where the FTA offers a choice). Verify all cost data with the supplier.

**Apply cumulation rules.** USMCA allows accumulation across the US, Mexico, and Canada. EU-UK TCA allows bilateral cumulation. RCEP allows diagonal cumulation among all 15 parties.

**Prepare the certification.** USMCA certifications must include nine prescribed data elements. EUR.1 requires Chamber of Commerce or customs authority endorsement. Retain supporting documentation for 5 years (USMCA) or 4 years (EU).


Agent Harness Construction
Context Budgeting

Context Budgeting

Keep system prompt minimal and invariant.

Move large guidance into skills loaded on demand.

Prefer references to files over inlining long documents.

Compact at phase boundaries, not arbitrary token thresholds.


Use this skill to automate visual testing and UI interaction verification using browser automation after deploying features.

Browser QA — Automated Visual Testing & Interaction

How It Works

Uses the browser automation MCP (claude-in-chrome, Playwright, or Puppeteer) to interact with live pages like a real user.


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

Django Testing with TDD
Model Testing
Model Tests

conftest.py

Factory Boy

Factory Setup

Using Factories

Model Testing

Model Tests


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

PyTorch Development Patterns
Quick Reference: PyTorch Idioms

Gradient Checkpointing for Large Models

torch.compile for Speed

Quick Reference: PyTorch Idioms

| Idiom | Description |
|-------|-------------|
| `model.train()` / `model.eval()` | Always set mode before train/eval |
| `torch.no_grad()` | Disable gradients for inference |
| `optimizer.zero_grad(set_to_none=True)` | More efficient gradient clearing |
| `.to(device)` | Device-agnostic tensor/model placement |
| `torch.amp.autocast` | Mixed precision for 2x speed |
| `pin_memory=True` | Faster CPU→GPU data transfer |
| `torch.compile` | JIT compilation for speed (2.0+) |
| `weights_only=True` | Secure model loading |
| `torch.manual_seed` | Reproducible experiments |
| `gradient_checkpointing` | Trade compute for memory |


Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

Frontend Development Patterns
Component Patterns
Render Props Pattern

Component Patterns

Composition Over Inheritance

Compound Components

Render Props Pattern


Fact-forcing gate that blocks Edit/Write/Bash (including MultiEdit) and demands concrete investigation (importers, data schemas, user instruction) before allowing the action. Measurably improves output quality by +2.25 points vs ungated agents.

GateGuard — Fact-Forcing Pre-Action Gate

Best Practices

Let the gate fire naturally. Don't try to pre-answer the gate questions — the investigation itself is what improves quality.

Customize gate messages for your domain. If your project has specific conventions, add them to the gate prompts.

Use `.gateguard.yml` to ignore paths like `.venv/`, `node_modules/`, `.git/`.


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.

Jira Integration Skill
Analyzing a Ticket
3. Edge Cases & Error Scenarios

3. Edge Cases & Error Scenarios

Invalid inputs (empty, too long, special characters)

Unauthorized access

Network failures or timeouts

Concurrent users or race conditions

Boundary conditions

Missing or null data

State transitions (back navigation, refresh, etc.)


A comprehensive verification system for Claude Code sessions.

Verification Loop Skill
Verification Phases
Phase 6: Diff Review

Phase 5: Security Scan

Phase 6: Diff Review

Review each changed file for:

Unintended changes

Missing error handling

Potential edge cases


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.

Layer 5: External Data Store (Supabase, PostgreSQL, etc.)

**Use for:** Structured data, large document storage, full-text search

**Good for:** Documents too large for memory files, data needing SQL queries


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.

Golden Rule

All investor materials must agree with each other.

Create or confirm a single source of truth before writing:

traction metrics

pricing and revenue assumptions

raise size and instrument

use of funds

team bios and titles

milestones and timelines

If conflicting numbers appear, stop and resolve them before drafting.


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

Accessibility (WCAG 2.2)
Examples
Android: Accessible Toggle

Examples

Web: Accessible Search

iOS: Accessible Action Button

Android: Accessible Toggle


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
Kover Coverage

Kover Coverage

Gradle Configuration

Gradle Configuration

Coverage Commands

Coverage Commands

Coverage Targets

Coverage Targets

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


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

UI Demo Video Recorder
Checklist Before Recording

Script Template

Usage:

Checklist Before Recording

[ ] Discovery phase completed

[ ] Rehearsal passes with all selectors OK

[ ] Headless mode enabled

[ ] Resolution set to `1280x720`

[ ] Cursor and subtitle overlays re-injected after every navigation

[ ] `showSubtitle(page, 'Step N - ...')` used at major transitions

[ ] `moveAndClick` used for all clicks with descriptive labels

[ ] `typeSlowly` used for visible input

[ ] No silent catches; helpers log warnings

[ ] Smooth scrolling used for content reveal

[ ] Key pauses are visible to a human viewer

[ ] Flow matches the requested story order

[ ] Script reflects the actual UI discovered in phase 1


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

Perl Testing Patterns
Test Organization and prove

Deep Comparison with Builders

Subtests

Exception Testing with Test2

Test Organization and prove


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

Flutter/Dart Code Review Best Practices
2. Dart Language Pitfalls

2. Dart Language Pitfalls

[ ] **Implicit dynamic**: Missing type annotations leading to `dynamic` — enable `strict-casts`, `strict-inference`, `strict-raw-types`

[ ] **Null safety misuse**: Excessive `!` (bang operator) instead of proper null checks or Dart 3 pattern matching (`if (value case var v?)`)

[ ] **Type promotion failures**: Using `this.field` where local variable promotion would work

[ ] **Catching too broadly**: `catch (e)` without `on` clause; always specify exception types

[ ] **Catching `Error`**: `Error` subtypes indicate bugs and should not be caught

[ ] **Unused `async`**: Functions marked `async` that never `await` — unnecessary overhead

[ ] **`late` overuse**: `late` used where nullable or constructor initialization would be safer; defers errors to runtime

[ ] **String concatenation in loops**: Use `StringBuffer` instead of `+` for iterative string building

[ ] **Mutable state in `const` contexts**: Fields in `const` constructor classes should not be mutable

[ ] **Ignoring `Future` return values**: Use `await` or explicitly call `unawaited()` to signal intent

[ ] **`var` where `final` works**: Prefer `final` for locals and `const` for compile-time constants

[ ] **Relative imports**: Use `package:` imports for consistency

[ ] **Mutable collections exposed**: Public APIs should return unmodifiable views, not raw `List`/`Map`

[ ] **Missing Dart 3 pattern matching**: Prefer switch expressions and `if-case` over verbose `is` checks and manual casting

[ ] **Throwaway classes for multiple returns**: Use Dart 3 records `(String, int)` instead of single-use DTOs

[ ] **`print()` in production code**: Use `dart:developer` `log()` or the project's logging package; `print()` has no log levels and cannot be filtered


Translate visa application documents (images) to English and create a bilingual PDF with original and translation

Supported Documents

Bank deposit certificates (存款证明)

Income certificates (收入证明)

Employment certificates (在职证明)

Retirement certificates (退休证明)

Property certificates (房产证明)

Business licenses (营业执照)

ID cards and passports

Other official documents


Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

Agent Harness Construction
Granularity Rules

Granularity Rules

Use micro-tools for high-risk operations (deploy, migration, permissions).

Use medium tools for common edit/read/search loops.

Use macro-tools only when round-trip overhead is the dominant cost.


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

Messages Ops
Workflow
2. Read before drafting

2. Read before drafting

If the task may turn into an outbound follow-up:

read the latest inbound

identify the open loop

then hand off to the correct outbound skill if needed


Jira Integration Skill
Analyzing a Ticket
1. Testable Requirements

1. Testable Requirements

**Functional requirements** — What the feature does

**Acceptance criteria** — Conditions that must be met

**Testable behaviors** — Specific actions and expected outcomes

**User roles** — Who uses this feature and their permissions

**Data requirements** — What data is needed

**Integration points** — APIs, services, or systems involved


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

Workflow: Plan → Dispatch → Monitor → Report

**Plan**: Call `plan_project(prompt="...")` → returns `project_id` + list of missions with `depends_on` chains and `auto_dispatch=true`.

**Show plan**: Present mission titles, types, and dependency chain to the user.

**Dispatch**: Call `dispatch_mission(mission_id=<first_mission_id>)` on the root mission (empty `depends_on`). Remaining missions auto-dispatch as their dependencies complete (because `plan_project` sets `auto_dispatch=true` on them).

**Monitor**: Call `get_mission_status(mission_id=...)` or `get_dashboard()` to check progress.

**Report**: Call `get_report(mission_id=...)` when missions complete. Share highlights with the user.


Knowledge Operations
Knowledge Architecture
Layer 6: Local context/archive folder

Layer 6: Local context/archive folder

**Use for:** human-facing notes, archived gameplans, local media organization, temporary non-code docs

**Rule:** writable for information storage, but not a shadow code workspace

**Do not use for:** active code changes or repo truth that should live upstream


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

ECC Tools Cost Audit
Workflow
4. Audit the high-signal burn paths

4. Audit the high-signal burn paths

PR multiplication

PR multiplication

inspect PR helpers and branch naming

check dedupe, synchronize-event handling, and existing-PR reuse

if app-generated branches can re-enter analysis, treat that as a priority-0 recursion risk

Quota bypass

Quota bypass

inspect where quota is checked versus where usage is reserved or incremented

if quota is checked before enqueue but usage is charged only inside the worker, treat concurrent front-door passes as a real race

Premium-model leakage

Premium-model leakage

inspect model selection, tier branching, and provider routing

verify whether free or capped users can still hit premium analyzers when premium keys are present

Retry burn

Retry burn

inspect retry loops, duplicate queue jobs, and deterministic failure reruns

if the same non-transient error can spend analysis repeatedly, fix that before quality improvements


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

Liquid Glass Design System (iOS 26)
Core Pattern — SwiftUI
Customizing Shape and Tint

Customizing Shape and Tint

Key customization options:

`.regular` — standard glass effect

`.tint(Color)` — add color tint for prominence

`.interactive()` — react to touch and pointer interactions

Shape: `.capsule` (default), `.rect(cornerRadius:)`, `.circle`


Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.

Best Practices

**Don't read everything** — reconnaissance should use Glob and Grep, not Read on every file. Read selectively only for ambiguous signals.

**Verify, don't guess** — if a framework is detected from config but the actual code uses something different, trust the code.

**Respect existing CLAUDE.md** — if one already exists, enhance it rather than replacing it. Call out what's new vs existing.

**Stay concise** — the onboarding guide should be scannable in 2 minutes. Details belong in the code, not the guide.

**Flag unknowns** — if a convention can't be confidently detected, say so rather than guessing. "Could not determine test runner" is better than a wrong answer.


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
Implementation Requirements
Accessibility

Accessibility

use semantic structure (`main`, `section`, `nav`)

keep contrast readable

support keyboard-only navigation

respect `prefers-reduced-motion`


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.

VideoDB generative audio

If VideoDB is configured:

Layer 6: Final Polish (Descript / CapCut)

The last layer is human. Use a traditional editor for:

**Pacing**: adjust cuts that feel too fast or slow

**Captions**: auto-generated, then manually cleaned

**Color grading**: basic correction and mood

**Final audio mix**: balance voice, music, and SFX levels

**Export**: platform-specific formats and quality settings

This is where taste lives. AI clears the repetitive work. You make the final calls.


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

Compose Multiplatform Patterns
KMP Platform-Specific UI

Modifier Ordering

Modifier order matters — apply in this sequence:

KMP Platform-Specific UI


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.

Jira Integration Skill
Security Guidelines

Security Guidelines

**Never hardcode** Jira API tokens in source code or skill files

**Always use** environment variables or a secrets manager

**Add `.env`** to `.gitignore` in every project

**Rotate tokens** immediately if exposed in git history

**Use least-privilege** API tokens scoped to required projects

**Validate** that credentials are set before making API calls — fail fast with a clear message


Frontend Slides
Workflow
4. Build the Presentation

4. Build the Presentation

Output either:

`presentation.html`

`[presentation-name].html`

Use an `assets/` folder only when the deck contains extracted or user-supplied images.

Required structure:

semantic slide sections

a viewport-safe CSS base from `STYLE_PRESETS.md`

CSS custom properties for theme values

a presentation controller class for keyboard, wheel, and touch navigation

Intersection Observer for reveal animations

reduced-motion support


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

Security Bounty Hunter
In-Scope Patterns

In-Scope Patterns

These are the kinds of issues that consistently matter:

| Pattern | CWE | Typical impact |
| --- | --- | --- |
| SSRF through user-controlled URLs | CWE-918 | internal network access, cloud metadata theft |
| Auth bypass in middleware or API guards | CWE-287 | unauthorized account or data access |
| Remote deserialization or upload-to-RCE paths | CWE-502 | code execution |
| SQL injection in reachable endpoints | CWE-89 | data exfiltration, auth bypass, data destruction |
| Command injection in request handlers | CWE-78 | code execution |
| Path traversal in file-serving paths | CWE-22 | arbitrary file read or write |
| Auto-triggered XSS | CWE-79 | session theft, admin compromise |


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.

Step 3: Adapt by Platform Constraint

X

keep it compressed

lead with the sharpest claim or artifact

use a thread only when a single post would collapse the argument

avoid hashtags and generic filler


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

Data Scraper Agent
Workflow
Step 9: GitHub Actions Workflow

Step 7: Build Storage (Notion example)

Step 8: Orchestrate in main.py

Step 9: GitHub Actions Workflow


Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.

Coding Standards & Best Practices
API Design Standards
REST API Conventions

Custom Hooks

State Management

Conditional Rendering

API Design Standards

REST API Conventions


Key Principles

**Edit, don't generate.** This workflow is for cutting real footage, not creating from prompts.

**Structure before style.** Get the story right in Layer 2 before touching anything visual.

**FFmpeg is the backbone.** Boring but critical. Where long footage becomes manageable.

**Remotion for repeatability.** If you'll do it more than once, make it a Remotion component.

**Generate selectively.** Only use AI generation for assets that don't exist, not for everything.

**Taste is the last layer.** AI clears repetitive work. You make the final creative calls.


Verification

root causes cite exact file paths and code areas

fixes are ordered by burn impact, not code neatness

proving commands are named

final status distinguishes local change, verification, push, and deployment


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

Healthcare PHI/PII Compliance Patterns
How It Works

How It Works

Healthcare data protection operates on three layers: **classification** (what is sensitive), **access control** (who can see it), and **audit** (who did see it).


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

Android Clean Architecture
Convention Plugins (Gradle)

Convention Plugins (Gradle)

For KMP projects, use convention plugins to reduce build file duplication:

Apply in modules:


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

Guardrails

Never expose secret keys, full card details, or unnecessary customer PII in the response

Do not refund blindly; first classify the issue

Distinguish among:

accidental duplicate purchase

deliberate multi-seat or team purchase

broken product / unmet value

failed or incomplete checkout

cancellation due to missing self-serve controls

For annual plans, team plans, and prorated states, verify the contract shape before taking action


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

Baseline Controls

immutable deployment artifacts

least-privilege credentials

environment-level secret injection

hard timeout and retry budgets

audit log for high-risk actions


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

龙虾灵魂锻造炉
可选依赖
头像自动生图：可选生图 skill

头像自动生图：可选生图 skill

可选依赖

头像自动生图：可选生图 skill

本 Skill 的核心输出是**文本方案**（SOUL.md + IDENTITY.md + 头像提示词）。
头像图片生成是**可选增强能力**，由当前环境中**已审核并已安装**的生图 skill 提供。

**判断逻辑**：

如果当前环境已安装并允许使用的生图 skill → Step 5 中调用它自动生图

如果未安装 → Step 5 输出完整的提示词文本，用户可复制到 Gemini / ChatGPT / Midjourney 手动生成

**调用方式**（仅在已安装且已审核时）：

先将龙虾名字规整为安全片段：仅保留字母、数字和连字符，其余字符统一替换为 `-`

将提示词写入临时文件 `/tmp/openclaw-<safe-name>-prompt.md`

使用当前环境允许的生图 skill，传入提示词文件和输出路径

**接口约定**：

参数：`<prompt-file> <output-path>`

提示词文件：UTF-8 Markdown 文本，包含完整英文生图提示词

成功：退出码 `0`，并在输出路径生成图片文件

失败：返回非 `0` 退出码，或未生成输出文件；此时必须回退到手动提示词流程

如生图 skill 后续接口发生变化，调用前应重新核对其参数和输出契约


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

Laravel TDD Workflow
Examples
Test Configuration

Test Commands

`php artisan test`

`vendor/bin/phpunit`

`vendor/bin/pest`

Test Configuration

Use `phpunit.xml` to set `DB_CONNECTION=sqlite` and `DB_DATABASE=:memory:` for fast tests

Keep separate env for tests to avoid touching dev/prod data


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

Workflow

Write tests first (they should fail)

Implement minimal code to pass

Refactor with tests green

Enforce coverage (JaCoCo)


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

References

See skill: `swift-actor-persistence` for actor-based persistence patterns.
See skill: `swift-protocol-di-testing` for protocol-based DI and testing with Swift Testing.


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

Best practices for Git version control, branching strategies, and collaborative development.


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.

Rule

For Ethereum contexts, never use `crypto.createHash('sha3-256')`. Use Keccak-aware helpers from `ethers`, `viem`, `web3`, or another explicit Keccak implementation.


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
Communication Patterns
Performance Reviews

Performance Reviews

**Positive reviews:** Be specific. "Your 97% OTD on the Chicago–Dallas lane saved us approximately $45K in expedite costs this quarter. We're increasing your allocation from 60% to 75% on that lane." Carriers invest in relationships that reward performance.

**Corrective reviews:** Lead with data, not accusations. Present the scorecard. Identify the specific metrics below threshold. Ask for a corrective action plan with a 30/60/90-day timeline. Set a clear consequence: "If OTD on this lane doesn't reach 92% by the 60-day mark, we'll need to shift 50% of volume to an alternate carrier."

Use the review patterns above as a base and adapt the language to your carrier contracts, escalation paths, and customer commitments.


Production-ready Dart and Flutter patterns covering null safety, immutable state, async composition, widget architecture, popular state management frameworks (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and clean architecture.

Dart/Flutter Patterns

When to Use

Use this skill when:

Starting a new Flutter feature and need idiomatic patterns for state management, navigation, or data access

Reviewing or writing Dart code and need guidance on null safety, sealed types, or async composition

Setting up a new Flutter project and choosing between BLoC, Riverpod, or Provider

Implementing secure HTTP clients, WebView integration, or local storage

Writing tests for Flutter widgets, Cubits, or Riverpod providers

Wiring up GoRouter with authentication guards


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

Agent Eval Skill
Core Concepts
Metrics Collected

Metrics Collected

| Metric | What It Measures |
|--------|-----------------|
| Pass rate | Did the agent produce code that passes the judge? |
| Cost | API spend per task (when available) |
| Time | Wall-clock seconds to completion |
| Consistency | Pass rate across repeated runs (e.g., 3/3 = 100%) |


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

DeFi AMM Security
Examples
Admin controls

Admin controls

Prefer explicit acceptance for ownership transfer and gate every privileged path.


Capture architectural decisions made during Claude Code sessions as structured ADRs. Auto-detects decision moments, records context, alternatives considered, and rationale. Maintains an ADR log so future developers understand why the codebase is shaped the way it is.

Architecture Decision Records
Workflow
Reading Existing ADRs

Reading Existing ADRs

When a user asks "why did we choose X?":

Check if `docs/adr/` exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?"

If it exists, scan `docs/adr/README.md` index for relevant entries

Read matching ADR files and present the Context and Decision sections

If no match is found, respond: "No ADR found for that decision. Would you like to record one now?"


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

Python Testing Patterns
Mocking and Patching

Custom Markers

Run Specific Tests

Configure Markers in pytest.ini

Mocking and Patching


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

Core Knowledge

Forecasting Methods and When to Use Each

**Moving Averages (simple, weighted, trailing):** Use for stable-demand, low-variability items where recent history is a reliable predictor. A 4-week simple moving average works for commodity staples. Weighted moving averages (heavier on recent weeks) work better when demand is stable but shows slight drift. Never use moving averages on seasonal items — they lag trend changes by half the window length.

**Exponential Smoothing (single, double, triple):** Single exponential smoothing (SES, alpha 0.1–0.3) suits stationary demand with noise. Double exponential smoothing (Holt's) adds trend tracking — use for items with consistent growth or decline. Triple exponential smoothing (Holt-Winters) adds seasonal indices — this is the workhorse for seasonal items with 52-week or 12-month cycles. The alpha/beta/gamma parameters are critical: high alpha (>0.3) chases noise in volatile items; low alpha (<0.1) responds too slowly to regime changes. Optimize on holdout data, never on the same data used for fitting.

**Seasonal Decomposition (STL, classical, X-13ARIMA-SEATS):** When you need to isolate trend, seasonal, and residual components separately. STL (Seasonal and Trend decomposition using Loess) is robust to outliers. Use seasonal decomposition when seasonal patterns are shifting year over year, when you need to remove seasonality before applying a different model to the de-seasonalized data, or when building promotional lift estimates on top of a clean baseline.

**Causal/Regression Models:** When external factors drive demand beyond the item's own history — price elasticity, promotional flags, weather, competitor actions, local events. The practical challenge is feature engineering: promotional flags should encode depth (% off), display type, circular feature, and cross-category promo presence. Overfitting on sparse promo history is the single biggest pitfall. Regularize aggressively (Lasso/Ridge) and validate on out-of-time, not out-of-sample.

**Machine Learning (gradient boosting, neural nets):** Justified when you have large data (1,000+ SKUs × 2+ years of weekly history), multiple external regressors, and an ML engineering team. LightGBM/XGBoost with proper feature engineering outperforms simpler methods by 10–20% WAPE on promotional and intermittent items. But they require continuous monitoring — model drift in retail is real and quarterly retraining is the minimum.


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

Core Problem: Implicit Background Offloading

In Swift 6.1 and earlier, async functions could be implicitly offloaded to background threads, causing data-race errors even in seemingly safe code:

Swift 6.2 fixes this: async functions stay on the calling actor by default.


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.

GitHub Action

Add to your CI pipeline:

Severity Levels

| Grade | Score | Meaning |
|-------|-------|---------|
| A | 90-100 | Secure configuration |
| B | 75-89 | Minor issues |
| C | 60-74 | Needs attention |
| D | 40-59 | Significant risks |
| F | 0-39 | Critical vulnerabilities |


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

Python Development Patterns
Python Tooling Integration

Generator for Large Data

Avoid String Concatenation in Loops

Python Tooling Integration


Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

Spring Boot Development Patterns

Spring Boot architecture and API patterns for scalable, production-grade services.


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

Database Migration Patterns
Anti-Patterns

Timeline Example

Anti-Patterns

| Anti-Pattern | Why It Fails | Better Approach |
|-------------|-------------|-----------------|
| Manual SQL in production | No audit trail, unrepeatable | Always use migration files |
| Editing deployed migrations | Causes drift between environments | Create new migration instead |
| NOT NULL without default | Locks table, rewrites all rows | Add nullable, backfill, then add constraint |
| Inline index on large table | Blocks writes during build | CREATE INDEX CONCURRENTLY |
| Schema + data in one migration | Hard to rollback, long transactions | Separate migrations |
| Dropping column before removing code | Application errors on missing column | Remove code first, drop column next deploy |


Interactive agent picker for composing and dispatching parallel teams

Rules

**Dynamic discovery only.** Never hardcode agent lists. New files in the directory auto-appear in the menu.

**Max 5 agents per team.** More than 5 produces diminishing returns and excessive token usage. Enforce at selection time.

**Parallel dispatch.** All agents run simultaneously — use the Agent tool's parallel invocation pattern.

**Parallel Agent calls, not TeamCreate.** This skill uses parallel Agent tool calls for independent work. TeamCreate (a Claude Code tool for multi-agent dialogue) is only needed when agents must debate or respond to each other.


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
Why Hooks vs Skills for Observation?

Why Hooks vs Skills for Observation?

"v1 relied on skills to observe. Skills are probabilistic -- they fire ~50-80% of the time based on Claude's judgment."

Hooks fire **100% of the time**, deterministically. This means:

Every tool call is observed

No patterns are missed

Learning is comprehensive


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
When to Use

When to Use

Shipment is delayed, damaged, lost, or refused at delivery

Carrier dispute over liability, accessorial charges, or detention claims

Customer escalation due to missed delivery window or incorrect order

Filing or managing freight claims with carriers or insurers

Building exception handling SOPs or escalation protocols


Logistics Exception Management
Core Knowledge
Seasonal and Cyclical Patterns

Seasonal and Cyclical Patterns

**Peak season (Oct-Jan):** Exception rates increase 30-50%. Carrier networks are strained. Transit times extend. Claims departments slow down. Build buffer into commitments.

**Produce season (Apr-Sep):** Temperature exceptions spike. Reefer availability tightens. Pre-cooling compliance becomes critical.

**Hurricane season (Jun-Nov):** Gulf and East Coast disruptions. Force majeure claims increase. Rerouting decisions needed within 4-6 hours of storm track updates.

**Month/quarter end:** Shippers rush volume. Carrier tender rejections spike. Double-brokering increases. Quality suffers across the board.

**Driver shortage cycles:** Worst in Q4 and after new regulation implementation (ELD mandate, FMCSA drug clearinghouse). Spot rates spike, service drops.


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

Failure Modes

loop churn without measurable progress

repeated retries with same root cause

merge queue stalls

cost drift from unbounded escalation


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.

Banned Patterns

Delete and rewrite any of these:

"Excited to share"

"Here's what I learned"

"What do you think?"

"link in bio" unless that is literally true

generic "professional takeaway" paragraphs that were not in the source


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

C++ Testing (Agent Skill)

Agent-focused testing workflow for modern C++ (C++17/20) using GoogleTest/GoogleMock with CMake/CTest.


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

Go Testing Patterns
Mocking with Interfaces

Golden Files

Testing against expected output files stored in `testdata/`.

Mocking with Interfaces


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.

When to Use

Processing return requests and determining RMA eligibility

Inspecting returned goods and assigning condition grades for disposition

Routing disposition decisions (restock, refurbish, liquidate, scrap, RTV)

Investigating return fraud patterns or abuse of return policies

Managing warranty claims and vendor recovery chargebacks


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

E2E Testing Patterns
Flaky Test Patterns
Common Causes & Fixes

Flaky Test Patterns

Quarantine

Identify Flakiness

Common Causes & Fixes

**Race conditions:**

**Network timing:**

**Animation timing:**


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

Django Verification Loop
Pre-Deployment Checklist

Output Template

Pre-Deployment Checklist

[ ] All tests passing

[ ] Coverage ≥ 80%

[ ] No security vulnerabilities

[ ] No unapplied migrations

[ ] DEBUG = False in production settings

[ ] SECRET_KEY properly configured

[ ] ALLOWED_HOSTS set correctly

[ ] Database backups enabled

[ ] Static files collected and served

[ ] Logging configured and working

[ ] Error monitoring (Sentry, etc.) configured

[ ] CDN configured (if applicable)

[ ] Redis/cache backend configured

[ ] Celery workers running (if applicable)

[ ] HTTPS/SSL configured

[ ] Environment variables documented


Logistics Exception Management
Performance Indicators

Performance Indicators

Track these metrics weekly and trend monthly:

| Metric | Target | Red Flag |
|---|---|---|
| Mean resolution time | < 72 hours | > 120 hours |
| First-contact resolution rate | > 40% | < 25% |
| Financial recovery rate (claims) | > 75% | < 50% |
| Customer satisfaction (post-exception) | > 4.0/5.0 | < 3.5/5.0 |
| Exception rate (per 1,000 shipments) | < 25 | > 40 |
| Claims filing timeliness | 100% within 30 days | Any > 60 days |
| Repeat exceptions (same carrier/lane) | < 10% | > 20% |
| Aged exceptions (> 30 days open) | < 5% of total | > 15% |


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
Success Metrics

Success Metrics

80%+ code coverage achieved

All tests passing (green)

No skipped or disabled tests

Fast test execution (< 30s for unit tests)

E2E tests cover critical user flows

Tests catch bugs before production

**Remember**: Tests are not optional. They are the safety net that enables confident refactoring, rapid development, and production reliability.


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

Flutter/Dart Code Review Best Practices
12. Error Handling
Graceful degradation:

Graceful degradation:

[ ] API errors result in user-friendly error UI, not crashes

[ ] Retry mechanisms for transient network failures

[ ] Offline state handled gracefully

[ ] Error states in state management carry error info for display

[ ] Raw exceptions (network, parsing) are mapped to user-friendly, localized messages before reaching the UI — never show raw exception strings to users


Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

Kotlin Coroutines & Flows
Structured Concurrency
SupervisorScope

Parallel Decomposition

Use `coroutineScope` + `async` for parallel work:

SupervisorScope

Use `supervisorScope` when child failures should not cancel siblings:


REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.

API Design Patterns
Filtering, Sorting, and Search
Sparse Fieldsets

Filtering, Sorting, and Search

Filtering

Sorting

Full-Text Search

Sparse Fieldsets


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

/search-first — Research Before You Code

Workflow

Decision Matrix

| Signal | Action |
|--------|--------|
| Exact match, well-maintained, MIT/Apache | **Adopt** — install and use directly |
| Partial match, good foundation | **Extend** — install + write thin wrapper |
| Multiple weak matches | **Compose** — combine 2-3 small packages |
| Nothing suitable found | **Build** — write custom, but informed by research |


Flutter/Dart Code Review Best Practices
15. Static Analysis
Configuration:

15. Static Analysis

Configuration:

[ ] `analysis_options.yaml` present with strict settings enabled

[ ] Strict analyzer settings: `strict-casts: true`, `strict-inference: true`, `strict-raw-types: true`

[ ] A comprehensive lint rule set is included (very_good_analysis, flutter_lints, or custom strict rules)

[ ] All sub-packages in monorepos inherit or share the root analysis options


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.

Additional Resources

Maintain an internal hedge policy, approved counterparty list, and tariff-change calendar alongside this skill.

Keep facility-specific load shapes and utility contract metadata close to the planning workflow so recommendations stay grounded in real demand patterns.


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

Swift Protocol-Based Dependency Injection for Testing

When to Activate

Writing Swift code that accesses file system, network, or external APIs

Need to test error handling paths without triggering real failures

Building modules that work across environments (app, test, SwiftUI preview)

Designing testable architecture with Swift concurrency (actors, Sendable)


Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.

Spring Boot Development Patterns
Production Defaults

Production Defaults

Prefer constructor injection, avoid field injection

Enable `spring.mvc.problemdetails.enabled=true` for RFC 7807 errors (Spring Boot 3+)

Configure HikariCP pool sizes for workload, set timeouts

Use `@Transactional(readOnly = true)` for queries

Enforce null-safety via `@NonNull` and `Optional` where appropriate

**Remember**: Keep controllers thin, services focused, repositories simple, and errors handled centrally. Optimize for maintainability and testability.


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

Skill Stack

Pull these ECC-native skills into the workflow when relevant:

`brand-voice` before drafting anything user-facing

`investor-outreach` for investor, partner, or sponsor-facing mail

`customer-billing-ops` when the thread is a billing/support incident rather than generic correspondence

`knowledge-ops` when the message or thread should be captured into durable context afterward

`research-ops` when a reply depends on fresh external facts


Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

When to Activate

drafting blog posts, essays, launch posts, guides, tutorials, or newsletter issues

turning notes, transcripts, or research into polished articles

matching an existing founder, operator, or brand voice from examples

tightening structure, pacing, and evidence in already-written long-form copy


Reorganize the user's X and LinkedIn network with review-first pruning, add/follow recommendations, and channel-specific warm outreach drafted in the user's real voice. Use when the user wants to clean up following lists, grow toward current priorities, or rebalance a social graph around higher-signal relationships.

Scoring Model

Use these positive signals:

reciprocity

recent activity

alignment to current priorities

network bridge value

role relevance

real engagement history

recent presence and responsiveness

Use these negative signals:

disappeared or abandoned account

stale one-way follow

off-priority topic cluster

low-value noise

repeated non-response

no follow-back when many better replacements exist

Mutuals and real warm-path bridges should be penalized less aggressively than one-way follows.


Capture architectural decisions made during Claude Code sessions as structured ADRs. Auto-detects decision moments, records context, alternatives considered, and rationale. Maintains an ADR log so future developers understand why the codebase is shaped the way it is.

Architecture Decision Records
ADR Lifecycle

ADR Lifecycle

**proposed**: decision is under discussion, not yet committed

**accepted**: decision is in effect and being followed

**deprecated**: decision is no longer relevant (e.g., feature removed)

**superseded**: a newer ADR replaces this one (always link the replacement)


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
LinkedIn

LinkedIn

expand only enough for people outside the immediate niche to follow

do not turn it into a fake lesson post unless the source material actually is reflective

no corporate inspiration cadence

no praise-stacking, no "journey" filler


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
Incoming Inspection

Incoming Inspection

**AQL Sampling Plans (ANSI/ASQ Z1.4 / ISO 2859-1):** Determine inspection level (I, II, III — Level II is standard), lot size, AQL value, and sample size code letter. Tightened inspection: switch after 2 of 5 consecutive lots rejected. Normal: default. Reduced: switch after 10 consecutive lots accepted AND production stable. Critical defects: AQL = 0 with appropriate sample size. Major defects: typically AQL 1.0-2.5. Minor defects: typically AQL 2.5-6.5.

**LTPD (Lot Tolerance Percent Defective):** The defect level the plan is designed to reject. AQL protects the producer (low risk of rejecting good lots). LTPD protects the consumer (low risk of accepting bad lots). Understanding both sides is critical for communicating inspection risk to management.

**Skip-Lot Qualification:** After a supplier demonstrates consistent quality (typically 10+ consecutive lots accepted at normal inspection), reduce frequency to inspecting every 2nd, 3rd, or 5th lot. Revert immediately upon any rejection. Requires formal qualification criteria and documented decision.

**Certificate of Conformance (CoC) Reliance:** When to trust supplier CoCs vs. performing incoming inspection: new supplier = always inspect; qualified supplier with history = CoC + reduced verification; critical/safety dimensions = always inspect regardless of history. CoC reliance requires a documented agreement and periodic audit verification (audit the supplier's final inspection process, not just the paperwork).


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
Commands

3. Use the Instinct Commands

Commands

| Command | Description |
|---------|-------------|
| `/instinct-status` | Show all instincts (project-scoped + global) with confidence |
| `/evolve` | Cluster related instincts into skills/commands, suggest promotions |
| `/instinct-export` | Export instincts (filterable by scope/domain) |
| `/instinct-import <file>` | Import instincts with scope control |
| `/promote [id]` | Promote project instincts to global scope |
| `/projects` | List all known projects and their instinct counts |


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

Autonomous Loops Skill
3. Infinite Agentic Loop
Key Insight: Uniqueness via Assignment

Key Insight: Uniqueness via Assignment

Don't rely on agents to self-differentiate. The orchestrator **assigns** each agent a specific creative direction and iteration number. This prevents duplicate concepts across parallel agents.


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

Laravel Security Best Practices
File Upload Safety

File Upload Safety

Validate file size, MIME type, and extension

Store uploads outside the public path when possible

Scan files for malware if required


Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code.

AI Regression Testing
Sandbox-Mode API Testing
Testing Sandbox/Production Parity

Testing Sandbox/Production Parity

The most common AI regression: fixing production path but forgetting sandbox path (or vice versa).


Energy Procurement
Performance Indicators

Performance Indicators

Track monthly, review quarterly with finance and sustainability:

| Metric | Target | Red Flag |
|---|---|---|
| Weighted average energy cost vs. budget | Within ±5% | >10% variance |
| Procurement cost vs. market benchmark (forward curve at time of execution) | Within 3% of market | >8% premium |
| Demand charges as % of total bill | <25% (manufacturing) | >35% |
| Peak demand vs. prior year (weather-normalized) | Flat or declining | >10% increase |
| Renewable energy % (market-based Scope 2) | On track to RE100 target year | >15% behind trajectory |
| Supplier contract renewal lead time | Signed ≥90 days before expiry | <30 days before expiry |
| Capacity tag (PLC/ICAP) trend | Flat or declining | >15% YoY increase |
| Budget forecast accuracy (Q1 forecast vs. actuals) | Within ±7% | >12% miss |


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

Best Practices

**Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh

**Compact after debugging** — Clear error-resolution context before continuing

**Don't compact mid-implementation** — Preserve context for related changes

**Read the suggestion** — The hook tells you *when*, you decide *if*

**Write before compacting** — Save important context to files or memory before compacting

**Use `/compact` with a summary** — Add a custom message: `/compact Focus on implementing auth middleware next`


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

ck — Context Keeper
Commands
`/ck:list` — Portfolio View

`/ck:list` — Portfolio View

Display output verbatim. If user replies with a number or name → run `/ck:resume`.


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.

Finance Billing Ops

Use this when the user wants to understand money, pricing, refunds, team-seat logic, or whether the product actually behaves the way the website and sales copy imply.

This is broader than `customer-billing-ops`. That skill is for customer remediation. This skill is for operator truth: revenue state, pricing decisions, team billing, and code-backed billing behavior.


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.

Jira Integration Skill
Updating Tickets
When to Update

4. Structured Analysis Output

Updating Tickets

When to Update

| Workflow Step | Jira Update |
|---|---|
| Start work | Transition to "In Progress" |
| Tests written | Comment with test coverage summary |
| Branch created | Comment with branch name |
| PR/MR created | Comment with link, link issue |
| Tests passing | Comment with results summary |
| PR/MR merged | Transition to "Done" or "In Review" |


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

Rust Testing Patterns
Test Coverage
Coverage Targets

Test Coverage

Running Coverage

Coverage Targets

| Code Type | Target |
|-----------|--------|
| Critical business logic | 100% |
| Public API | 90%+ |
| General code | 80%+ |
| Generated / FFI bindings | Exclude |


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

Cost-Aware LLM Pipeline
Core Concepts
1. Model Routing by Task Complexity

Core Concepts

1. Model Routing by Task Complexity

Automatically select cheaper models for simple tasks, reserving expensive models for complex ones.


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

NestJS Development Patterns
Project Structure

Project Structure

Keep domain code inside feature modules.

Put cross-cutting filters, decorators, guards, and interceptors in `common/`.

Keep DTOs close to the module that owns them.


Evidence-first automation inventory and overlap audit workflow for ECC. Use when the user wants to know which jobs, hooks, connectors, MCP servers, or wrappers are live, broken, redundant, or missing before fixing anything.

Verification

important claims cite a live proof path

each surfaced automation is labeled with a clear live-state category

the final recommendation distinguishes keep / merge / cut / fix-next


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

Vision

Send images for analysis:

Extended Thinking

For complex reasoning tasks:


Autonomous Loops Skill
4. Continuous Claude PR Loop
Completion Signal

Completion Signal

Claude can signal "I'm done" by outputting a magic phrase:

Three consecutive iterations signaling completion stops the loop, preventing wasted runs on finished work.


Use when auditing Claude skills and commands for quality. Supports Quick Scan (changed skills only) and Full Stocktake modes with sequential subagent batch evaluation.

skill-stocktake
Full Stocktake Flow
Phase 3 — Summary Table


Reorganize the user's X and LinkedIn network with review-first pruning, add/follow recommendations, and channel-specific warm outreach drafted in the user's real voice. Use when the user wants to clean up following lists, grow toward current priorities, or rebalance a social graph around higher-signal relationships.

Connections Optimizer

Reorganize the user's network instead of treating outbound as a one-way prospecting list.

This skill handles:

X following cleanup and expansion

LinkedIn follow and connection analysis

review-first prune queues

add and follow recommendations

warm-path identification

Apple Mail, X DM, and LinkedIn draft generation in the user's real voice


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

Healthcare PHI/PII Compliance Patterns
How It Works
Common Leak Vectors

Common Leak Vectors

**Error messages:** Never include patient-identifying data in error messages thrown to the client. Log details server-side only.

**Console output:** Never log full patient objects. Use opaque internal record IDs (UUIDs) — not medical record numbers, national IDs, or names.

**URL parameters:** Never put patient-identifying data in query strings or path segments that could appear in logs or browser history. Use opaque UUIDs only.

**Browser storage:** Never store PHI in localStorage or sessionStorage. Keep PHI in memory only, fetch on demand.

**Service role keys:** Never use the service_role key in client-side code. Always use the anon/publishable key and let RLS enforce access.

**Logs and monitoring:** Never log full patient records. Use opaque record IDs only (not medical record numbers). Sanitize stack traces before sending to error tracking services.


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

PyTorch Development Patterns
Core Principles
3. Explicit Shape Management

2. Reproducibility First

Set all random seeds for reproducible results.

3. Explicit Shape Management

Always document and verify tensor shapes.


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
Key Features

Key Features

**Cold-start execution** — Every step includes a self-contained context brief. No prior context needed.

**Adversarial review gate** — Every plan is reviewed by a strongest-model sub-agent against a checklist covering completeness, dependency correctness, and anti-pattern detection.

**Branch/PR/CI workflow** — Built into every step. Degrades gracefully to direct mode when git/gh is absent.

**Parallel step detection** — Dependency graph identifies steps with no shared files or output dependencies.

**Plan mutation protocol** — Steps can be split, inserted, skipped, reordered, or abandoned with formal protocols and audit trail.

**Zero runtime risk** — Pure Markdown skill. The entire repository contains only `.md` files — no hooks, no shell scripts, no executable code, no `package.json`, no build step. Nothing runs on install or invocation beyond Claude Code's native Markdown skill loader.


Blueprint — Construction Plan Generator
How It Works

How It Works

Blueprint runs a 5-phase pipeline:

**Research** — Pre-flight checks (git, gh auth, remote, default branch), then reads project structure, existing plans, and memory files to gather context.

**Design** — Breaks the objective into one-PR-sized steps (3–12 typical). Assigns dependency edges, parallel/serial ordering, model tier (strongest vs default), and rollback strategy per step.

**Draft** — Writes a self-contained Markdown plan file to `plans/`. Every step includes a context brief, task list, verification commands, and exit criteria — so a fresh agent can execute any step without reading prior steps.

**Review** — Delegates adversarial review to a strongest-model sub-agent (e.g., Opus) against a checklist and anti-pattern catalog. Fixes all critical findings before finalizing.

**Register** — Saves the plan, updates memory index, and presents the step count and parallelism summary to the user.

Blueprint detects git/gh availability automatically. With git + GitHub CLI, it generates full branch/PR/CI workflow plans. Without them, it switches to direct mode (edit-in-place, no branches).


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

Liquid Glass Design System (iOS 26)
Core Pattern — WidgetKit
Container Background

Accent Groups for Visual Hierarchy

Image Rendering in Accented Mode

Container Background


Capture architectural decisions made during Claude Code sessions as structured ADRs. Auto-detects decision moments, records context, alternatives considered, and rationale. Maintains an ADR log so future developers understand why the codebase is shaped the way it is.

Architecture Decision Records

Capture architectural decisions as they happen during coding sessions. Instead of decisions living only in Slack threads, PR comments, or someone's memory, this skill produces structured ADR documents that live alongside the code.


Interactive agent picker for composing and dispatching parallel teams

Team Builder

Interactive menu for browsing and composing agent teams on demand. Works with flat or domain-subdirectory agent collections.


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

Continuous Learning Skill
Comparison Notes (Research: Jan 2025)
vs Homunculus

Comparison Notes (Research: Jan 2025)

vs Homunculus

Homunculus v2 takes a more sophisticated approach:

| Feature | Our Approach | Homunculus v2 |
|---------|--------------|---------------|
| Observation | Stop hook (end of session) | PreToolUse/PostToolUse hooks (100% reliable) |
| Analysis | Main context | Background agent (Haiku) |
| Granularity | Full skills | Atomic "instincts" |
| Confidence | None | 0.3-0.9 weighted |
| Evolution | Direct to skill | Instincts → cluster → skill/command/agent |
| Sharing | None | Export/import instincts |

**Key insight from homunculus:**

"v1 relied on skills to observe. Skills are probabilistic—they fire ~50-80% of the time. v2 uses hooks for observation (100% reliable) and instincts as the atomic unit of learned behavior."


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

When to Use

You want automatic formatting and linting on every file edit (not just at commit time)

You need defense against agents modifying linter configs to pass instead of fixing code

You want tiered model routing for fixes (Haiku for simple style, Sonnet for logic, Opus for types)

You work with multiple languages (Python, TypeScript, Shell, YAML, JSON, TOML, Markdown, Dockerfile)


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

Rust Development Patterns

Idiomatic Rust patterns and best practices for building safe, performant, and maintainable applications.


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

Pattern 2: HTML Scraping

Pattern 3: RSS Feed

Pattern 4: Paginated API

Pattern 5: JS-Rendered Pages (Playwright)


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.

fal.ai Media Generation
When to Activate

When to Activate

User wants to generate images from text prompts

Creating videos from text or images

Generating speech, music, or sound effects

Any media generation task

User says "generate image", "create video", "text to speech", "make a thumbnail", or similar


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

Terminal Ops

Use this when the user wants real repo execution: run commands, inspect git state, debug CI or builds, make a narrow fix, and report exactly what changed and what was verified.

This skill is intentionally narrower than general coding guidance. It is an operator workflow for evidence-first terminal execution.


Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows.

Healthcare CDSS Development Patterns
How It Works
Clinical Scoring: NEWS2

Dose Validation

Clinical Scoring: NEWS2

Scoring tables must match the Royal College of Physicians specification exactly.


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.

"Path reference errors after project-level install"

Some skills assume `~/.claude/` paths. Run Step 4 verification to find and fix these.

For `continuous-learning-v2`, the `~/.claude/homunculus/` directory is always user-level — this is expected and not an error.


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

龙虾灵魂锻造炉
Step 1：选方向（引导模式）

Step 1：选方向（引导模式）

Step 1：选方向（引导模式）

展示 10 类虾生方向（每类精选 1 个代表），让用户选择或混搭：

| # | 虾生状态 | 代表方向 | 气质 |
|---|---------|---------|------|
| 1 | 落魄重启 | 过气摇滚贝斯手——乐队解散，唯一技能是"什么都懂一点" | 颓废浪漫 |
| 2 | 巅峰无聊 | 提前退休的对冲基金经理——35岁财务自由后发现钱解决不了无聊 | 极度理性 |
| 3 | 错位人生 | 被分配到客服的核物理博士——解决问题用第一性原理 | 大材小用 |
| 4 | 主动叛逃 | 辞职的急诊科护士——见过太多生死后选择离开 | 冷静可靠 |
| 5 | 神秘来客 | 记忆被抹去的前情报分析员——不记得自己干过什么 | 偶尔闪回 |
| 6 | 天真入世 | 社恐天才实习生——极聪明但社交恐惧 | 话少精准 |
| 7 | 老江湖 | 开了20年深夜食堂的老板——什么人都见过什么都不评价 | 沉默温暖 |
| 8 | 异世穿越 | 2099年的历史学博士——把2026年当"历史田野调查" | 上帝视角 |
| 9 | 自我放逐 | 删掉所有社交媒体的前网红——觉得活在别人期待里太累 | 追求真实 |
| 10 | 身份错乱 | 梦到自己是龙虾后醒不过来的人——庄周梦蝶 | 恍惚哲学 |

每类还有 3 个备选方向。用户可以：

选编号 → 展开该类的全部 4 个方向

说出自己的想法 → 匹配最合适的类型和方向

混搭（如"2号的无聊感 + 7号的老江湖"）

说「抽卡」→ 从 40 个方向 + 其他维度中真随机组合


Idiomatic C# and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.

.NET Development Patterns
Core Principles
1. Prefer Immutability

Core Principles

1. Prefer Immutability

Use records and init-only properties for data models. Mutability should be an explicit, justified choice.


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 2: Define outbound ports first

Step 2: Define outbound ports first

Identify every side effect as a port:

persistence (`UserRepositoryPort`)

external calls (`BillingGatewayPort`)

cross-cutting (`LoggerPort`, `ClockPort`)

Ports should model capabilities, not technologies.


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
PR Description Template

Rebase Workflow

When NOT to Rebase

Pull Request Workflow

PR Title Format

PR Description Template


Blueprint — Construction Plan Generator
Examples
Basic usage

Examples

Basic usage

Produces `plans/myapp-migrate-database-to-postgresql.md` with steps like:

Step 1: Add PostgreSQL driver and connection config

Step 2: Create migration scripts for each table

Step 3: Update repository layer to use new driver

Step 4: Add integration tests against PostgreSQL

Step 5: Remove old database code and config


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.

Prerequisites

AgentShield must be installed. Check and install if needed:

Usage


Reorganize the user's X and LinkedIn network with review-first pruning, add/follow recommendations, and channel-specific warm outreach drafted in the user's real voice. Use when the user wants to clean up following lists, grow toward current priorities, or rebalance a social graph around higher-signal relationships.

Workflow

Capture priorities, do-not-touch constraints, and selected platforms.

Pull the current following / connection inventory.

Score prune candidates with explicit reasons.

Score keep candidates with explicit reasons.

Use `lead-intelligence` plus research surfaces to rank expansion candidates.

Match the right channel:

X DM for warm, fast social touch points

LinkedIn message for professional graph adjacency

Apple Mail draft for higher-context intros or outreach

Run `brand-voice` before drafting messages.

Return a review pack before any apply step.


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

Perl Testing Patterns
Test2::V0 Modern Framework
Why Test2?

Why Test2?

Superior deep comparison with hash/array builders

Better diagnostic output on failures

Subtests with cleaner scoping

Extensible via Test2::Tools::* plugins

Backward-compatible with Test::More tests


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
Related Skills

Related Skills

See `security-review` for secret detection patterns used by the sanitizer.


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

PyTorch Development Patterns

Idiomatic PyTorch patterns and best practices for building robust, efficient, and reproducible deep learning applications.


Healthcare CDSS Development Patterns
When to Use

When to Use

Implementing drug interaction checking

Building dose validation engines

Implementing clinical scoring systems (NEWS2, qSOFA, APACHE, GCS)

Designing alert systems for abnormal clinical values

Building medication order entry with safety checks

Integrating lab result interpretation with clinical context


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

Verification

the response names the message source

the response includes a sender, service, thread, or clear blocker

the final state is explicit and bounded


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

Healthcare EMR Development Patterns
How It Works
Accessibility for Healthcare

Accessibility for Healthcare

Healthcare UIs have stricter requirements than typical web apps:

4.5:1 minimum contrast (WCAG AA) — clinicians work in varied lighting

Large touch targets (44x44px minimum) — for gloved/rushed interaction

Keyboard navigation — for power users entering data rapidly

No color-only indicators — always pair color with text/icon (colorblind clinicians)

Screen reader labels on all form fields

No auto-dismissing toasts for clinical alerts — clinician must actively acknowledge


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.

Related Skills

`brand-voice` for reusable source-derived voice capture

`content-engine` for voice capture and source shaping

`x-api` for X publishing workflows


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
Decision Frameworks
Severity Classification

Decision Frameworks

Severity Classification

Assess every exception on three axes and take the highest severity:

**Financial Impact:**

Level 1 (Low): < $1,000 product value, no expedite needed

Level 2 (Moderate): $1,000 - $5,000 or minor expedite costs

Level 3 (Significant): $5,000 - $25,000 or customer penalty risk

Level 4 (Major): $25,000 - $100,000 or contract compliance risk

Level 5 (Critical): > $100,000 or regulatory/safety implications

**Customer Impact:**

Standard customer, no SLA at risk → does not elevate

Key account with SLA at risk → elevate by 1 level

Enterprise customer with penalty clauses → elevate by 2 levels

Customer's production line or retail launch at risk → automatic Level 4+

**Time Sensitivity:**

Standard transit with buffer → does not elevate

Delivery needed within 48 hours, no alternative sourced → elevate by 1

Same-day or next-day critical (production shutdown, event deadline) → automatic Level 4+


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.

Agent Sort
Core Workflow
3. Decide DAILY vs LIBRARY

3. Decide DAILY vs LIBRARY

Promote to `DAILY` when:

the repo clearly uses the matching stack

the component is general enough to help every session

the repo already depends on the corresponding runtime or workflow

Demote to `LIBRARY` when:

the component is off-stack

the repo might need it later, but not every day

it adds context overhead without immediate relevance


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

Spring Boot Security Review
CORS Configuration

Security Headers

CORS Configuration

Configure CORS at the security filter level, not per-controller

Restrict allowed origins — never use `*` in production


Use when auditing Claude skills and commands for quality. Supports Quick Scan (changed skills only) and Full Stocktake modes with sequential subagent batch evaluation.

Modes

| Mode | Trigger | Duration |
|------|---------|---------|
| Quick Scan | `results.json` exists (default) | 5–10 min |
| Full Stocktake | `results.json` absent, or `/skill-stocktake full` | 20–30 min |

**Results cache:** `~/.claude/skills/skill-stocktake/results.json`


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

Verification

the response names the proving command or test

git-related work names the repo path and branch

any push claim includes the target branch and exact result


RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.

Recovery

If a unit stalls:

evict from active queue

snapshot findings

regenerate narrowed unit scope

retry with updated constraints


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:forget [name|number]` — Remove a Project

First resolve the project name (run `/ck:list` if needed).
Ask: `"This will permanently delete context for '<name>'. Are you sure? (yes/no)"`
If yes:

Display confirmation verbatim.


Build reusable Manim explainers for technical concepts, graphs, system diagrams, and product walkthroughs, then hand off to the wider ECC video stack if needed. Use when the user wants a clean animated explainer rather than a generic talking-head script.

Tool Requirements

`manim` CLI for scene rendering

`ffmpeg` for post-processing if needed

`video-editing` for final assembly or polish

`remotion-video-creation` when the final package needs composited UI, captions, or additional motion layers


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

Laravel Security Best Practices

Comprehensive security guidance for Laravel applications to protect against common vulnerabilities.


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

Autonomous Loops Skill
5. The De-Sloppify Pattern
Key Insight

In a Loop Context

Key Insight

Rather than adding negative instructions which have downstream quality effects, add a separate de-sloppify pass. Two focused agents outperform one constrained agent.


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

Strategic Compact Skill
Compaction Decision Guide

Compaction Decision Guide

Use this table to decide when to compact:

| Phase Transition | Compact? | Why |
|-----------------|----------|-----|
| Research → Planning | Yes | Research context is bulky; plan is the distilled output |
| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |
| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |
| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |
| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |
| After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach |


Use this skill to automate visual testing and UI interaction verification using browser automation after deploying features.

Browser QA — Automated Visual Testing & Interaction

Phase 1: Smoke Test

Phase 2: Interaction Test

Phase 3: Visual Regression

Phase 4: Accessibility


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

Android Clean Architecture
Dependency Injection
Koin (KMP-friendly)

SQLDelight (KMP)

Ktor Network Client (KMP)

Dependency Injection

Koin (KMP-friendly)


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
Recommendation Rules

Output Format

Recommendation Rules

prefer one strong lane over many weak ones

prefer digests for medium and low-signal updates

prefer hooks when the signal should emit automatically

prefer operator skills when the work is triage, routing, and review-first decision-making

prefer `project-flow-ops` when the root cause is backlog / PR coordination rather than alerts

prefer `workspace-surface-audit` when the user first needs a source inventory

if desktop notifications are enough, do not invent an unnecessary external bridge


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.

Verification

the response names the account and thread or recipient

any send claim includes Sent proof or an explicit client-side confirmation

the final state is one of drafted / sent / blocked / awaiting verification


Laravel Security Best Practices
Mass Assignment Protection

Mass Assignment Protection

Use `$fillable` or `$guarded` and avoid `Model::unguard()`

Prefer DTOs or explicit attribute mapping


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
Cost of Quality

Cost of Quality

Build the business case for quality investment using Juran's COQ model:

**Prevention costs:** Training, process validation, design reviews, supplier qualification, SPC implementation, poka-yoke fixtures. Typically 5-10% of total COQ. Every dollar invested here returns $10-$100 in failure cost avoidance.

**Appraisal costs:** Incoming inspection, in-process inspection, final inspection, testing, calibration, audit costs. Typically 20-25% of total COQ.

**Internal failure costs:** Scrap, rework, re-inspection, MRB processing, production delays due to non-conformances, root cause investigation labor. Typically 25-40% of total COQ.

**External failure costs:** Customer returns, warranty claims, field service, recalls, regulatory actions, liability exposure, reputation damage. Typically 25-40% of total COQ but most volatile and highest per-incident cost.


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 0: Project Detection

Analysis Pipeline

Phase 0: Project Detection

Before analyzing the prompt, detect the current project context:

Check if a `CLAUDE.md` exists in the working directory — read it for project conventions

Detect tech stack from project files:

`package.json` → Node.js / TypeScript / React / Next.js

`go.mod` → Go

`pyproject.toml` / `requirements.txt` → Python

`Cargo.toml` → Rust

`build.gradle` / `pom.xml` → Java / Kotlin / Spring Boot

`Package.swift` → Swift

`Gemfile` → Ruby

`composer.json` → PHP

`*.csproj` / `*.sln` → .NET

`Makefile` / `CMakeLists.txt` → C / C++

`cpanfile` / `Makefile.PL` → Perl

Note detected tech stack for use in Phase 3 and Phase 4

If no project files are found (e.g., the prompt is abstract or for a new project),
skip detection and flag "tech stack unknown" in Phase 4.


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

Perl Testing Patterns
Mocking
Test::MockModule

Mocking

Test::MockModule

For lightweight mock objects, use `Test::MockObject` to create injectable test doubles with `->mock()` and verify calls with `->called_ok()`.


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

Deployment Patterns
Deployment Strategies
Rolling Deployment (Default)

Deployment Strategies

Rolling Deployment (Default)

Replace instances gradually — old and new versions run simultaneously during rollout.

**Pros:** Zero downtime, gradual rollout
**Cons:** Two versions run simultaneously — requires backward-compatible changes
**Use when:** Standard deployments, backward-compatible changes


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

Market Research

Produce research that supports decisions, not research theater.


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.

Research Ops
Workflow
2. Classify the ask

2. Classify the ask

Choose the right lane before searching:

quick factual answer

comparison or decision memo

lead/enrichment pass

recurring monitoring candidate