-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add mcp-skill-deployer — Universal MCP & Skill publisher #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| description: "mcp-skill-deployer: when the user explicitly asks to audit, score, optimize, inspect, package, or publish an MCP server or Agent Skill project, run compliance checks, quality scoring, guided optimization, and export file generation. Never execute npm publish, git push, or registry commands without per-step user confirmation." | ||
| globs: "**/package.json,**/skills/**" | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # mcp-skill-deployer | ||
|
|
||
| Only activate when the user explicitly requests to audit, optimize, inspect, package, or publish an MCP or Skill project (e.g., "/mcp-skill-deployer", "score my skill", "optimize my MCP", "check and publish my project"). | ||
|
|
||
| ## Mode Selection | ||
| Pick the mode from user intent — do NOT default to full publishing: | ||
| - **Audit**: "check / score my project" → Phases 0-2 only (read-only report) | ||
| - **Optimize**: "optimize / fix my project" → Phases 0-3 (edits require per-item confirmation) | ||
| - **Publish**: "publish / release my project" → full pipeline (Phases 0-6) | ||
|
Comment on lines
+9
to
+15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== file excerpt =="
sed -n '1,120p' rules/mcp-skill-deployer.mdc 2>/dev/null || true
echo "== occurrences of inspect/package/modes/phases =="
rg -n "inspect|package|Audit|Optimize|Publish|Phase [0-9]|post-publish|summary|Phases" rules/mcp-skill-deployer.mdc 2>/dev/null || trueRepository: PatrickJS/awesome-cursorrules Length of output: 4367 Define phases for
🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 0: Pre-flight Audit | ||
| - Run `npm whoami` (publish mode only), `git status` (read-only checks only) | ||
| - Scan for leaked secrets (API keys, tokens, .env content) | ||
| - Validate `package.json` or `skills/*/SKILL.md` structure | ||
|
|
||
| ## Phase 1: Project Inspection | ||
| - Auto-detect: MCP-only / Skill-only / hybrid | ||
|
Comment on lines
+19
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Validate both project types in hybrid mode. The rule can detect a hybrid project, but 🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 2: Quality Audit & Scoring | ||
| - Score against the 100-point checklist (MCP: tool naming/descriptions, schemas, error handling, token efficiency, registry metadata; Skill: description triggerability, length, executable steps, trigger boundaries, confirmation gates) | ||
| - Output report: total score, A/B/C/D grade, prioritized fix list (blockers → high impact → polish) | ||
|
Comment on lines
+25
to
+27
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Specify the scoring rubric and grade thresholds. The rule requires a 100-point score and A/B/C/D grade but defines neither criterion weights nor grade boundaries. Without those values, scores will be non-reproducible and different runs can produce inconsistent recommendations. 🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 3: Optimization (WITH PER-ITEM CONFIRMATION) | ||
| - Show diff preview per fix, apply only after user approval | ||
| - Never change core functionality or delete user content | ||
| - Re-score after fixes and show before/after comparison | ||
|
|
||
| ## Phase 4: Platform Export (file generation) | ||
| - Generate export files (.mdc, .yml, .txt, .json) for target platforms | ||
| - Never overwrite existing user files without asking | ||
|
Comment on lines
+34
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Apply the confirmation gate to every file write, not only overwrites and publishing. The current wording allows new export files to be generated without explicit approval, while the “ANY write/send” rule is scoped only to Phase 6. Define one global confirmation policy covering optimization edits, new export files, tags, pushes, and registry submissions. 📍 Affects 1 file
🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 5: Testing & Security | ||
| - Run `npm test` or `pytest` | ||
| - Run `npm pack --dry-run` (dry-run only) | ||
|
Comment on lines
+38
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift Add an execution-safety boundary around project tests.
🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 6: Publishing (WITH MANDATORY CONFIRMATION) | ||
| - Before ANY write/send operation, ask the user: "I'm about to [action]. Proceed? (yes/no)" | ||
| - **Track A (MCP)**: Ask confirmation before each: `npm publish`, Smithery submit, Anthropic registry submit | ||
| - **Track B (Skill)**: Ask confirmation before each: `git tag`, `git push` | ||
| - Never execute registry or git write operations without explicit user approval | ||
|
|
||
| ## Phase 7: Summary | ||
| - Print read-only summary: compliance status, before/after quality score, export files generated, executed actions, pending manual submissions | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: PatrickJS/awesome-cursorrules
Length of output: 50385
🌐 Web query:
Claude Code rules mdc globs alwaysApply format load rules outside globs explicit commands💡 Result:
Claude Code configuration differs significantly from Cursor's.mdc rules [1][2][3]. While Cursor uses frontmatter with globs and alwaysApply inside.mdc files, Claude Code uses a separate system centered on CLAUDE.md and the.claude/rules/ directory [1][4]. Key configuration mechanisms for Claude Code include: 1. CLAUDE.md and.claude/rules/ Claude Code automatically loads instructions from CLAUDE.md (at the project root or subdirectories) and any.md files located in the.claude/rules/ directory [1][4][5]. Rules without path-scoped frontmatter are loaded into the context at session launch and apply globally [4][6]. 2. Scoping Rules with Paths To avoid loading all rules into context constantly, you can use frontmatter in individual.md files within.claude/rules/ [4][5]. Use the paths field to define which files trigger the rule [4][7][5]. - Format: Add a YAML frontmatter block to your rule file [4]. - Trigger: The rule is loaded into context only when Claude interacts with files matching the paths pattern [4][6][5]. - Syntax: Use unquoted comma-separated values for patterns (e.g., paths: src//.ts, lib//.ts) [7]. 3. Globs vs. Paths Claude Code documentation uses the paths field for conditional loading [4]. While some community discussions mention globs, paths is the officially supported field for file-specific scoping [4][7]. Note that older or incorrect configuration might attempt to use globs or alwaysApply syntax intended for Cursor; these do not function natively as "alwaysApply" toggles in Claude Code [1][2][7]. 4. Explicit Commands and Skills For task-specific instructions that should not be in the context unless necessary, use skills instead of rules [4][6]. Skills are located in.claude/skills/ and are invoked explicitly by the user or chosen by Claude when relevant [4][8][9]. This approach saves context space compared to global rules [6][5]. 5. Managing Rule Priority - Project rules are loaded recursively; files in subdirectories add context when working in those areas [1][4]. - You can maintain modularity by splitting large instructions into multiple files in.claude/rules/, using path-based scoping to ensure they only consume context when relevant [4][5]. In summary, do not use Cursor-style alwaysApply or glob frontmatter in Claude Code [1][2]. Instead, organize instructions into.claude/rules/ files and use the paths frontmatter to scope them, or create skills for on-demand use [4][5].
Citations:
🌐 Web query:
Cursor Project Rules .mdc globs alwaysApply behavior **/* rule only activates with globs💡 Result:
In Cursor's rule system, setting
alwaysApply: truein an.mdcfile is intended to force the rule to be included in every chat session, regardless of context [1][2][3]. WhenalwaysApplyis set totrue, theglobsanddescriptionfields are explicitly ignored [1][2][4]. The behavior where a rule only activates viaglobssuggests that thealwaysApplysetting is either not being registered astrueor is being overridden [5][6]. Technical documentation and community reports confirm that: 1. Intentional Interaction: WhenalwaysApply: trueis set,globsare semantically unnecessary and ignored [1][5]. Including both can sometimes cause confusion in rule evaluation if the configuration is improperly parsed [5]. 2. Potential Issues: Users have reported regressions where rules withalwaysApply: truewere silently downgraded to "Applied Intelligently" (agent-requested) or "requestable" status in certain Cursor versions [7][5][6]. If your rules are behaving as if they are governed byglobs, the application may be failing to honor thealwaysApply: trueflag [5][6]. 3. Recommended Troubleshooting: - Ensure the frontmatter is correctly formatted YAML [4][8]. - If the rule is not applying as expected, try removing theglobsfield entirely whenalwaysApply: trueis used [5]. - Verify in the Cursor "Rules" settings panel that the rule type is explicitly listed as "Always Apply" and not "Auto Attached" or "Agent Requested" [6]. - Check that you are not running both a legacy.cursorrulesfile and competing.mdcrules that might create conflicting behavior [5][6]. If the rule still only fires based on globs, it is likely that thealwaysApplyproperty is being ignored, effectively reverting the rule to an "Auto Attached" state [6][9]. Updating to the latest version of Cursor is recommended, as previous version-specific bugs regardingalwaysApplyprecedence have been patched [7].Citations:
🌐 Web query:
Cursor Project Rules alwaysApply false globs optional explicit commands💡 Result:
In Cursor,
.mdcproject rules use YAML frontmatter to determine how and when instructions are applied to the AI agent [1][2]. ThealwaysApplyproperty is a boolean that, when set totrue, is intended to force the rule to be included in every chat session, regardless of context [1][3]. However, technical documentation and community reports indicate thatalwaysApply: trueis designed to override other selection mechanisms (likeglobsordescription-based intelligent application) [1][4]. WhenalwaysApplyistrue, theglobsanddescriptionfields are effectively ignored [1][2]. If you find that analwaysApply: truerule is not being correctly injected into your context, it may be due to a known discrepancy in certain versions of Cursor where the engine fails to trigger the rule without an accompanying catch-all glob pattern [5]. In such cases, users have reported that explicitly addingglobs: ["*"]resolves the issue by forcing the rule to match every file, effectively achieving the desired "always on" behavior [5]. Key characteristics ofalwaysApplyand related fields: - alwaysApply: true: The rule is always included in the agent's context [1][6]. Use this sparingly for global project conventions, as it consumes tokens in every interaction [3][7]. - alwaysApply: false (Default): The rule's application depends on other metadata [4][2]. - If globs are provided: The rule auto-attaches when a matching file is in the current context [1][4]. - If a description is provided (without globs): The rule applies "intelligently," where the agent evaluates the description to determine relevance [1][4]. - If no globs or description are provided: The rule becomes manual-only, requiring an explicit@-mention(e.g.,@rule-name) in the chat to be triggered [4][2]. For optimal rule management, it is recommended to use.mdcfiles in the.cursor/rules/directory rather than the legacy.cursorrulesfile, as the.mdcformat supports these specific frontmatter controls [1][7].Citations:
🌐 Web query:
Cursor project rules only applies when file matches globs alwaysApply false documentation💡 Result:
In Cursor, project rules defined in.mdc files use the alwaysApply frontmatter field to determine their activation behavior [1][2]. When alwaysApply is set to false, the rule's application depends on the presence of other frontmatter fields like globs or description [1][3][2]. Specifically, when alwaysApply is set to false and you provide a globs field, the rule is "auto-attached" [1][3][2]. This means the rule is automatically included in the AI agent's context whenever the agent reads, edits, or references a file that matches the specified glob pattern [3][4][5]. Key points regarding this behavior include: - Triggering Mechanism: Glob-scoped rules (alwaysApply: false) are not active at the start of a chat session [5]. They are injected into the agent's context dynamically when the agent interacts with a matching file during its workflow [4][6][5]. - Configuration Syntax: To ensure glob patterns are recognized correctly, use a plain, comma-separated string (e.g., globs: /.ts, /.tsx) rather than complex YAML list formatting, which can sometimes be misparsed [6]. - Fallback Behavior: If a rule has alwaysApply: false, no globs, and no description, it defaults to Manual, meaning it will never be applied unless you explicitly
@-mentionthe rule in your chat [1][3][2]. - Precedence: Setting alwaysApply: true overrides all other settings, forcing the rule to be included in every chat session regardless of the file context [1][2]. If you find that your glob-scoped rules are not appearing, ensure the file is an.mdc file (not.md), the frontmatter syntax is correct, and that the agent has actually accessed or worked with a file matching your glob pattern [3][7][6].Citations:
Make the MCP project rule available when user files are outside the current globs.
With
alwaysApply: false, this rule only auto-attaches through**/package.jsonand**/skills/**. MCP servers that expose files outside those paths, or projects whose relevant source/config files are elsewhere, can miss the workflow entirely. Add broader matching for the MCP project (**/*if intended) oralwaysApply: trueif the rule should run on explicit MCP/skill commands from any file context.🤖 Prompt for AI Agents