### Install AI Artifacts with npx (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Installs the AI Artifacts toolkit using npx, which does not require cloning the repository. You can install it into the current directory or a specified path. This method is convenient for quick installations or when you don't need the full repository locally. ```bash # Install to current directory npx github:thapaliyabikendra/ai-artifacts install . # Install to specific path npx github:thapaliyabikendra/ai-artifacts install /path/to/project ``` -------------------------------- ### Install AI Artifacts with curl or wget (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Installs the AI Artifacts toolkit using a one-line command with either curl or wget. This method downloads and executes an installation script directly, allowing you to specify the target project directory. Ensure you have bash, curl, or wget installed. ```bash # Unix/macOS/WSL curl -sSL https://raw.githubusercontent.com/thapaliyabikendra/ai-artifacts/main/scripts/install.sh | bash -s -- /path/to/project # Or with wget wget -qO- https://raw.githubusercontent.com/thapaliyabikendra/ai-artifacts/main/scripts/install.sh | bash -s -- /path/to/project ``` -------------------------------- ### Installation Manifest (JSON) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Shows the structure of the `.claude/.toolkit-manifest.json` file, which records details about the installed AI Artifacts toolkit, including version, installation date, source, and component counts. ```json { "toolkit": "ai-artifacts", "version": "1.0.0", "installedAt": "2025-12-15T10:30:00Z", "updatedAt": "2025-12-15T10:30:00Z", "source": "git@github.com:thapaliyabikendra/ai-artifacts.git", "components": { "agents": 11, "skills": 47, "commands": 27 }, "customizations": [] } ``` -------------------------------- ### PowerShell Installer Script for AI Artifacts Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This script installs the AI Artifacts toolkit into a project using PowerShell. It performs similar actions to the Bash script, including setup of directories, copying artifacts, and generating configuration files. It is designed for Windows environments. ```powershell # Example of a PowerShell installer script for AI Artifacts Write-Host "✓ Installing AI Artifacts v1.0.0" Write-Host "✓ Creating .claude/ directory" Write-Host "✓ Copying 11 agents" Write-Host "✓ Copying 47 skills" Write-Host "✓ Copying 27 commands" Write-Host "✓ Creating CLAUDE.md" Write-Host "✓ Creating settings.json" Write-Host "`nInstallation complete!" Write-Host "Run 'claude code' to start using the toolkit." ``` -------------------------------- ### Install AI Artifacts Toolkit (npx) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Installs the AI Artifacts toolkit into your current project directory using npx, eliminating the need to clone the repository. This is a convenient method for quick setup. ```bash npx github:thapaliyabikendra/ai-artifacts install . ``` -------------------------------- ### Example Settings Merge (JSON) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Demonstrates a practical example of merging user settings (`target`) with toolkit defaults (`source`). It highlights how permissions arrays are combined and how user overrides for `outputStyle` are preserved. ```json // Target (user's existing settings.json) { "permissions": { "allow": ["Bash(docker:*)"] }, "outputStyle": "concise" } // Source (toolkit defaults) { "permissions": { "allow": ["Bash(dotnet:*)", "Bash(git:*)"] }, "outputStyle": "careful" } // Result (merged) { "permissions": { "allow": ["Bash(docker:*)", "Bash(dotnet:*)", "Bash(git:*)"] // Combined }, "outputStyle": "concise" // User's value preserved } ``` -------------------------------- ### Bash Installer Script for AI Artifacts Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This script installs the AI Artifacts toolkit into a project. It handles directory creation, copying agents, skills, and commands, and generates initial configuration files like CLAUDE.md and settings.json. It provides feedback on the installation progress. ```bash #!/bin/bash # Example of a bash installer script for AI Artifacts echo "✓ Installing AI Artifacts v1.0.0" echo "✓ Creating .claude/ directory" echo "✓ Copying 11 agents" echo "✓ Copying 47 skills" echo "✓ Copying 27 commands" echo "✓ Creating CLAUDE.md" echo "✓ Creating settings.json" echo " Installation complete!" echo "Run 'claude code' to start using the toolkit." ``` -------------------------------- ### Selective Installation of AI Artifacts Components Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This command allows for selective installation of AI Artifacts components. Users can specify which types of artifacts to install (e.g., agents, commands) or list specific artifacts by name or path. ```bash # Install only specific components like agents and commands npx github:thapaliyabikendra/ai-artifacts install . --components "agents,commands" # Or install specific artifacts by name or path npx github:thapaliyabikendra/ai-artifacts install . \ --only "abp-developer,qa-engineer,efcore-patterns,/generate:entity" ``` -------------------------------- ### Node.js CLI for AI Artifacts Installation Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This Node.js script implements a CLI using the 'commander' library for installing and updating AI artifacts. It defines commands for 'install' and 'update', with options for dry runs, forcing overwrites, skipping conflicts, and specifying components. ```javascript // bin/claude-abp.js #!/usr/bin/env node const { program } = require('commander'); const Installer = require('../src/installer'); program .name('claude-abp') .description('AI Artifacts Installer') .version(require('../package.json').version); program .command('install ') .description('Install toolkit to target project') .option('--dry-run', 'Show what would be done') .option('--force', 'Overwrite without prompting') .option('--skip-conflicts', 'Skip existing files') .option('--components ', 'Specific components to install') .action(async (target, options) => { const installer = new Installer(target, options); await installer.install(); }); program .command('update') .description('Update existing installation') .option('--check', 'Check for updates without installing') .action(async (options) => { const installer = new Installer(process.cwd(), options); await installer.update(); }); program.parse(); ``` -------------------------------- ### Example Command Usage Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Illustrates the usage of a slash command for scaffolding an ABP entity. This example shows the '/generate:entity' command with properties for the 'Patient' entity. ```text /generate:entity Patient --properties "Name:string,Email:string,DateOfBirth:DateTime" ``` -------------------------------- ### Install AI Artifacts Toolkit (One-Line Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Installs the AI Artifacts toolkit in a single command using curl and bash. This method downloads and executes the install script directly, suitable for Unix/macOS/WSL environments. ```bash curl -sSL https://raw.githubusercontent.com/thapaliyabikendra/ai-artifacts/main/scripts/install.sh | bash -s -- /path/to/project ``` -------------------------------- ### Install AI Artifacts Toolkit Source: https://context7.com/thapaliyabikendra/ai-artifacts/llms.txt Provides multiple methods for installing the AI Artifacts toolkit, including git clone with a script, npx, and a one-line curl command. After installation, the project directory will contain .claude and CLAUDE.md files for agent, skill, command, and knowledge base management. ```bash # Option 1: Git Clone + Install Script (Recommended) git clone https://github.com/thapaliyabikendra/ai-artifacts.git cd ai-artifacts ./scripts/install.sh /path/to/your/project # Option 2: npx (No Clone Required) npx github:thapaliyabikendra/ai-artifacts install . # Option 3: One-Line Install (Unix/macOS/WSL) curl -sSL https://raw.githubusercontent.com/thapaliyabikendra/ai-artifacts/main/scripts/install.sh | bash -s -- /path/to/project # Verify Installation - your project should have: # your-project/ # ├── .claude/ # │ ├── agents/ # 11 AI agents # │ ├── skills/ # 47 skills with patterns # │ ├── commands/ # 27 slash commands # │ ├── knowledge/ # Knowledge base # │ ├── guidelines/ # Best practices # │ └── GUIDELINES.md # Main usage guide # └── CLAUDE.md # Updated with toolkit references ``` -------------------------------- ### Changelog Format Example (Markdown) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Illustrates the markdown format used for the `CHANGELOG.md` file, detailing version history with sections for added, changed, and fixed items. ```markdown # Changelog ## [1.1.0] - 2025-01-15 ### Added - New `grpc-integration-patterns` skill - `/generate:grpc-client` command ### Changed - Updated `abp-framework-patterns` for ABP 10.1 - Improved `backend-architect` agent prompts ### Fixed - EF Core migration command path detection ## [1.0.0] - 2025-12-15 ### Added - Initial release with 11 agents, 47 skills, 27 commands ``` -------------------------------- ### Install AI Artifacts Toolkit (Bash/PowerShell) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Installs the AI Artifacts toolkit into your ABP Framework project. Supports both Unix-like systems (Bash) and Windows (PowerShell). Requires cloning the repository or using the install script directly. ```bash # Clone the toolkit git clone https://github.com/thapaliyabikendra/ai-artifacts.git # Install to your project cd ai-artifacts ./scripts/install.sh /path/to/your/project ``` ```powershell # On Windows (PowerShell) .\scripts\install.ps1 -TargetPath "C:\Projects\YourProject" ``` -------------------------------- ### Install AI Artifacts using npx with Conflict Resolution Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This command installs the AI Artifacts toolkit into an existing project using npx. It detects existing customizations and potential conflicts, offering options to resolve them, such as keeping local changes, overwriting with toolkit versions, or deciding on a per-file basis. ```bash # Project with existing .claude/ customizations cd MyExistingProject npx github:thapaliyabikendra/ai-artifacts install . --conflict-resolution "per-file" # Example output during conflict resolution: # ✓ Analyzing target directory... # # Found existing .claude/ directory with customizations: # - 3 modified skills # - 1 custom agent # - Custom CLAUDE.md content # # Conflicts detected in 3 files: # .claude/skills/efcore-patterns/SKILL.md # .claude/skills/abp-framework-patterns/skill.md # .claude/skills/commands/generate/entity.md # # How would you like to resolve conflicts? # [1] Keep mine (skip all conflicts) # [2] Use toolkit (overwrite all) # [3] Decide per-file # [4] Abort # # > 3 # # [Proceeds with per-file conflict resolution...] ``` -------------------------------- ### Bash Installer Script Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This Bash script provides an alternative method for installing the AI artifacts toolkit. It automates the process of copying necessary files and setting up the project environment. ```bash #!/bin/bash TARGET_PROJECT="$1" if [ -z "$TARGET_PROJECT" ]; then echo "Usage: $0 " exit 1 fi SOURCE_DIR="$(dirname "$0")/.claude" TARGET_DIR="$TARGET_PROJECT/.claude" if [ ! -d "$SOURCE_DIR" ]; then echo "Error: Source directory '$SOURCE_DIR' not found." exit 1 fi echo "Installing artifacts to $TARGET_PROJECT..." mkdir -p "$TARGET_DIR" cp -R "$SOURCE_DIR"/* "$TARGET_DIR/" echo "Installation complete." ``` -------------------------------- ### C# NSubstitute Mocking Example for Repository Source: https://context7.com/thapaliyabikendra/ai-artifacts/llms.txt Illustrates how to use NSubstitute to mock an ABP Framework repository. This example shows setting up a mock repository to return a specific patient entity when GetAsync is called with a given ID and verifying the call. ```csharp var repository = Substitute.For>(); repository.GetAsync(entityId).Returns(patient); await repository.Received(1).GetAsync(entityId); ``` -------------------------------- ### Example Agent Usage Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Demonstrates how to invoke an AI agent for a specific development task. This example shows using the 'abp-developer' agent to implement a 'Patient' entity. ```text Use the abp-developer agent to implement the Patient entity ``` -------------------------------- ### Bash Agent Invocation Commands Source: https://context7.com/thapaliyabikendra/ai-artifacts/llms.txt Provides examples of how to invoke specialized agents for various development tasks using natural language commands within a bash shell. Includes examples for implementing features, designing APIs, generating tests, debugging, and security audits. ```bash # Use ABP Developer agent to implement features "Use the abp-developer agent to implement the Patient entity" # Use Backend Architect for API design "Use the backend-architect agent to design the API for invoice management" # Use QA Engineer for test generation "Use the qa-engineer agent to write tests for PatientAppService" # Use Debugger for root cause analysis "Use the debugger agent to analyze the NullReferenceException in OrderService" # Use Security Engineer for security audit "Use the security-engineer agent to audit the authentication module" # Agent chains for complex workflows: # Full Feature: business-analyst → backend-architect → abp-developer → qa-engineer → abp-code-reviewer # Fast Feature: backend-architect → abp-developer → qa-engineer # Bug Fix: debugger → abp-developer → qa-engineer # Security Audit: security-engineer (standalone) # Available agents by category: # Architects: backend-architect, business-analyst # Engineers: abp-developer, react-developer, devops-engineer # Reviewers: abp-code-reviewer, react-code-reviewer, qa-engineer, security-engineer # Specialists: debugger, database-migrator ``` -------------------------------- ### PowerShell Installer Script Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This PowerShell script offers another way to install the AI artifacts toolkit on Windows systems. It performs similar actions to the Bash script, ensuring compatibility across different operating systems. ```powershell # scripts/install.ps1 param( [Parameter(Mandatory=$true)] [string]$TargetProject ) $SourceDir = Join-Path $PSScriptRoot "..\.claude" $TargetDir = Join-Path $TargetProject ".claude" if (-not (Test-Path $SourceDir)) { Write-Error "Error: Source directory '$SourceDir' not found." exit 1 } Write-Host "Installing artifacts to $TargetProject..." if (-not (Test-Path $TargetDir)) { New-Item -ItemType Directory -Force -Path $TargetDir | Out-Null } Copy-Item -Path "$SourceDir\*" -Destination $TargetDir -Recurse -Force Write-Host "Installation complete." ``` -------------------------------- ### Conflict Resolution Options Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Presents the interactive options available when a conflict is detected during installation or updates. Users can choose to overwrite, keep, merge, backup, show differences, apply to all, or abort. ```text Conflict detected: .claude/skills/efcore-patterns/SKILL.md Source (toolkit): v1.2.0 - Updated migration patterns Target (project): Modified by user on 2025-12-10 Choose resolution: [o] Overwrite with toolkit version [k] Keep current project version [m] Merge (open diff editor) [b] Backup current, then overwrite [d] Show diff [a] Apply this choice to all remaining conflicts [q] Abort installation > _ ``` -------------------------------- ### Update Existing AI Artifacts Installation Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This command updates an existing AI Artifacts installation to the latest version. It shows the changes between the current and latest versions, including added or updated artifacts, and prompts for confirmation before proceeding with the backup and update process. ```bash cd MyProject claude-abp update # Example output: # Current version: 1.0.0 # Latest version: 1.1.0 # # Changes: # + Added: grpc-integration-patterns skill # ~ Updated: abp-framework-patterns skill (3 files) # ~ Updated: backend-architect agent # # Proceed with update? [Y/n] y # # ✓ Backing up current installation... # ✓ Updating 5 files... # ✓ Updating CLAUDE.md toolkit section... # ✓ Update complete! ``` -------------------------------- ### CLI Entry Point Script Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This JavaScript file serves as the entry point for the 'claude-abp' command-line interface. It is responsible for parsing commands and options and invoking the core installation logic. ```javascript // bin/claude-abp.js // CLI entry point const installer = require('../src/installer'); async function run() { const args = process.argv.slice(2); const command = args[0]; const options = {}; // Basic argument parsing (can be expanded with libraries like 'yargs') for (let i = 1; i < args.length; i++) { if (args[i].startsWith('--')) { const optionName = args[i].substring(2); if (args[i+1] && !args[i+1].startsWith('--')) { options[optionName] = args[i+1]; i++; } else { options[optionName] = true; } } } switch (command) { case 'install': await installer.install(args[1], options); break; case 'update': await installer.update(options); break; case 'list': await installer.list(); break; case 'uninstall': await installer.uninstall(options); break; case 'version': console.log(require('../VERSION')); break; default: console.error('Unknown command'); break; } } run(); ``` -------------------------------- ### CLI Reference for claude-abp Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This section details the command-line interface for the claude-abp tool. It lists available commands such as 'install', 'update', 'list', 'uninstall', and 'version', along with their corresponding options like '--dry-run', '--force', and '--verbose'. This CLI is used to manage AI artifacts within an ABP Framework project. ```bash claude-abp [options] Commands: install Install toolkit to target project update Update existing installation list List installed artifacts uninstall Remove toolkit from project version Show toolkit version Options: --dry-run Preview changes without applying --force Overwrite without prompting --skip-conflicts Skip existing files --no-backup Don't create backups --components Install specific components only --verbose Show detailed output --quiet Suppress non-error output ``` -------------------------------- ### AI Artifacts CLI Command Structure (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Defines the command-line interface (CLI) for the AI Artifacts toolkit. It outlines available commands like 'install', 'update', 'list', 'uninstall', and 'diff', along with various options to control the execution behavior, such as dry runs, force overwrites, and verbose output. ```bash claude-abp [options] Commands: install Install toolkit to target project update Update existing installation list List installed artifacts uninstall Remove toolkit from project diff Show differences from source Options: --dry-run Show what would be done without making changes --force Overwrite existing files without prompting --skip-conflicts Skip files that already exist --no-backup Don't create backups of modified files --components Install specific components (agents,skills,commands) --verbose Show detailed output --quiet Suppress non-error output ``` -------------------------------- ### User CLAUDE.md Structure with AI Artifacts Section Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Shows how user-specific content is preserved in a CLAUDE.md file while the AI Artifacts section is managed by the installer. This ensures custom instructions and notes remain intact during updates. ```markdown # My Project CLAUDE.md ## Project-Specific Instructions [User's custom content - PRESERVED] [Toolkit content - MANAGED BY INSTALLER] ## Additional Notes [User's custom content - PRESERVED] ``` -------------------------------- ### Core Installation Logic Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This JavaScript file contains the core logic for installing AI artifacts into an ABP Framework project. It handles the process of copying files, configuring settings, and managing dependencies based on the provided options. ```javascript // src/installer.js const fs = require('fs-extra'); const path = require('path'); async function install(targetProject, options) { console.log(`Installing artifacts to ${targetProject} with options:`, options); const sourceDir = path.join(__dirname, '../.claude'); const targetDir = path.join(targetProject, '.claude'); if (options.dryRun) { console.log('Dry run: Would copy artifacts from', sourceDir, 'to', targetDir); return; } await fs.ensureDir(targetDir); await fs.copy(sourceDir, targetDir, { overwrite: options.force }); console.log('Installation complete.'); } async function update(options) { console.log('Updating existing installation with options:', options); // Add update logic here } async function list() { console.log('Listing installed artifacts...'); // Add list logic here } async function uninstall(options) { console.log('Uninstalling toolkit with options:', options); // Add uninstall logic here } module.exports = { install, update, list, uninstall }; ``` -------------------------------- ### Add AI Artifacts as Git Submodule (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Integrates the AI Artifacts project as a Git submodule into your existing project. After adding it, you run a setup script to symlink or copy the necessary artifacts. This method is useful for managing dependencies and keeping the AI Artifacts project updated via Git. ```bash # Add as submodule git submodule add git@github.com:thapaliyabikendra/ai-artifacts.git .claude-toolkit # Run setup to symlink/copy artifacts ./.claude-toolkit/scripts/install.sh --from-submodule ``` -------------------------------- ### Project Structure of ai-artifacts Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md This outlines the directory structure of the ai-artifacts project. It highlights key directories such as '.claude' for AI artifacts, 'bin' for the CLI entry point, 'src' for core logic, and 'scripts' for installation scripts. It also details configuration and documentation files. ```tree ai-artifacts/ ├── .claude/ # Artifacts to be installed │ ├── agents/ # AI agents by role │ ├── skills/ # Skills by category │ ├── commands/ # Slash commands by domain │ ├── knowledge/ # Knowledge base │ └── guidelines/ # Guidelines and best practices ├── bin/ │ └── claude-abp.js # CLI entry point ├── src/ │ └── installer.js # Core installation logic ├── scripts/ │ ├── install.sh # Bash installer │ └── install.ps1 # PowerShell installer ├── fragments/ │ ├── claude-md-template.md # Full CLAUDE.md template │ ├── claude-md-section.md # Section to inject │ └── settings-defaults.json # Default settings ├── VERSION # Current version ├── CHANGELOG.md # Version history └── README.md # This file ``` -------------------------------- ### Syncing Artifacts from Source Project to Toolkit Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md This script is used to synchronize artifacts from a source project into the AI Artifacts toolkit. It copies the .claude/ artifacts, updates the toolkit's version, and generates a changelog diff to reflect the changes made in the source project. ```bash # From source project ./sync-to-toolkit.sh /path/to/ai-artifacts # This script would: # 1. Copy .claude/ artifacts # 2. Update version # 3. Generate changelog diff ``` -------------------------------- ### CLAUDE.md Injection Markers Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Illustrates the markdown comments used to demarcate the section managed by the AI Artifacts installer within a CLAUDE.md file. This allows for targeted updates and preservation of user content. ```markdown ## AI Artifacts **Installed:** v1.0.0 | **Updated:** 2025-12-15 ### Quick Reference [Content from fragments/claude-md-header.md] ### Available Agents [Content from fragments/claude-md-agents.md] ### Available Skills [Content from fragments/claude-md-skills.md] ### Available Commands [Content from fragments/claude-md-commands.md] ``` -------------------------------- ### C# DTO for {{Entity}} List Query Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/technical-design-template.md Defines the Get{{Entity}}ListInput DTO, used for querying a paginated and sorted list of {{Entity}} objects. It includes properties for filtering and pagination. ```csharp using Volo.Abp.Application.Dtos; namespace {{ProjectName}}.{{Feature}}; public class Get{{Entity}}ListInput : PagedAndSortedResultRequestDto { public string? Filter { get; set; } // Add more filter properties... } ``` -------------------------------- ### Run All Tests using dotnet CLI Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/test-cases-template.md This bash command executes all tests within the specified project directory using the .NET CLI. It's used for a comprehensive test run. ```bash dotnet test api/test/{{ProjectName}}.Application.Tests ``` -------------------------------- ### Update AI Artifacts Toolkit (CLI) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/README.md Updates an existing installation of the AI Artifacts toolkit within your project using the command-line interface. This ensures you have the latest agents, skills, and commands. ```bash # Using CLI cd your-project npx github:thapaliyabikendra/ai-artifacts update ``` -------------------------------- ### Settings Merge Algorithm (JavaScript) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Provides a conceptual JavaScript function signature for merging user settings with toolkit defaults. The algorithm prioritizes user-defined values and concatenates array fields. ```javascript function mergeSettings(target, source) { // Deep merge with target taking precedence // Array fields are concatenated and deduplicated // Object fields are recursively merged // Primitive fields: target wins if defined } ``` -------------------------------- ### EF Core Migration Command (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/technical-design-template.md Generates a new database migration using the .NET EF Core CLI. This command adds a migration named 'Add{{Feature}}' to the specified project. ```bash dotnet ef migrations add Add{{Feature}} \ -p api/src/{{ProjectName}}.EntityFrameworkCore \ -s api/src/{{ProjectName}}.DbMigrator ``` -------------------------------- ### C# DTO for Entity Filtering Input Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/feature-spec-template.md Defines the Data Transfer Object (DTO) for filtering and paginating entity lists. It includes properties for text filtering and active status, used in API GET requests for listing entities. ```csharp public class Get{Entity}sInput : PagedAndSortedResultRequestDto { public string? Filter { get; set; } public bool? IsActive { get; set; } } ``` -------------------------------- ### Default Settings Fragment (JSON) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Defines the default settings for the AI Artifacts toolkit, including permissions for executing Bash commands and hook configurations. This JSON file serves as a baseline for merging. ```json // fragments/settings-defaults.json { "permissions": { "allow": [ "Bash(dotnet:*)", "Bash(git:*)", "Bash(npm:*)" ] }, "hooks": { "preToolUse": [] }, "outputStyle": "careful" } ``` -------------------------------- ### C# FluentValidation DTO Validation Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/architecture/patterns.md Demonstrates how to implement DTO validation using FluentValidation in C#. This example shows validation rules for a CreateUpdate DTO, ensuring required fields are present and adhere to specified formats and lengths. ```csharp public class CreateUpdate{Entity}DtoValidator : AbstractValidator { public CreateUpdate{Entity}DtoValidator() { RuleFor(x => x.Name) .NotEmpty().WithMessage("Name is required.") .MaximumLength(100).WithMessage("Name cannot exceed 100 characters."); RuleFor(x => x.Email) .NotEmpty().WithMessage("Email is required.") .EmailAddress().WithMessage("Invalid email format."); } } ``` -------------------------------- ### Test Data Seed Contributor in C# Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/test-cases-template.md This C# code implements IDataSeedContributor to seed test data for a given entity. It checks if data already exists before inserting new records using a repository and GUID generator. Dependencies include IRepository and IGuidGenerator. ```csharp // In {{ProjectName}}TestDataSeedContributor.cs public class {{Feature}}TestDataSeedContributor : IDataSeedContributor, ITransientDependency { private readonly IRepository<{{Entity}}, Guid> _repository; private readonly IGuidGenerator _guidGenerator; public async Task SeedAsync(DataSeedContext context) { if (await _repository.GetCountAsync() > 0) { return; } // Seed test data await _repository.InsertAsync(new {{Entity}}( _guidGenerator.Create(), "Test {{Entity}} 1" )); await _repository.InsertAsync(new {{Entity}}( _guidGenerator.Create(), "Test {{Entity}} 2" )); } } ``` -------------------------------- ### C# Standard CRUD AppService Implementation Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/architecture/patterns.md Provides a standard implementation for a CRUD AppService in C#, including methods for getting, listing, creating, updating, and deleting entities. It utilizes repositories, logging, DTO mapping, and authorization attributes for security. ```csharp [Authorize(Permissions.{Feature}.Default)] public class {Entity}AppService : ApplicationService, I{Entity}AppService { private readonly IRepository<{Entity}, Guid> _repository; private readonly ILogger<{Entity}AppService> _logger; public {Entity}AppService( IRepository<{Entity}, Guid> repository, ILogger<{Entity}AppService> logger) { _repository = repository; _logger = logger; } public async Task<{Entity}Dto> GetAsync(Guid id) { var entity = await _repository.GetAsync(id); return ObjectMapper.Map<{Entity}, {Entity}Dto>(entity); } public async Task> GetListAsync(Get{Entity}ListInput input) { var queryable = await _repository.GetQueryableAsync(); queryable = queryable .WhereIf(!input.Filter.IsNullOrWhiteSpace(), x => x.Name.Contains(input.Filter!)) .OrderBy(input.Sorting ?? nameof({Entity}.Name)); var totalCount = await AsyncExecuter.CountAsync(queryable); var items = await AsyncExecuter.ToListAsync( queryable.PageBy(input.SkipCount, input.MaxResultCount)); return new PagedResultDto<{Entity}Dto>(totalCount, ObjectMapper.Map, List<{Entity}Dto>>(items)); } [Authorize(Permissions.{Feature}.Create)] public async Task<{Entity}Dto> CreateAsync(CreateUpdate{Entity}Dto input) { var entity = new {Entity}(GuidGenerator.Create(), input.Name); await _repository.InsertAsync(entity); _logger.LogInformation("Created {Entity} {Id}", entity.Id); return ObjectMapper.Map<{Entity}, {Entity}Dto>(entity); } [Authorize(Permissions.{Feature}.Edit)] public async Task<{Entity}Dto> UpdateAsync(Guid id, CreateUpdate{Entity}Dto input) { var entity = await _repository.GetAsync(id); entity.SetName(input.Name); await _repository.UpdateAsync(entity); return ObjectMapper.Map<{Entity}, {Entity}Dto>(entity); } [Authorize(Permissions.{Feature}.Delete)] public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); _logger.LogInformation("Deleted {Entity} {Id}", id); } } ``` -------------------------------- ### Domain Service for Entity Management (C#) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/features/_templates/technical-design-template.md Implements domain logic for managing entities using ABP's DomainService. It includes dependency injection for repositories and a placeholder for complex business logic. ```csharp using Volo.Abp.Domain.Services; namespace {{ProjectName}}.{{Feature}}; public class {{Entity}}Manager : DomainService { private readonly IRepository<{{Entity}}, Guid> _repository; public {{Entity}}Manager(IRepository<{{Entity}}, Guid> repository) { _repository = repository; } /// /// {{Business logic description}} /// public async Task<{{Entity}}> {{BusinessMethod}}Async(/*params*/) { // Complex business logic here } } ``` -------------------------------- ### Update Check Command Output (Bash) Source: https://github.com/thapaliyabikendra/ai-artifacts/blob/develop/docs/plugins-export-plan.md Demonstrates the output of the `claude-abp update --check` command, showing the current and latest versions, and a summary of changes in the new version. ```bash # Check for updates claude-abp update --check # Output: Current: 1.0.0 Latest: 1.1.0 Changes in 1.1.0: - Added: grpc-integration-patterns skill - Added: /generate:grpc-client command - Updated: abp-framework-patterns skill Run 'claude-abp update' to install ```