agentleFS
shuvamkshuvamk/openbench/.claude/skills/engine-adapter-scaffold/SKILL.md

engine-adapter-scaffold

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Scaffolds a new MCP server wrapping an external engine (KiCad, ngspice, Renode, PlatformIO…) with the standard import/export/validate tool contract, round-trip test harness, and engine-status.md entry. Use when onboarding any new engine.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every engine gets one package: packages/mcp-<engine>, an MCP server speaking IR.

    line 8
  2. Very specific:

    Every produced document is stamped provenance: { source: "mcp-<engine>", at: ISO }.

    line 32
  3. Very specific:

    Update .context/engine-status.md status row + .context/architecture.md if the engine adds a new capability class.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

engine-adapter-scaffold

Every engine gets one package: packages/mcp-<engine>, an MCP server speaking IR.

Layout to generate

packages/mcp-<engine>/
├── package.json          # name @openbench/mcp-<engine>, deps: @openbench/ir-schema, @modelcontextprotocol/sdk
├── tsconfig.json         # extends ../../tsconfig.base.json
├── src/
│   ├── index.ts          # public API: importNative, exportNative, validate (pure functions)
│   ├── server.ts         # MCP server registering the tools (thin wrapper over index.ts)
│   └── <engine>/         # engine-specific parsing/serialization
└── test/
    ├── contract.test.ts  # THE round-trip contract: import(export(doc)) toEqual doc
    └── fixtures/         # real native-format samples (checked in, small)

The standard tool contract (non-negotiable)

  • import(nativeFormat) -> IR document(s) — never throws raw engine errors; returns structured { ok, documents | errors }.
  • export(IR document) -> nativeFormat
  • validate(IR document) -> { valid, errors: [{ path, message }] } — delegates to @openbench/ir-schema then adds engine-specific constraints.
  • Every produced document is stamped provenance: { source: "mcp-<engine>", at: ISO }.

Order of work (TDD)

  1. Red: contract.test.ts with a minimal fixture → commit.
  2. Green: parser/serializer until round-trip holds.
  3. Lossy fields discovered → document them in .context/engine-status.md (same PR; the reviewer gate enforces this for packages/mcp-* changes).
  4. MCP server.ts last — it is a thin adapter over tested pure functions.
  5. Update .context/engine-status.md status row + .context/architecture.md if the engine adds a new capability class.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.