Agent skill

Pacx Command Writer

by neronotte in neronotte/Greg.Xrm.Command

Guide for writing new PACX CLI commands (verbs) following established project conventions.

MITAuto-check passedAgent Workflows

Install Pacx Command Writer

skills CLI
$ npx skills add neronotte/Greg.Xrm.Command --skill pacx-command-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install neronotte/Greg.Xrm.Command pacx-command-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/neronotte/Greg.Xrm.Command.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/pacx-command-writer .claude/skills/pacx-command-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pacx-command-writer
GitHub stars
150
Token cost
~3k tokens
SKILL.md length
826 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Guide for writing new PACX CLI commands (verbs) following established project conventions.

  • Asked to create
  • SKILL.md covers Rules, File 1 — Command.cs (options…, File 2 — CommandExecutor.cs… and Tests, plus 1 more section
  • Calls dotnet
  • Add a new command to the Greg.Xrm.Command repository

What it does

Pacx Command Writer is an agent skill from neronotte/Greg.Xrm.Command. Guide for writing new PACX CLI commands (verbs) following established project conventions. Use this skill when asked to create, scaffold, or add a new command to the Greg.Xrm.Command repository.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Command Line utility for Dataverse. The licence is MIT.

When your agent uses it

  • Asked to create
  • Add a new command to the Greg.Xrm.Command repository

Example prompts

  • “/pacx-command-writer”

What it can do on your machine

Read from SKILL.md and the folder at commit 236875d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pacx Command Writer loads about 3k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 826 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from neronotte/Greg.Xrm.Command at commit 236875d, republished under its MIT licence (© neronotte). 826 words, ~3,013 tokens.

Download SKILL.mdSave it as .claude/skills/pacx-command-writer/SKILL.md (or your agent's skills folder).
name
pacx-command-writer
description
Guide for writing new PACX CLI commands (verbs) following established project conventions. Use this skill when asked to create, scaffold, or add a new command to the Greg.Xrm.Command repository.

PACX Command Writer

Every PACX command is a pair of files in Greg.Xrm.Command.Core\Commands\<Domain>\. Executors need no manual DI registration: Extensions.RegisterCommandExecutors() auto-scans all ICommandExecutor<T> implementations at startup. Supporting services and repositories must be registered explicitly against their interfaces in IoCModule.

Rules

  • Plan in advance — think through the command's options, validation, and usage examples before implementation.
  • Draft an implementation plan in markdown in the /docs folder before coding.
    • The implementation plan must contain the list of steps required to implement the command.
    • When you start working on a single step, update the step title putting a 🕒 before the step title
    • When a step is completed, update the step title putting a ✅ before the step title
    • Implementation plan must include also unit tests for all implemented steps.
  • Commit after each implementation step.
  • Before pushing, run a code review of the changes to ensure adherence to project conventions and correctness.
  • If in the code you need to use dataverse tables, create a model class in /Greg.Xrm.Command.Core/Model implementing EntityWrapper and a repository to manage the queries. Use Greg.Xrm.Command.Core\Model\WebResource.cs as a reference sample.

File 1 — <Verb>Command.cs (options holder)

This class declares CLI options via attributes and optionally handles cross-option validation and usage examples. It must not contain business logic.

csharp
using Greg.Xrm.Command.Parsing;             // ICanProvideUsageExample, MarkdownWriter
using Greg.Xrm.Command.Services;            // MarkdownWriter (via Parsing namespace)
using System.ComponentModel.DataAnnotations; // [Required], IValidatableObject

namespace Greg.Xrm.Command.Commands.<Domain>
{
    [Command("<noun>", "<verb>", HelpText = "One-sentence description.")]
    [Alias("<verb>", "<noun>")]   // only add when reversed order is natural
    public class <Verb>Command : IValidatableObject, ICanProvideUsageExample
    //           ─────────────────────────────────   ──────────────────────
    //           implement only when cross-option     implement for non-trivial
    //           constraints exist                    commands to aid discoverability
    {
        // Required options first — low Order values (1, 2, 3…)
        [Option("name", "n", Order = 1, HelpText = "...")]
        [Required]
        public string? Name { get; set; }

        // Optional options — grouped by concern, higher Order values
        [Option("description", "d", Order = 10, HelpText = "...")]
        public string? Description { get; set; }

        // Solution is always last (Order = 50+)
        [Option("solution", "s", Order = 50, HelpText = "Unmanaged solution name. Uses the current default solution if omitted.")]
        public string? SolutionName { get; set; }

        // Cross-option validation only — single-option guards go in the executor
        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {
            if (/* mutually exclusive condition */)
                yield return new ValidationResult("...", new[] { nameof(OptionA), nameof(OptionB) });
        }

        public void WriteUsageExamples(MarkdownWriter writer)
        {
            writer.WriteParagraph("Minimal usage:");
            writer.WriteCodeBlock("pacx <noun> <verb> --name \"value\"", "Powershell");
        }
    }
}
[Option] conventions
PropertyRule
longNamecamelCase — e.g. schemaName, displayName, requiredLevel
shortNameShort abbreviation, unique within the command — e.g. "n", "sn", "par"
HelpTextAlways set — shown in pacx help and interactive mode
OrderRequired options: 1–9; grouped optional options: 10–49; --solution: 50+
DefaultValueSet on the attribute when there is a meaningful default the user should see
[Required]Mark all mandatory options
[Command] and [Alias] conventions
  • Verb order in [Command] is always noun first: [Command("table", "create", ...)].
  • [Alias] reverses the order when natural: [Alias("create", "table")].
  • Only add [Alias] when the reversed form is genuinely useful.

File 2 — <Verb>CommandExecutor.cs (business logic)

csharp
using Greg.Xrm.Command.Services.Connection;
using Greg.Xrm.Command.Services.Output;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Messages;
using System.ServiceModel; // FaultException<OrganizationServiceFault>

namespace Greg.Xrm.Command.Commands.<Domain>
{
    public class <Verb>CommandExecutor(
            IOutput output,
            IOrganizationServiceRepository organizationServiceRepository) : ICommandExecutor<<Verb>Command>
    {
        public async Task<CommandResult> ExecuteAsync(<Verb>Command command, CancellationToken cancellationToken)
        {
            // Step 1 — always connect first
            output.Write("Connecting to the current dataverse environment...");
            var crm = await organizationServiceRepository.GetCurrentConnectionAsync();
            output.WriteLine("Done", ConsoleColor.Green);

            try
            {
                // Step 2 — resolve default solution when the option is omitted
                var solutionName = command.SolutionName;
                if (string.IsNullOrWhiteSpace(solutionName))
                {
                    solutionName = await organizationServiceRepository.GetCurrentDefaultSolutionAsync();
                    if (solutionName == null)
                        return CommandResult.Fail("No solution name provided and no current solution name found in the settings.");
                }

                // Step 3 — report each logical step inline
                output.Write("Performing the operation...");
                var request = new OrganizationRequest(/* ... */);
                var response = await crm.ExecuteAsync(request);
                output.WriteLine(" Done", ConsoleColor.Green);

                // Step 4 — return success with key output values
                var result = CommandResult.Success();
                result["EntityId"] = response./* ... */;
                return result;
            }
            catch (FaultException<OrganizationServiceFault> ex)
            {
                return CommandResult.Fail(ex.Message, ex);
            }
        }

        // Non-trivial computations go in private static helpers to keep ExecuteAsync readable
        private static string ComputeSchemaName(string displayName, string publisherPrefix)
        {
            // ...
        }
    }
}
Executor conventions
  • MUST: keep Greg.Xrm.Command.Commands namespaces limited to commands, command executors, and command-specific helpers. Put supporting service implementations and their interfaces under Greg.Xrm.Command.Services (with a domain subnamespace when useful), and models/repositories and their interfaces under Greg.Xrm.Command.Model. Never place services or their contracts in a command folder or namespace.
  • MUST: inject every service, repository, resolver, and delegated executor through an interface, never a concrete implementation type. Reuse an existing interface where available; otherwise define one alongside the implementation, implement it, and register the mapping in IoCModule (for example builder.RegisterType<Team.Repository>().As<ITeamRepository>()). Apply this rule to supporting services' constructor dependencies as well. Delegate executors through ICommandExecutor<TCommand>. Do not instantiate dependencies or bypass injection with static methods that perform I/O; expose those operations through the injected interface. This is mandatory so executor unit tests can mock dependencies and run entirely locally. Pure static formatting/computation helpers are allowed.
  • Command infrastructure (CommandRunnerBase) validates DataAnnotations and IValidatableObject before calling an executor. Do not call Validator.TryValidateObject again in executors or duplicate command validation there. Declare input constraints on the command; keep only business checks requiring resolved data (for example whether a privilege supports a depth) in the executor. Tests for command validation belong in the command test file, not in tests that invoke the executor directly.
  • Never write to Console directly — always use IOutput.
  • If you need additional output formatting you can use IAnsiConsole from Greg.Xrm.Command.Services.Output, which wraps Spectre.Console functionality.
  • Inline progress pattern: output.Write("Step…") → do async work → output.WriteLine(" Done", ConsoleColor.Green).
  • Highlight important user-provided values in yellow: output.Write(command.SchemaName, ConsoleColor.Yellow).
  • Resolve omitted --solution via organizationServiceRepository.GetCurrentDefaultSolutionAsync().
  • Catch FaultException<OrganizationServiceFault> at minimum. Catch Exception when non-Dataverse failures are possible.
  • Put non-trivial computation in private static helper methods.
  • Populate CommandResult with key/value output pairs for structured consumers.
  • CommandResult output values must be scalars (strings, numbers, booleans, GUIDs), never arrays or collection objects: the CLI renders them via ToString() and displays .NET type names instead of their contents. Render detailed collections through IOutput.WriteTable and return counts or explicitly formatted summary strings. Keep collection-based view models internal; tests can inspect service results or capture table rows, rather than requiring collections in command output parameters.
Show full SKILL.md (178 more words)Show less

Tests

Once the command and executor files are in place, use the pacx-unit-test-writer skill to generate the corresponding test files.


Checklist before finishing

  • <Verb>Command.cs placed in Greg.Xrm.Command.Core\Commands\<Domain>\
  • [Command] verbs are noun-first: "<noun>", "<verb>"
  • [Alias] added only when the reversed order is useful
  • All [Option] have HelpText, sensible Order, DefaultValue where applicable
  • Required options marked with [Required]
  • IValidatableObject.Validate() implemented only for cross-option constraints
  • ICanProvideUsageExample.WriteUsageExamples() implemented for non-trivial commands
  • <Verb>CommandExecutor.cs placed in the same domain folder
  • Services and their interfaces live under Services; models/repositories and their interfaces live under Model, not in Commands
  • All executor and supporting-service constructor dependencies are interfaces, with implementation mappings registered in IoCModule; no concrete injected types or static I/O bypasses
  • Executor tests mock service/repository interfaces, and the executor resolves through IoC
  • Executor uses IOutput for all console output (never Console.Write*)
  • Progress pattern (Write(…) / WriteLine(" Done", Green)) used for each step
  • FaultException<OrganizationServiceFault> caught and mapped to CommandResult.Fail
  • CommandResult populated with key output values
  • CommandResult contains only scalar output values, no arrays or collections
  • Tests written using the pacx-unit-test-writer skill
  • dotnet build passes
  • dotnet test Greg.Xrm.Command.Core.TestSuite\Greg.Xrm.Command.Core.TestSuite.csproj passes

© neronotte, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/pacx-command-writer of neronotte/Greg.Xrm.Command.

Open the folder on GitHubat commit 236875d

Compare with similar skills

Pacx Command Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pacx Command Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pacx Command Writer this skillneronotte/Greg.Xrm.Command150—~3kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official38k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from neronotte/Greg.Xrm.Command

  • Pacx Unit Test Writer

    neronotte/Greg.Xrm.Command

    Guide for writing local unit tests for PACX commands without relying on external services.

    150 GitHub stars~3.6k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Pacx Command Writer

What does Pacx Command Writer do?

Guide for writing new PACX CLI commands (verbs) following established project conventions. Command. Guide for writing new PACX CLI commands (verbs) following established project conventions.

When should I use Pacx Command Writer?

Pacx Command Writer fits situations like: asked to create; add a new command to the Greg.Xrm.Command repository.

How do I install Pacx Command Writer in Claude Code?

Run `npx skills add neronotte/Greg.Xrm.Command --skill pacx-command-writer -a claude-code`. Or copy the skill folder (.github/skills/pacx-command-writer in neronotte/Greg.Xrm.Command) into .claude/skills/pacx-command-writer in your project. Claude Code loads it when a task matches its description.

How do I install Pacx Command Writer in Codex?

Run `npx skills add neronotte/Greg.Xrm.Command --skill pacx-command-writer -a codex`. Or copy the skill folder (.github/skills/pacx-command-writer in neronotte/Greg.Xrm.Command) into .agents/skills/pacx-command-writer in your project. Codex loads it when a task matches its description.

Can I use Pacx Command Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add neronotte/Greg.Xrm.Command --skill pacx-command-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pacx-command-writer, .gemini/skills/pacx-command-writer, .github/skills/pacx-command-writer and .opencode/skills/pacx-command-writer in your project.

What does Pacx Command Writer need to run?

Going by SKILL.md and its folder, Pacx Command Writer needs the command-line tools its instructions call (dotnet).

Does Pacx Command Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pacx Command Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pacx Command Writer use?

Pacx Command Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pacx Command Writer use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pacx Command Writer?

Skills that share tags, products or a category with Pacx Command Writer: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pacx Command Writer?

neronotte (a GitHub user) maintains it in neronotte/Greg.Xrm.Command, which has 150 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 4, 2026.

Source: neronotte/Greg.Xrm.Command on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.