2oaJ@SwiftlyS2 Toolkit

From gabrielmoreira/agent-skills-mirror · View interactive version

2oaJ@SwiftlyS2 Toolkit is an AI agent skill from the GitHub repository gabrielmoreira/agent-skills-mirror. Plan, implement, audit, and review C#/.NET SwiftlyS2 plugins. Use when working with Commands, Core Events, Game Events, GameHooks Pre/Post, raw native hooks, Modules, Workers, Services, high-frequency runtime loops, NetMessages, Schema access, entity handling, thread safety, performance, or IPlayer

How to use this skill

Skill file

swiftlys2-toolkit

This is a general-purpose toolkit entry for SwiftlyS2 C# / .NET plugin development.

Its goal is not to bind itself to any specific workspace, but to provide a publicly reusable workflow, rule set, template collection, and reference navigation system.

Public reference allowlist

The public skill, workflow references, and templates in this toolkit should, by default, reference only the following public sources:

  1. SwiftlyS2 official documentation: https://swiftlys2.net/docs/
  2. sw2-mdwiki: https://github.com/himenekocn/sw2-mdwiki
  3. SwiftlyS2 official repository: https://github.com/swiftly-solution/swiftlys2
  4. SwiftlyS2 LLM-optimized full documentation: https://swiftlys2.net/llms-full.txt (last-resort full-text fallback only when targeted navigation is insufficient)

Keep workspace-specific mappings, private reference repositories, historical projects, credentials, and special rules in the nearest applicable AGENTS.md or in a project-local skill. Do not write them back into this public skill.

If the workspace includes a local sw2-mdwiki checkout, prefer it as a local public reference repository for faster, more accurate retrieval.

Full-text documentation usage policy

What this skill should produce

When using this skill, the preferred output should be one of the following:

Failure-mode-first rule writing

When the toolkit proposes workflow rules, audits, or checklists, prefer rules that map to concrete failure modes rather than abstract virtues.

Examples:

Language policy

Toolkit structure

Entry documents

Reference documents

Templates and checklists

Workflow references

Task routing

If the task is mainly “should we do this / how should this be broken down”

Open these first:

If the task is mainly “systematically find risks first”

Open these first:

If the task is mainly “edit code directly”

Open these first:

If the task is mainly “find reference entry points”

Open these first:

If online docs are unavailable or a full-text API search is truly necessary

Only after the indexed references above are insufficient, ask the user whether https://swiftlys2.net/llms-full.txt may be read. If the user agrees, use it as a low-priority fallback and prefer keyword/range-based partial reads rather than whole-document scanning.

Architecture categories

1. Modular gameplay plugins

Suitable when:

2. DI / service-oriented plugins

Suitable when:

3. Hybrid architecture

Suitable when:

Core operating rules

1. Historical implementations are only temporary experience sources

2. Silent drift is forbidden

3. Lifecycle closure is a hard requirement

At minimum, explicitly check:

4. Main-thread / async boundaries must be explicit

According to the official SwiftlyS2 Thread Safety documentation, the following operations should be treated as main-thread-sensitive by default:

When in an async context, prefer the corresponding Async APIs instead of mechanically wrapping everything in NextTick / NextWorldUpdate.

5. For high-frequency hooks, prioritize safety before speed

5.1 Choose the current hook surface before optimizing it

6. `IPlayer` lifecycle has extremely high priority

7. For long-lived entity tracking, think in handles first

8. `Span` / `stackalloc` / `ref` should only be used when there is evidence

9. Treat menu callbacks as async contexts

10. JSON and synchronous blocking are high-risk by default

11. Performance optimization must map to a concrete hotspot category

When asked to optimize performance, first classify the code as one or more of:

Then use ./references/swiftlys2-performance-optimization-playbook.md to choose an implementation pattern. Do not add micro-optimizations such as AggressiveInlining, object pools, or binary layout unless the code is demonstrably small/hot, allocation-heavy, or native/binary-bound.

Recommended reading order

For planning

  1. ./SKILL.md
  2. ./references/swiftlys2-plugin-playbook.md
  3. ./references/swiftlys2-current-capability-map.md when SDK surface selection matters
  4. ./references/plan-workflow.md
  5. ./assets/workflows/planning/method-level-plan-template.md

For auditing

  1. ./SKILL.md
  2. ./references/swiftlys2-kb-index.md
  3. ./references/swiftlys2-current-capability-map.md
  4. ./references/swiftlys2-performance-optimization-playbook.md when performance or hot paths are in scope
  5. ./references/audit-workflow.md
  6. ./assets/workflows/audit/audit-report-template.md

For direct code edits

  1. ./SKILL.md
  2. ./references/edit-workflow.md
  3. Relevant subsystem templates / checklists

Output requirements

If the user wants a plan

The output must include at least:

If the user wants an audit

The output must include at least:

If the user requests direct editing

The output must include at least:

Verification quality bar

Examples

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.