Check Context Communication logo

Check Context Communication

Community
dykyi-roman
check-context-communication

Audits Bounded Context communication patterns. Checks Context Map relationships (Shared Kernel, ACL, Open Host), event vs direct calls, and anti-corruption layer usage.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill namecheck-context-communication
Stars
98
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dykyi-roman on GitHub. Read the source before you install it.

Installation

Install the Check Context Communication AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/check-context-communication .claude/skills/check-context-communication
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Check Context Communication in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Check Context Communication on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Check Context Communication is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Context Communication Audit

Analyze PHP code for proper Bounded Context communication following DDD Context Map patterns.

Detection Patterns

1. Direct Cross-Context Dependency

php
// CRITICAL: Order context directly uses User context internals
namespace App\Order\Application;

use App\User\Domain\User;           // Cross-context import!
use App\User\Domain\UserRepository;  // Cross-context import!

final readonly class CreateOrderUseCase
{
    public function __construct(
        private UserRepository $userRepo, // Depends on another context's repository
    ) {}

    public function execute(CreateOrderCommand $command): void
    {
        $user = $this->userRepo->find($command->userId());
        $order = Order::create($user->email(), $user->shippingAddress());
        // Tight coupling — if User changes, Order breaks
    }
}

// CORRECT: Anti-Corruption Layer
namespace App\Order\Infrastructure\ACL;

final readonly class UserProfileAdapter implements OrderContext\UserProfilePort
{
    public function __construct(
        private UserContextApi $userApi, // Interface, not concrete
    ) {}

    public function getShippingInfo(UserId $userId): ShippingInfo
    {
        $userData = $this->userApi->getUserProfile($userId);
        return new ShippingInfo(  // Map to Order context's own model
            address: Address::fromArray($userData['address']),
            name: $userData['name'],
        );
    }
}

2. Shared Kernel Misuse

php
// ANTIPATTERN: Too much shared between contexts
namespace App\Shared\Domain;

class User { }         // Full entity in Shared — too much!
class Order { }        // Full entity in Shared — too much!
class Money { }        // OK — genuine shared concept
class Currency { }     // OK — genuine shared concept
class EventId { }      // OK — infrastructure concern

// CORRECT: Minimal Shared Kernel
namespace App\Shared\Domain;

// Only truly shared, stable concepts
final readonly class Money { }
final readonly class Currency { }
final readonly class EventId { }
final readonly class AggregateId { }

3. Synchronous Cross-Context Call

php
// ANTIPATTERN: Synchronous call between contexts
namespace App\Order\Application;

final readonly class CompleteOrderUseCase
{
    public function execute(CompleteOrderCommand $command): void
    {
        $order = $this->orderRepo->find($command->orderId());
        $order->complete();
        $this->orderRepo->save($order);

        // Synchronous cross-context calls!
        $this->inventoryService->reserve($order->items());     // Inventory context
        $this->paymentService->capture($order->paymentId());   // Payment context
        $this->shippingService->schedule($order->address());   // Shipping context
        // If any fails → partial state + coupling
    }
}

// CORRECT: Event-driven cross-context communication
final readonly class CompleteOrderUseCase
{
    public function execute(CompleteOrderCommand $command): void
    {
        $order = $this->orderRepo->find($command->orderId());
        $order->complete(); // Records OrderCompleted domain event
        $this->orderRepo->save($order);
        // Events dispatched asynchronously:
        // OrderCompleted → InventoryContext (reserve)
        // OrderCompleted → PaymentContext (capture)
        // OrderCompleted → ShippingContext (schedule)
    }
}

4. Missing Anti-Corruption Layer

php
// ANTIPATTERN: External API model used directly in domain
namespace App\Order\Domain;

use Stripe\PaymentIntent;  // External API model in domain!

final class Payment
{
    public function __construct(
        private PaymentIntent $stripePayment, // Stripe model in domain
    ) {}

    public function isSuccessful(): bool
    {
        return $this->stripePayment->status === 'succeeded'; // Coupled to Stripe
    }
}

// CORRECT: ACL translates external to domain
namespace App\Order\Infrastructure\ACL;

final readonly class StripePaymentAdapter implements PaymentGateway
{
    public function charge(Money $amount): PaymentResult
    {
        $intent = $this->stripe->paymentIntents->create([...]);
        return PaymentResult::from(   // Domain model
            status: $this->mapStatus($intent->status),
            transactionId: new TransactionId($intent->id),
        );
    }

    private function mapStatus(string $stripeStatus): PaymentStatus
    {
        return match ($stripeStatus) {
            'succeeded' => PaymentStatus::COMPLETED,
            'requires_action' => PaymentStatus::PENDING,
            default => PaymentStatus::FAILED,
        };
    }
}

5. Event Leaking Internal State

php
// ANTIPATTERN: Domain event exposes aggregate internals
final readonly class OrderCompleted implements DomainEvent
{
    public function __construct(
        public Order $order,  // Full aggregate in event!
        // Other contexts can access all internal state
    ) {}
}

// CORRECT: Event contains only necessary data
final readonly class OrderCompleted implements DomainEvent
{
    public function __construct(
        public OrderId $orderId,
        public UserId $userId,
        public Money $total,
        public \DateTimeImmutable $occurredAt,
    ) {}
}

6. No Context Boundary in Namespace

php
// ANTIPATTERN: Flat structure without context boundaries
src/
├── Entity/
│   ├── User.php
│   ├── Order.php
│   └── Product.php     // All entities mixed together!
├── Repository/
│   ├── UserRepository.php
│   └── OrderRepository.php

// CORRECT: Bounded Context boundaries in namespace
src/
├── UserManagement/     // Bounded Context
│   ├── Domain/
│   ├── Application/
│   └── Infrastructure/
├── OrderProcessing/    // Bounded Context
│   ├── Domain/
│   ├── Application/
│   └── Infrastructure/

Grep Patterns

bash
# Cross-context imports
Grep: "use App\\\\[A-Z][a-z]+\\\\Domain" --glob "**/Application/**/*.php"
# Check if import is from different context than file's context

# Direct service calls across contexts
Grep: "Service->|Client->|Api->" --glob "**/Application/**/*UseCase.php"

# External models in domain
Grep: "use Stripe\\\\|use Twilio\\\\|use AWS\\\\|use Google\\\\" --glob "**/Domain/**/*.php"

# Full aggregate in events
Grep: "public.*Entity.*\$|public.*Aggregate.*\$" --glob "**/Domain/**/*Event*.php"

# Shared Kernel size
Glob: **/Shared/Domain/**/*.php
# Count files — if > 10, probably too much shared

# Missing ACL
Grep: "implements.*Port|implements.*Gateway" --glob "**/Infrastructure/ACL/**/*.php"

Severity Classification

PatternSeverity
Direct cross-context domain dependency🔴 Critical
External model in domain layer🔴 Critical
Synchronous cross-context calls🟠 Major
Oversized Shared Kernel🟠 Major
Event leaking aggregate internals🟠 Major
Missing ACL for external service🟡 Minor

Context Map Patterns Reference

PatternWhen to Use
Shared KernelTwo teams co-own small shared model (Money, EventId)
Anti-Corruption LayerProtect domain from external/legacy models
Open Host ServiceProvide well-defined API for consumers
Published LanguageShared event schema (JSON Schema, Protobuf)
Customer/SupplierUpstream provides, downstream consumes
ConformistDownstream adopts upstream model (not recommended)

Output Format

markdown
### Context Communication: [Description]

**Severity:** 🔴/🟠/🟡
**Location:** `file.php:line`
**Contexts:** [Source Context] → [Target Context]
**Pattern Violated:** [Context Map pattern]

**Issue:**
[Description of the communication violation]

**Impact:**
- Coupling between bounded contexts
- Cannot deploy/evolve contexts independently

**Code:**
```php
// Cross-context violation

Fix:

php
// Proper context communication

Frequently asked questions

What does the Check Context Communication AI skill do?

Audits Bounded Context communication patterns. Checks Context Map relationships (Shared Kernel, ACL, Open Host), event vs direct calls, and anti-corruption layer usage.

Why use Check Context Communication on TypingMind?

Because you install it once and use it with any model. Check Context Communication is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Check Context Communication in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/check-context-communication. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Check Context Communication?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Check Context Communication?

As many as you like. As long as a model supports skills, you can use Check Context Communication with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Check Context Communication AI skill free?

Yes. It is published on GitHub by dykyi-roman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇