Skip to content

fodangithub/processorcard-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

processorcard-builder

An AI agent skill for scaffolding GAMA ProcessorCard custom cards (.crd modules).

processorcard-builder guides an AI agent to generate C# classes that inherit from ProjectPenguin.Cards.ProcessorCardBase, following the official BasicCards examples (Math / Curve / String). The output compiles to a .dll, which is renamed to .crd and loaded by GAMA as a custom processor card.

Scope

Covers any class that inherits ProcessorCardBase, whether directly or via an official derived base such as InputSideAutoParseNumberProcessorCard:

  • addition cards, math cards, curve cards, string cards
  • OneByOne / ListByList / ContainerAsOne data-processing modes
  • single-output, multi-output, list-input, optional-port, multi-type cards

Does NOT cover (the skill will refuse and stop):

  • [CardClass]-attributed or otherwise non-standard-registered cards
  • DataCardBase / SoleDataCardLayout data cards
  • Interface-only implementations (e.g. ICardSearchBoxQuickAccess)

Skill metadata

Field Value
Name processorcard-builder
Description Build GAMA custom cards by subclassing ProjectPenguin.Cards.ProcessorCardBase.
Triggers "create a GAMA ProcessorCard", "数据处理卡片", "二次开发卡片", ".crd module", "addition card", etc.

Repository layout

.
├── SKILL.md                         # Agent-facing skill instructions
├── references/
│   ├── api-reference.md             # ProcessorCardBase / IDataDelivery / types / using
│   └── examples.md                  # Official examples A–I, organized by shape
├── assets/
│   ├── ProcessorCardTemplate.cs     # Copy-and-fill skeleton
│   └── CardProject.csproj           # SDK-style .csproj template (net472, Private=false)
├── README.md
├── CHANGELOG.md
└── LICENSE

External references (not bundled, used on demand)

Source When to use How to use
ProjectPenguin.xml (next to ProjectPenguin.dll) API of ProcessorCardBase / IDataDelivery / types still unclear grep the class or member name to find the <member> node in the official XML doc comments.
open-gama (Gitee) references/examples.md lacks the detail you want to mimic (port modes, logging, type handling, etc.) Only grep the cards you are interested in — do not try to fetch them all at once. Search by class name, port method, or keyword on the Gitee web UI / git grep, then read just the matching .cs files.

Install (for use with an agent)

Copy (or symlink) this directory into your agent's skills folder, e.g.:

~/.config/opencode/skills/processorcard-builder/
# or
~/.agents/skills/processorcard-builder/

The agent picks up SKILL.md automatically and uses references/ and assets/ on demand.

How the skill works

  1. Preflight — asks the user for the on-disk path of ProjectPenguin.dll (and NSGeo3dm.dll) and decides whether to add to an existing .csproj or scaffold a new SDK-style project.
  2. Requirements — clarifies inputs (type, count, single vs list), outputs, and category.
  3. Reference lookup — reads references/api-reference.md and references/examples.md, greps the official ProjectPenguin.xml next to the DLL for any still-unclear API, and (optionally) greps the official card source repo open-gama for real-world .cs examples — only grepping the cards of interest, never fetching the whole repo at once.
  4. Generate — fills in the template, generates a fresh unique Guid, adds thorough Chinese comments, writes the .cs (and optionally the .csproj).
  5. Self-check — verifies inheritance, no-arg constructor, port indices, Build defensive pattern, using completeness.
  6. Deliver — returns full source plus post-build instructions (reference DLLs with Copy Local = No, compile, rename .dll.crd, drop into %AppData%\nonstructure\Penguin\Cards, restart GAMA).

See SKILL.md for the full, authoritative workflow.

Requirements

  • GAMA installation with ProjectPenguin.dll + ProjectPenguin.xml + NSGeo3dm.dll
  • .NET Framework 4.7.2 SDK / build tooling (the project targets net472)

License

MIT © fodangithub

About

a skill that will instruct an agent how to create/modify a card of GAMA

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages