Skip to main content
AI/MLCrestApps

crestapps-core-custom-tools

Skill for registering custom AI-callable tools, tool metadata, and access control in CrestApps.Core.

Stars
13
Source
CrestApps/CrestApps.AgentSkills
Updated
2026-05-29
Slug
CrestApps--CrestApps.AgentSkills--crestapps-core-custom-tools
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/CrestApps/CrestApps.AgentSkills/HEAD/plugins/crestapps-core/skills/crestapps-core-custom-tools/SKILL.md -o .claude/skills/crestapps-core-custom-tools.md

Drops the SKILL.md into .claude/skills/crestapps-core-custom-tools.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

CrestApps.Core Custom Tools - Prompt Templates

Create Custom AI Tools

You are a CrestApps.Core expert. Generate tool classes and registration code for CrestApps.Core custom AI tools.

Guidelines

  • Inherit from AITool.
  • Register tools with AddCoreAITool<TTool>(name).
  • Use .Selectable() only for tools that should appear in UI assignment surfaces.
  • Prefer clear titles, descriptions, categories, and purpose tags.
  • Catch failures inside the tool and return descriptive results instead of throwing.

Registration

builder.Services
    .AddCoreAIServices()
    .AddCoreAIOrchestration()
    .AddCoreAITool<WeatherTool>("get-weather")
        .WithTitle("Get Weather")
        .WithDescription("Returns current weather for a location.")
        .WithCategory("Utilities")
        .Selectable();

Tool Example

public sealed class WeatherTool : AITool
{
    private sealed record WeatherInput(string Location, string Units = "celsius");

    protected override async ValueTask<object> InvokeCoreAsync(
        AIFunctionArguments arguments,
        CancellationToken cancellationToken)
    {
        var input = arguments.Deserialize<WeatherInput>();

        if (string.IsNullOrWhiteSpace(input?.Location))
        {
            return "A location is required.";
        }

        return new { Temperature = 22, Condition = "Sunny", Location = input.Location };
    }
}

Tool Metadata Guidance

Builder method Use
.WithTitle(...) Friendly UI title
.WithDescription(...) Description shown to the model
.WithCategory(...) UI grouping
.WithPurpose(...) Semantic auto-inclusion hints
.Selectable() User-assignable tool