An AI agent skill for scaffolding GAMA
ProcessorCardcustom cards (.crdmodules).
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.
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 cardsDataCardBase/SoleDataCardLayoutdata cards- Interface-only implementations (e.g.
ICardSearchBoxQuickAccess)
| 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. |
.
├── 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
| 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. |
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.
- Preflight — asks the user for the on-disk path of
ProjectPenguin.dll(andNSGeo3dm.dll) and decides whether to add to an existing.csprojor scaffold a new SDK-style project. - Requirements — clarifies inputs (type, count, single vs list), outputs, and category.
- Reference lookup — reads
references/api-reference.mdandreferences/examples.md, greps the officialProjectPenguin.xmlnext to the DLL for any still-unclear API, and (optionally) greps the official card source repoopen-gamafor real-world.csexamples — only grepping the cards of interest, never fetching the whole repo at once. - Generate — fills in the template, generates a fresh unique
Guid, adds thorough Chinese comments, writes the.cs(and optionally the.csproj). - Self-check — verifies inheritance, no-arg constructor, port indices,
Builddefensive pattern,usingcompleteness. - 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.
- GAMA installation with
ProjectPenguin.dll+ProjectPenguin.xml+NSGeo3dm.dll - .NET Framework 4.7.2 SDK / build tooling (the project targets
net472)
MIT © fodangithub