new-resource
Skill2 starsChanged 35 days agoApache-2.0View on GitHub
Scaffolding for a new Mazarbul resource (MCP tool, event type, entity kind, or connector). USE WHEN adding a new entity to the kernel, registering a new MCP tool, defining a new event type, or wiring a new connector. Covers schema, kernel writers, MCP surface, and tests end-to-end.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- KhaledSaeed18/node-express-boilerplatetheir own version, first seen Jul 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- KhaledSaeed18/node-express-boilerplate★ 36same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 12-principles-of-animationSkill
- aip-namingSkill
- architectSkill
- babysit-abortSkill
- babysit-prSkill
- babysit-tickSkill
- baseline-uiSkill
- commit-pushSkill
- complex-refactorSkill
- critiqueSkill
- deadSkill
- devstackSkill
- go-backendSkill
- goSkill
- go-strictSkill
- greptileSkill
- impl-checkSkill
- inspect-dbSkill
- inspect-deploySkill
- inspect-runtimeSkill
- interaction-designSkill
- issue-planSkill
- lessonsSkill
- mergeSkill
- plan-featureSkill
- preflightSkill
- pr-reviewSkill
- review-fixSkill
- reviewSkill
- shipSkill
- simplifySkill
- task-execution-protocolSkill
- teamSkill
- tui-component-browserSkill
- tui-design-labSkill
- tui-designSkill
- verifySkill
- wrap-upSkill
- write-docsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Register the tool: Add the handler to internal/mcp/server.go (or wherever the registry lives).
- Distinctive: line 25
Implement the handler: Should be ~50 LoC: parse, delegate to kernel, marshal response.
- Very specific: line 26
Error mapping: Document which JSON-RPC error codes the tool can return.
- Very specific: line 28
Docs: Add the tool to docs/reference/mcp-tools.mdx.
- Very specific: line 35
Writer: Add the kernel writer method if there's a domain-specific helper (e.g.
- Distinctive: line 36
Indexers: If the event affects a derived index (graph nodes, vector embeddings, FTS), update the indexer worker so it picks up the new kind.
- Distinctive: line 44
Migrations: If the entity needs its own table, add the migration.
- Very specific: line 50
Manifest: Create internal/plugin/connectors/<source>/manifest.toml.
- Very specific: line 51
Implementation: Add internal/plugin/connectors/<source>/<source>.go implementing the Connector interface.
- Very specific: line 52
Provenance discipline: Every event the connector writes goes through the kernel writer with source.connector = "<source>" set.
- Distinctive: line 53
Dedup strategy: Document how the connector recognizes prior events and supersedes them.
- Very specific: line 54
Scaffolding test: Use maz dev new-plugin --slot=connector to confirm the manifest is parseable.
- Distinctive: line 55
Integration test: Use a recorded fixture from the source format.
- Very specific: line 56
Docs: Add a "How to use the <source> connector" page under docs/how-to/.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Scaffold a new resource: $ARGUMENTS
Pick the right path
There are four resource kinds in Mazarbul, each with a slightly different checklist:
- MCP tool (new method on the MCP server surface).
- Event type (new shape of fact written to the event log).
- Entity kind (new class of identity, e.g.
thread,mailbox,repo). - Connector (new ingestion source plugin slot).
Confirm which kind we're adding before starting.
Process: MCP tool
- Schema first. Define the JSON Schema for input and output under
internal/mcp/schemas/<toolName>.schema.json. Follow/aip-naming. - Add Go types.
internal/mcp/types/<toolName>.gowith request + response structs andjson:tags. Doc-comments on every exported field. - Register the tool. Add the handler to
internal/mcp/server.go(or wherever the registry lives). Tool name lowerCamelCase, action verb. - Implement the handler. Should be ~50 LoC: parse, delegate to kernel, marshal response. No business logic in the handler.
- Error mapping. Document which JSON-RPC error codes the tool can return. Include
data.causefor structured causes. - Tests. Table-driven tests covering: happy path, every documented error code, edge case (empty input, oversized input). At least one test asserts the schema validates the request.
- Docs. Add the tool to
docs/reference/mcp-tools.mdx. Include example invocation and example response.
Process: event type
- Schema first. Define the event payload schema under
internal/kernel/schemas/events/<kind>.schema.json. - Add Go types.
internal/kernel/events/<kind>.gowith the typed event struct. Implement theEventinterface (or whatever the kernel uses). - Provenance. Confirm the event carries the required provenance fields (
source,confidence,time). The kernel writer enforces this; double-check the type embeds the right base. - Writer. Add the kernel writer method if there's a domain-specific helper (e.g.
kernel.AppendMessageCreated). Otherwise the generic writer is enough. - Indexers. If the event affects a derived index (graph nodes, vector embeddings, FTS), update the indexer worker so it picks up the new kind.
- Tests. Round-trip test (encode -> decode -> assert equal). At least one indexer test if you added one.
Process: entity kind
- Schema first. Define the entity schema under
internal/kernel/schemas/entities/<kind>.schema.json. Resource path<kind>s/{kind}(plural, lowercase). - Add Go types.
internal/kernel/entities/<kind>.go. - Identity discipline. Decide the ID strategy: ULID externally, numeric internally? See
agent-docs/identity.md. - Migrations. If the entity needs its own table, add the migration. SQLite migrations are forward-only; supersede via newer events.
- MCP surface. Expose
Get<Kind>,List<Kind>s,Search<Kind>sper AIP-131/132. Skip Create/Update/Delete if the entity is system-managed. - Tests. CRUD-shape tests via the MCP surface; the entity is observable only through MCP.
Process: connector
- Manifest. Create
internal/plugin/connectors/<source>/manifest.toml. Declare slot, scopes, version. - Implementation. Add
internal/plugin/connectors/<source>/<source>.goimplementing theConnectorinterface. - Provenance discipline. Every event the connector writes goes through the kernel writer with
source.connector = "<source>"set. - Dedup strategy. Document how the connector recognizes prior events and supersedes them.
- Scaffolding test. Use
maz dev new-plugin --slot=connectorto confirm the manifest is parseable. - Integration test. Use a recorded fixture from the source format; assert the resulting events.
- Docs. Add a "How to use the
<source>connector" page underdocs/how-to/.
Always finish by
Running mise run ci. The hooks will block if anything's off.
Gotchas
Concrete pitfalls encountered when using this skill. Add new ones as you hit them, this is the compounding-engineering log (see agent-docs/lessons-learned.md for the broader pattern).
- (empty, add the first real entry the next time you hit a non-obvious pitfall)
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
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.

