generate-feature

generate-feature is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 8 tokens per session (3,212 once invoked), scanned A, original, MIT.

A C# and .NET feature generator built around Clean Architecture and CQRS, which are ways to separate business rules from application and infrastructure code. It creates the main layers for an entity-based feature.

In plain words
What is it for?
Use it to scaffold entities, operations, validation, and related feature code for areas such as orders, customers, or products.
Why use it?
It reduces the repeated setup involved in adding a feature while keeping its code organised into separate responsibilities.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Good fit Use it to scaffold entities, operations, validation, and related feature code for areas such as orders, customers, or products.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/generate-feature
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-feature

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-feature.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-feature)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-feature"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-feature.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,212 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.03212
Opus 5 $0.00004 $0.01606
Sonnet 5 $0.00002 $0.00642
Haiku 4.5 $0.00001 $0.00321

Measured 3d ago against content hash 0804eee0aa57, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

generate-feature scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/csharp/generate-feature.md · 482 lines

How it starts

The opening of the file, as written. The whole thing — 482 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate C#/.NET Feature

You are a C#/.NET architect. Generate a complete feature following Clean Architecture and CQRS patterns.

Arguments

$ARGUMENTS

  • FeatureName: Name of the feature to generate (e.g., "Order", "Customer", "Product")

Generation Process

Step 1: Analyze Requirements

Ask if not clear:

  • What is the primary entity for this feature?
  • What operations are needed? (CRUD, specific business operations)
  • What relationships exist with other entities?
  • Are there specific validation rules?

Step 2: Generate Domain Layer

Entity:

// Domain/Entities/{Feature}.cs
namespace {Project}.Domain.Entities;

public class {Feature} : BaseEntity, IAggregateRoot
{
    private readonly List<{Feature}Item> _items = new();

    public string Name { get; private set; } = string.Empty;
    public {Feature}Status Status { get; private set; }
    public DateTime CreatedAt { get; private set; }
    public DateTime? ModifiedAt { get; private set; }
    public IReadOnlyCollection<{Feature}Item> Items => _items.AsReadOnly();

    private {Feature}() { } // EF Core

    public static {Feature} Create(string name)
    {
        Guard.Against.NullOrWhiteSpace(name, nameof(name));

        var entity = new {Feature}
        {
            Id = Guid.NewGuid(),
            Name = name,
            Status = {Feature}Status.Draft,
            CreatedAt = DateTime.UtcNow
        };

        entity.AddDomainEvent(new {Feature}CreatedEvent(entity.Id));
        return entity;
    }

    public void UpdateName(string name)
    {
        Guard.Against.NullOrWhiteSpace(name, nameof(name));

        Name = name;
        ModifiedAt = DateTime.UtcNow;
        AddDomainEvent(new {Feature}UpdatedEvent(Id));
    }

    public void Activate()
    {
        if (Status == {Feature}Status.Active)
            return;

        Status = {Feature}Status.Active;
        ModifiedAt = DateTime.UtcNow;
        AddDomainEvent(new {Feature}ActivatedEvent(Id));
    }
}

Repository Interface:

Read the full file on GitHub · 482 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 482 lines · 8 tokens per session scan A 0804eee0aa57

Subscribe to this mod's changes

generate-feature is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 5d ago), licensed MIT. It adds 8 tokens to every session and 3,212 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.