.claude/skills/gen-skill/SKILL.md
Use when generating a new skill document for the Truenorth KB — knowledge artifacts that provide domain-specific guidance, templates, patterns, or procedures. Invoked by the Apex Orchestrator in Create mode, or directly when the user asks to create a skill, add a how-to guide, scaffold a best-practices document, or register a new knowledge artifact. Produces a fully compliant SKILL.md with problem statement, context, procedure, examples, and checklist. Domain: KB Evolution, AI Architecture. Level: Advanced. Tags: meta, kb-evolution, skill-generation, apex.
npx skillsauth add klod68/littlerae gen-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The knowledge base grows when new domain guidance, templates, or best-practice procedures need to be captured as reusable skill artifacts. Without a schema and quality checklist, generated skills are inconsistent, incomplete, or duplicate existing guidance.
skill| Type | Purpose | Invoked by | |---|---|---| | Skill | Provides knowledge, templates, procedures, or patterns | An agent reads it to gain domain knowledge | | Agent | Executes a multi-step task or coordinates other agents | The orchestration pipeline via the task tool |
Choose skill when the artifact is knowledge to apply, not behavior to execute.
Choose agent when the artifact needs to run as a tool-calling, decision-making entity.
If unsure: if the thing you are documenting is a step-by-step procedure that an agent reads and follows, it is a skill. If it needs to call other tools or sub-agents autonomously, it is an agent.
Skills fall into these categories. Identifying the category guides the structure:
| Category | Description | Examples |
|---|---|---|
| Procedure | Step-by-step how-to for a bounded technical task | gen-component, gen-cqrs-handler |
| Pattern | Design pattern or architectural approach with examples | agentic-workflow-patterns, caching-strategy |
| Configuration | Setup, wiring, or registration guidance | gen-di-composition-root, embedded-resource-configuration |
| Analysis | Methodology for investigating or diagnosing a domain | debug-ef-query, ef-query-optimization |
| Decision-guide | Framework for choosing among alternatives | api-versioning-strategy, dependency-injection-lifetime |
| Template | Scaffold with slots for parameterized generation | gen-gherkin-feature, gen-use-case |
| Knowledge | Domain reference, taxonomy, or standards summary | agentic-workflow-patterns |
Every SKILL.md must contain these sections. Missing required sections fails Tier 1 quality gate.
---
name: {skill-name-in-kebab-case}
description: "{One to three sentences. First: what the skill covers. Second: when to invoke it.
Third (optional): related skills or constraints. Quotable as a tool description — concrete,
specific trigger signals.}"
---
# {Skill Title in Title Case}
## Problem
{1–2 paragraphs describing the problem this skill solves. Written from the consumer's
perspective: what goes wrong without this guidance? What mistake does this skill prevent?}
## When to Use
{Bulleted list of conditions that indicate this skill applies. Include:
- Specific task types or user requests
- Keywords that signal this skill
- Negative conditions (when NOT to use this skill)}
---
## {Core content section — title matches the category}
{The main body. Structure depends on category:
PROCEDURE skills: numbered steps with code examples.
PATTERN skills: context, pattern description, code skeleton, trade-offs table.
CONFIGURATION: setup steps with complete, compilable code snippets.
ANALYSIS: diagnostic steps, what to look for, how to interpret findings.
DECISION-GUIDE: decision matrix table with criteria and options.
TEMPLATE: the template body with ${N:placeholder} slots and fill instructions.
KNOWLEDGE: taxonomy, reference table, or conceptual model.}
---
## Examples
{2–4 concrete examples. Each example:
- States the scenario in one sentence
- Shows input / output or before / after code
- Highlights the key principle the example demonstrates}
---
## Related Skills
- `{skill-slug}` — {one-sentence description of the relationship}
- `{skill-slug}` — {one-sentence description of the relationship}
name frontmatter)gen-cqrs-handler, caching-strategy, api-versioning-strategygen-{thing} — gen-component, gen-repository{topic}-{qualifier} — circuit-breaker-state-machinemy-skill, new-skill, skill-for-X (too vague)gen-complex-thing-v2 (split the concern instead)KB/shared/skills/{skill-id}/
└── SKILL.md ← primary file; all instructional content lives here
Default: Everything in SKILL.md. This is the correct choice for the vast majority
of skills.
Exception — Reference Pattern (ecosystem KB only): Skills in KB/shared/skills/ may
use optional references/ sub-directories for large static content (≥5KB of verbatim
templates, schemas, or scaffolds that the agent copies rather than interprets). Sub-files
deploy correctly via ai-context new but are NOT included in ai-context export or
ai-context add. See skill-authoring-patterns for the full decision framework.
KB/shared/skills/{skill-id}/
├── SKILL.md ← instructions (always required)
└── references/ ← optional; large verbatim content only
└── template.md
description frontmatter... ellipsis in runnable blocks)// TODO: only for logic the caller must implement, never as a placeholder for
missing contentskill-authoring-patterns for the distinction between illustrative and few-shot
examples.skill-authoring-patterns for the full decision framework:
references/. Use for templates
≥5KB in ecosystem KB skills only.## Examples). Use for
transformation/generation skills where examples outperform verbose rules.ai-context/skills/) for imported skills that may already
cover the gap. If a matching imported skill exists, do not generate — recommend
using the existing import instead.ai-context/.imports.json for provenance of previously imported skillsdescription frontmatter first — it must be quotable as a tool
description before the body is writtenBefore creating a new skill, verify it does not duplicate an existing one:
| New skill covers... | Check against... |
|---|---|
| Generating a component | gen-component |
| Generating a CQRS handler | gen-cqrs-handler |
| Generating a repository | gen-repository |
| Generating a hosted/background service | gen-hosted-service |
| Generating a minimal API endpoint | gen-minimal-api-endpoint |
| Generating a SignalR hub | gen-signalr-hub |
| Generating options/settings class | gen-options-class |
| Generating DI composition root | gen-di-composition-root |
| Generating a Blazor demo site | gen-blazor-demo-site |
| Generating middleware | gen-middleware |
| Generating a test class | gen-test-class |
| Generating a use case document | gen-use-case |
| Generating a user story | gen-user-story |
| Generating a Gherkin feature | gen-gherkin-feature |
| Generating a service interface | gen-service-interface |
| Generating a factory class | gen-factory-class |
| Generating global usings | gen-global-usings |
| Generating scoped instructions | gen-scoped-instructions |
| Generating a worker service | gen-worker-service |
| Generating resilience policies | gen-resilience-policy |
| Generating embedded config loader | gen-embedded-config-loader |
| Generating in-memory demo service | gen-in-memory-demo-service |
| Generating copilot instructions | gen-copilot-instructions, gen-verbose-copilot-instructions |
| Generating an agent | gen-agent |
| Generating a skill | gen-skill |
| New skill covers... | Check against... |
|---|---|
| Code review checklists | review-code |
| Security review | review-security |
| Performance review | review-performance |
| Contract/DbC review | review-contracts |
| Design fidelity review | review-design-fidelity |
| Requirements fidelity review | review-requirements-fidelity |
| Maintainability review | review-maintainability |
| Testability review | review-testability |
| API surface review | review-api-surface |
| DI graph review | review-di-graph |
| Library architecture review | review-library-architecture |
| NuGet packaging review | review-nuget-packaging |
| Unix philosophy review | review-unix-philosophy |
| New skill covers... | Check against... |
|---|---|
| Agentic workflow selection | agentic-workflow-patterns |
| Background work / queues | background-hosted-service |
| Caching patterns | caching-strategy |
| Circuit breaker / retry | circuit-breaker-state-machine |
| Criteria/filter objects | criteria-pattern |
| Domain event dispatch | domain-event-dispatch |
| Result object pattern | result-object-pattern |
| Specification pattern | specification-pattern |
| Outbox pattern | outbox-pattern |
| Bulk operations / batching | bulk-operation-batching |
| Concurrent collections / telemetry | analytics-concurrent-collections |
| API versioning | api-versioning-strategy |
| DI lifetime selection | dependency-injection-lifetime |
| Feature flags | feature-flag-management |
| Guard clause validation | guard-clause-validation |
| Interceptor pipelines | interceptor-pipeline |
| Internal-by-default library design | internal-by-default-library-design |
| Pagination strategies | pagination-cursor-offset |
| Retry / exponential backoff | retry-exponential-backoff |
| Strongly typed IDs | strongly-typed-id |
| New skill covers... | Check against... |
|---|---|
| Embedded resource configuration | embedded-resource-configuration |
| EF Core query optimization | ef-query-optimization, debug-ef-query |
| Multi-TFM NuGet packaging | multi-tfm-nuget-packaging |
| CI/CD pipelines | multi-stage-cicd-pipeline |
| OpenTelemetry setup | opentelemetry-setup |
| Distributed logging / correlation | distributed-logging-correlation |
| Health check endpoints | health-check-endpoint |
| Persistence layer implementation | implement-persistence-layer |
| Localization / resource files | localization-resource-files |
| Middleware pipeline ordering | middleware-pipeline-ordering |
| Rate limiting | rate-limiting-middleware |
| New skill covers... | Check against... |
|---|---|
| AI chatbot knowledge injection | ai-chatbot-contextual-knowledge |
| Streaming AI responses | streaming-ai-responses |
| LLM evaluation | llm-evaluation |
| New skill covers... | Check against... |
|---|---|
| Test category taxonomy | test-category-taxonomy |
| Integration testing with WebApplicationFactory | integration-testing-webapplicationfactory |
| New skill covers... | Check against... |
|---|---|
| Scaffolding clean architecture | scaffold-clean-arch |
| SDLC artifacts contract | sdlc-artifacts-contract |
| Semantic versioning / changelog | semantic-versioning-changelog |
| In-memory search registry | in-memory-search-registry |
If overlap is found:
ai-context/skills/ already covers the scopeWhen to Use section's negative conditionsBefore marking the generated skill as quality-gate ready:
name (kebab-case) and description fields presentdescription is 1–3 sentences, quotable as a tool descriptiondescription contains concrete trigger signals (not generic)Problem section: 2–4 sentences, names the failure modeWhen to Use section: 3–6 specific conditions, at least one negativeExamples section: at least 2 scenario-based examplesRelated Skills section: at least 1 relationship with description... as placeholders in runnable code){fill in}, TBD, TODO as section content)skill-authoring-patterns); sub-files used only
for ecosystem KB skills with ≥5KB verbatim contentWhen to Use conditions are consistent with description trigger signalsRelated Skills references exist in the KBScenario: Team repeatedly makes mistakes wiring Channel<T> producer-consumer
patterns. A reusable guide would prevent the pattern from diverging.
Skill ID: channel-producer-consumer
Category: Procedure
Core section title: ## Implementation Steps
The skill walks through: creating a bounded channel, wiring a producer, wiring a consumer worker, handling back-pressure, and graceful shutdown. Each step has a compilable code snippet.
Scenario: Developers frequently choose the wrong EF Core inheritance strategy (TPH vs TPT vs TPC) without understanding the trade-offs.
Skill ID: ef-inheritance-strategy
Category: Decision-guide
Core section title: ## Strategy Selection Matrix
The skill provides a decision matrix: number of subtypes × column similarity × query frequency → recommended strategy, with a tie-breaker rule.
Scenario: Every new bounded context needs the same boilerplate: one aggregate, one repository interface, one application service interface.
Skill ID: gen-bounded-context
Category: Template
Core section title: ## Scaffold Template
The skill provides parameterized templates with ${1:EntityName} slots for
aggregate, repository interface, and application service interface. Fill instructions
precede the template body.
gen-agent — generate a new agent (executes behavior) instead of a knowledge artifactskill-authoring-patterns — decision framework for choosing between Inline, Reference, and Few-Shot authoring patternsagentic-workflow-patterns — understand the role of skills in the agent pipeline before creating onegen-copilot-instructions — generate scoped instruction files that reference skillstools
Use when cross-cutting concerns (logging, metrics, validation, authorization) are tangled into command handlers or service methods, when building database command pipelines with reorderable concerns, or when HTTP client pipelines or message handlers need composable, independently-replaceable processing stages. Covers ICommandInterceptor interface, InterceptorPipeline with reverse-chain construction, zero-cost Empty sentinel to skip overhead when no interceptors are registered, and ConfigureAwait(false) discipline for library code. Domain: Architecture, Cross-Cutting Concerns. Level: Intermediate. Tags: interceptor, pipeline, middleware, decorator, cross-cutting-concerns.
development
Use when writing integration tests for Razor Pages, MVC, or Minimal API applications to validate routing, middleware, page rendering, and HTTP behavior without a browser or live server, or when adding fast smoke tests to a CI pipeline. Covers WebApplicationFactory<Program> setup with public partial class Program, in-memory test server, AngleSharp HTML parsing, CSS selector assertions, redirect and status code testing, and a shared static fixture pattern for minimal per-test startup overhead. Domain: Testing, ASP.NET Core. Level: Intermediate. Tags: integration-testing, webapplicationfactory, razor-pages, anglesharp, http-testing.
development
Use when designing indexes for new tables, diagnosing slow queries that are not using indexes efficiently, reviewing index fragmentation and maintenance, or when the current indexing strategy results in key lookups, table scans, or missing index warnings. Covers clustered index key selection (narrow, unique, ever-increasing), non-clustered index design for query patterns, covering indexes with INCLUDE columns, filtered indexes for subset queries, composite index column ordering, DMV-based monitoring for missing and unused indexes, and rebuild vs reorganize maintenance thresholds. Domain: Database, Performance. Level: Intermediate. Tags: index, sql-server, covering-index, filtered-index, performance, dmv, maintenance.
development
Use when building a searchable in-memory catalog or registry for documentation sites, admin panels, or type/API browsers where you need keyword matching, fuzzy search, and ranked results without an external search engine or database. Covers RegistryService with weighted scoring across name, description, keywords, and method names; Levenshtein fuzzy matching; synonym expansion; category and subcategory filtering; and singleton DI registration for datasets of hundreds to low thousands of items. Domain: Search, Data Access Patterns. Level: Intermediate. Tags: search, registry, fuzzy-matching, in-memory, catalog, filtering.