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.
npx agentmods add commands/2oaj/swiftlys2-toolkit/command-attribute-template.csgit clone --depth 1 https://github.com/2oaJ/SwiftlyS2-ToolkitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00707 |
| Opus 5 | $0.00000 | $0.00353 |
| Sonnet 5 | $0.00000 | $0.00141 |
| Haiku 4.5 | $0.00000 | $0.00071 |
Grade A, and why
command-attribute-template.cs 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftlyS2 Attribute Command Template
Official docs sections:
CommandsUsing attributesThread Safety
Suitable for: partial / small plugins that use [Command] and [CommandAlias] to declare fixed command entry points.
Usage principles
- The command layer should own the entry point, permissions, argument validation, and player feedback.
- Complex business logic should be pushed down into modules or services.
- If the feature later needs dynamic install / uninstall, conditional start / stop, or precise cleanup, consider switching to programmatic registration.
Critical constraints
Handler return type must be void
The [Command] attribute handler signature is void OnMyCommand(ICommandContext context). It must not be async ValueTask, async Task, or any other async return type. The underlying delegate type is delegate void CommandListener(ICommandContext context);. If you need to perform async work inside a command handler, you may fire-and-forget an async method from within the void handler body, but the handler entry point itself must remain void.
CommandAlias is a shorter alias, not a prefixed variant
[CommandAlias("mc")] registers an alternative name that players can type instead of the full command (e.g., !mc instead of !mycommand). It is not used to add framework prefixes like sw_ or namespace groupings. Aliases should be short, memorable abbreviations of the canonical command name.
Example skeleton
using SwiftlyS2.Shared.Commands;
using SwiftlyS2.Shared.Core.Attributes.Commands;
namespace MyNamespace;
public partial class MyPlugin
{
[Command("mycommand", permission: "myplugin.commands.use")]
[CommandAlias("mc")]
public void OnMyCommand(ICommandContext context)
{
if (!context.IsSentByPlayer || context.Sender is null || !context.Sender.IsValid)
{
context.Reply("[Plugin] This command can only be executed by a valid player.");
return;
}
var args = context.Arguments;
if (args.Count < 2)
{
context.Reply("[Plugin] Invalid arguments. Please check the input format.");
return;
}
var parsedArg = args[1].Trim();
if (string.IsNullOrWhiteSpace(parsedArg))
{
context.Reply("[Plugin] The argument cannot be empty.");
return;
}
var success = _myFeatureService.TryHandlePlayerAction(context.Sender.SteamID, parsedArg);
if (!success)
{
context.Reply("[Plugin] This operation cannot be executed right now.");
return;
}
context.Reply("[Plugin] Operation completed successfully.");
}
}
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.
- 2d ago First seen · 80 lines · 0 tokens per session scan A 4f4f6b5864a2
command-attribute-template.cs is a command published in the GitHub repository 2oaJ/SwiftlyS2-Toolkit (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 707 tokens. 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-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.