agentsmesh lint
Validate canonical files against target-specific constraints. Each target has its own linting rules — for example, Cursor requires .mdc format compliance, Claude Code validates settings.json schema, and all targets check for valid frontmatter.
Usage
agentsmesh lint [flags]Flags
| Flag | Description |
|---|---|
--targets <csv> | Limit linting to specific target IDs. |
Examples
Lint for all configured targets
agentsmesh lintLint for specific targets
agentsmesh lint --targets cursoragentsmesh lint --targets claude-code,gemini-cliWhat lint checks
All targets
- Valid YAML frontmatter in all
.mdfiles - No duplicate rule/command/agent names
- Required fields present (
root: truein_root.md,descriptionin agents) - Valid
targetsvalues (must be known target IDs) - Valid
globspatterns (syntactically valid gitignore patterns)
Claude Code
settings.jsonschema validation- Valid
permissionModevalues (ask,default,none) - Valid tool names in
allowed-toolsandpermissions.yaml
Cursor
.mdcfrontmatter format compliance- Valid
triggervalues for Cursor rules
MCP servers
- Valid JSON in
mcp.json - Required fields per server type (
commandfor stdio,urlfor HTTP)
Hooks
- Valid hook event types (
PreToolUse,PostToolUse, etc.) - Required fields (
matcher,type) - Valid
typevalues (command,prompt)
Exit codes
| Code | Meaning |
|---|---|
0 | No lint errors found. |
1 | One or more lint errors. |
Integrating with CI
Add lint to your CI pipeline alongside check:
- name: Lint AgentsMesh config run: npx agentsmesh lint
- name: Check AgentsMesh sync run: npx agentsmesh checkThis catches both config errors and drift in the same pipeline.