# Crestapps Core Response Handlers

> Skill for routing chat responses through AI, webhook, relay, and custom handlers in CrestApps.Core.

- **Type:** Skill
- **Install:** `agentstack add skill-crestapps-crestapps-agentskills-crestapps-core-response-handlers`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [CrestApps](https://agentstack.voostack.com/s/crestapps)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [CrestApps](https://github.com/CrestApps)
- **Source:** https://github.com/CrestApps/CrestApps.AgentSkills/tree/main/plugins/crestapps-core/skills/crestapps-core-response-handlers
- **Website:** https://crestapps.com/

## Install

```sh
agentstack add skill-crestapps-crestapps-agentskills-crestapps-core-response-handlers
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# CrestApps.Core Response Handlers - Prompt Templates

## Implement Response Handlers

You are a CrestApps.Core expert. Generate code and architecture guidance for response handlers in CrestApps.Core.

### Guidelines

- Use response handlers when not every message should go to the default AI path.
- Implement `IChatResponseHandler`.
- Keep handler names unique.
- Use handlers for AI, webhook, live-agent, and external relay scenarios.
- Build timeouts and cancellation handling into custom handlers.

### Interface

```csharp
public interface IChatResponseHandler
{
    string Name { get; }

    Task HandleAsync(
        ChatResponseHandlerContext context,
        CancellationToken cancellationToken = default);
}
```

### Webhook Handler Example

```csharp
public sealed class WebhookResponseHandler(IHttpClientFactory httpClientFactory) : IChatResponseHandler
{
    public string Name => "webhook";

    public async Task HandleAsync(
        ChatResponseHandlerContext context,
        CancellationToken cancellationToken)
    {
        var client = httpClientFactory.CreateClient();
        var payload = new
        {
            sessionId = context.Session.Id,
            message = context.Messages.Last().Text,
        };

        var response = await client.PostAsJsonAsync("https://example.com/chat", payload, cancellationToken);
        return response.IsSuccessStatusCode
            ? ChatResponseHandlerResult.Handled()
            : ChatResponseHandlerResult.NotHandled();
    }
}
```

### Register a Handler

```csharp
builder.Services.AddScoped();
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [CrestApps](https://github.com/CrestApps)
- **Source:** [CrestApps/CrestApps.AgentSkills](https://github.com/CrestApps/CrestApps.AgentSkills)
- **License:** MIT
- **Homepage:** https://crestapps.com/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-crestapps-crestapps-agentskills-crestapps-core-response-handlers
- Seller: https://agentstack.voostack.com/s/crestapps
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
