meshkit
Copilot instructions233 starsChanged 3 months agoApache-2.0View on GitHub
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,343 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- chrome-devtools-axiSkill
- gh-axiSkill
- iterate-prSkill
- lavishSkill
- quota-axiSkill
- agent-md-refactorSkill
- command-creatorSkill
- cut-releaseSkill
- database-schema-designerSkill
- find-skillsSkill
- gepettoSkill
- iterate-prSkill
- qa-test-plannerSkill
- reducing-entropySkill
The file
We split this copilot-instructions.md into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Use Go 1.25.x (go.mod pins go 1.26.4.
- Very specific: line 6
Prefer the repo make targets for final verification:
- Very specific: line 36
Prefer Makefile targets for final verification.
- Very specific: line 41
create errors with errors.NewV2(...) when no existing error is a well-suited fit.
- Very specific: line 42
keep static text in the description/cause/remediation arrays as string literals rather than composed constants/concatenations
- Very specific: line 43
If you add or modify structured errors, run make errorutil and usually make errorutil-analyze.
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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
Copilot Instructions
Build, test, and lint
- Use Go 1.25.x (
go.modpinsgo 1.26.4; CI uses Go 1.25). - Prefer the repo
maketargets for final verification:make test- runsgo test --short ./... -race -coverprofile=coverage.txt -covermode=atomicmake check- runsgolangci-lint run -c .golangci.yml -v ./...make tidy- runsgo mod tidyand fails ifgo.modorgo.sumchangedmake build-errorutil- builds thecmd/errorutilbinarymake errorutil- updates structured error codes and related exportsmake errorutil-analyze- analyzes structured error definitions without rewriting them
- For a single test during iteration, run Go tests directly at package scope:
go test ./models/registration -run TestGetEntityAcceptsV1Beta2RelationshipSchemaVersion -count=1- general form:
go test ./path/to/package -run TestName -count=1
High-level architecture
- This repository is primarily a shared Go library for the Meshery ecosystem, not a single application. Most top-level directories are reusable packages; the main executable entrypoints live under
cmd/, notablycmd/errorutilandcmd/syncmodutil. - The structured error pipeline spans several packages:
errors/defines the shared MeshKit error types and helpers.- package-local
error.gofiles define concrete errors for each package/component. logger/enriches log output with MeshKit error metadata such as code, severity, cause, and remediation.cmd/errorutilscans the repository, analyzes those definitions, updates placeholder codes usinghelpers/component_info.json, and writes export/analysis artifacts underhelpers/.
- The MeshModel registration pipeline is another core slice of the repo:
models/registration/ingests model packages from directories, YAML/JSON files, nested archives, and OCI artifacts, then assembles aPackagingUnit.models/meshmodel/registry/persists registrants, models, components, and relationships through GORM-backed registry helpers.- Schema definitions themselves come from
github.com/meshery/schemas; in this repo, focus on how MeshKit loads, normalizes, registers, and persists those entities rather than treating MeshKit as the schema source of truth.
- Cross-cutting infrastructure packages are intentionally reusable across services:
database/wraps GORM setup for SQLite and Postgres.tracing/provides OpenTelemetry initialization plus HTTP middleware/client transport helpers.logger/,utils/,encoding/, andconverter/provide shared support code used by Meshery services and tools.
Key conventions
- Prefer Makefile targets for final verification. Use direct
go test ./pkg -run TestNameonly for focused iteration. - Strictly honor and adhere to the established identifier naming scheme, authoritatively documented in meshery/schemas - https://github.com/meshery/schemas/blob/master/docs/identifier-naming-contributor-guide.md#canonical-naming-directory
- Structured errors follow strict repository conventions so
errorutilcan understand them:- define concrete errors in each package's
error.go - define code symbols matching
^Err[A-Z].+Code$ - create errors with
errors.NewV2(...)when no existing error is a well-suited fit; the(*errors.Error).NewV2(...)helper may also be used where applicable) - keep static text in the description/cause/remediation arrays as string literals rather than composed constants/concatenations
- define concrete errors in each package's
- If you add or modify structured errors, run
make errorutiland usuallymake errorutil-analyze.errorutilexpectscomponent_info.jsonmetadata and emitserrorutil_analyze_*.jsonpluserrorutil_errors_export.jsonartifacts underhelpers/. - MeshModel registration assumes an imported package/directory contains exactly one model definition and then any number of components/relationships associated with it.
- Registration code is intentionally permissive on input shape:
- directory import recursively unwraps nested zip/tar/OCI content
- YAML is normalized to JSON before entity detection/unmarshal
- registration accepts both legacy and canonical schema-version strings for models/components/relationships where compatibility is required
- Registration mutates asset references as part of ingestion: model/component SVG fields are written to the filesystem and replaced with file paths before persistence through
RegistryManager.
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.

