New agent rule
🏵️ MCP Server with CLI interface ready for distribution
npx -y skills add Miyamura80/MCP-Template --skill new-agent-ruleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Guide for creating a new path-scoped .claude/rules/ file with proper globs frontmatter and structure.
SKILL.md
1.6 KB, as published. Nobody here has run it
Creating a new path-scoped rule
Rules keep CLAUDE.md lean by scoping guidance to specific file paths. A rule applies when the agent touches files matching its globs: pattern.
When to create a rule
- Guidance applies to a specific directory or file pattern, not the whole repo
- The guidance is long enough that embedding it in CLAUDE.md would bloat the file
- Multiple agents (or future tools) should pick up the same guidance automatically
Naming and location
- Source of truth:
.claude/rules/<name>.md - Name:
snake_case.mddescribing the area (e.g.,api_routes.md,test_conventions.md) - Mirror:
.agents/rules/<name>.md(symlink, created bymake sync-agent-config)
Frontmatter format
Use globs: (NOT paths: -- it has known silent-failure bugs):
---
description: One-line summary of what this rule covers
globs:
- "src/api/**"
- "tests/api/**"
---
Pick the narrowest set of globs that covers the area. Overly broad globs waste context on unrelated tasks.
Workflow
- Check if CLAUDE.md already covers this guidance (if so, migrate it to a rule)
- Write
.claude/rules/<name>.mdwithglobs:frontmatter - Run
make sync-agent-configthenmake ci
Anti-patterns
- Forgetting
globs:frontmatter (rule loads on every task, defeating the purpose) - Restating what CLAUDE.md already says (keep rules additive, not duplicative)
- Using
paths:instead ofglobs:(known silent-failure bugs in Claude)