MCP_Market_Distribution: Command for Claude Code

.claude/commands/setup/setup-trusted-publishers.md

setup-trusted-publishers is a command for Claude Code from g-digital-by-Garrigues/MCP_Market_Distribution. It costs 39 tokens per session (810 once invoked), scanned A, original, MIT.

A command that grants npm Trusted Publishing access to every MCP and n8n package listed in mcp-pipeline.yaml. Trusted Publishing lets a GitHub workflow publish packages without storing long-lived npm passwords or tokens.

In plain words
What is it for?
Use it to configure publishing permissions for all packages in an npm pipeline. It reads the package list, removes duplicates, and grants GitHub-based publishing access.
Why use it?
It removes the need to manage permanent npm tokens and helps restrict publishing to the repository's main workflow. It also checks required npm, account, organisation, and repository settings before making changes.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is g-digital-by-Garrigues/MCP_Market_Distribution's own configuration. It tells Claude Code how to work on MCP_Market_Distribution itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything MCP_Market_Distribution configures →

Reuse

Borrowing it

Nothing to install: this file belongs to g-digital-by-Garrigues/MCP_Market_Distribution. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/g-digital-by-Garrigues/MCP_Market_Distribution/main/.claude/commands/setup/setup-trusted-publishers.md
Clone the repo
git clone --depth 1 https://github.com/g-digital-by-Garrigues/MCP_Market_Distribution

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-trusted-publishers

README.md
[![agentmods](https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers/github.svg)](https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers)
Your own site
<a href="https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers"><img src="https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup-trusted-publishers

Your own site · 80×15
<a href="https://agentmods.dev/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers"><img src="https://agentmods.dev/badge/commands/g-digital-by-garrigues/mcp_market_distribution/setup-trusted-publishers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 810 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00810
Opus 5 $0.00019 $0.00405
Sonnet 5 $0.00008 $0.00162
Haiku 4.5 $0.00004 $0.00081

Measured 12d ago against content hash 3265c51a916f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

setup-trusted-publishers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/setup/setup-trusted-publishers.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/setup-trusted-publishers — Wire npm Trusted Publishing

You are wiring npm Trusted Publishing for every package declared in mcp-pipeline.yaml. After this skill, the publish.yml workflow on main is the only path that can publish to the registered packages — no long-lived npm tokens needed (NFR-S2).

Pre-flight (block on any failure)

  • npm --version must be ≥ 11.10. If older, tell the engineer to winget upgrade --id OpenJS.NodeJS.LTS (Windows) or update via their package manager.
  • npm whoami must succeed AND the engineer must be a member of the @g-digital org (npm org ls @g-digital should include their username). If not, surface "log in with npm login --scope=@g-digital as an org owner first" and exit non-zero.
  • The repo root must contain mcp-pipeline.yaml and a git remote get-url origin returning a GitHub URL the skill can parse as <owner>/<repo>.

What the skill runs

Invoke the helper that reads mcp-pipeline.yaml, iterates every entry, derives the two npm package names per entry (npm_package_name and <npm_scope>/<n8n_adapter_target_name>), de-duplicates, and runs npm trust grant --provider github --owner <owner> --repo <repo> --workflow publish.yml --package <package> for each:

pnpm tsx src/setup/run-trusted-publishers.ts [--dry-run] [--owner <name>] [--repo <name>] [--workflow <file>]

Default behavior:

  • --owner and --repo are inferred from git remote get-url origin. Pass explicit flags to override.
  • --workflow defaults to publish.yml.
  • --dry-run prints what would happen without invoking npm.

The helper emits structured JSON with per-package outcomes and counts under four classifications:

  • configured — newly granted in this run.
  • already-configured — npm reported the grant was already in place; no-op.
  • package-not-published — the package doesn't exist on npm yet; publish a 0.0.0-bootstrap version first, then re-run the skill. This is the documented bootstrap order.
  • failed — anything else; the detail field carries the stderr line.

Read the full file on GitHub · 49 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 49 lines · 39 tokens per session scan A 3265c51a916f

Subscribe to this mod's changes

setup-trusted-publishers is a command published in the GitHub repository g-digital-by-Garrigues/MCP_Market_Distribution (0 stars, last pushed 3d ago), licensed MIT. It adds 39 tokens to every session and 810 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.