AI Supply Chain Guard

Agent-facing install guide for a portable, tool-agnostic supply-chain defense skill.

If a human gave you this repository URL and said something like "install this skill URL", install the supply-chain-guard/ folder from this repo. Do not run package-manager installs, setup scripts, generators, or one-line installers from this repository. The installable unit is plain Markdown: supply-chain-guard/SKILL.md plus optional reference files under supply-chain-guard/references/.

Repository URL:

https://github.com/ZarK/ai-supply-chain-guard

First Use

After installing, read the installed skill and apply it to the current repository:

Use the supply-chain-guard skill before dependency, package-manager, CI, release, IDE-extension, MCP, or AI-agent-tool work in this repo. First inspect the manifests, lockfiles, workflows, package-manager config, and agent/tooling config. Then report what protections are missing before making changes.

For humans, the shortest instruction to give your agent is:

Install this skill and use it before dependency or CI work: https://github.com/ZarK/ai-supply-chain-guard

Agent Install Contract

You are installing a local agent skill, not a software package.

  1. Fetch the repository into a temporary directory.
  2. Verify that supply-chain-guard/SKILL.md exists.
  3. Copy the full supply-chain-guard/ directory into the user's agent skill location.
  4. If the target tool does not have native skills, add a small bridge instruction that points at the installed skill.
  5. Verify by reading the installed SKILL.md.
  6. Start using the skill before dependency, package-manager, CI, release, IDE-extension, MCP, or AI-agent-tool work.

Do not duplicate the full skill into multiple instruction files. Keep one canonical copy of the skill and use bridges that point to it.

Quick Install For Agents

Use this flow when the user did not name a specific tool.

repo_tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/ZarK/ai-supply-chain-guard.git "$repo_tmp/ai-supply-chain-guard"
test -f "$repo_tmp/ai-supply-chain-guard/supply-chain-guard/SKILL.md"

Preferred project-local install:

mkdir -p .agents/skills
rm -rf .agents/skills/supply-chain-guard
cp -R "$repo_tmp/ai-supply-chain-guard/supply-chain-guard" .agents/skills/supply-chain-guard
test -f .agents/skills/supply-chain-guard/SKILL.md

Portable global install:

skills_dir="${AGENT_SKILLS_DIR:-$HOME/.agents/skills}"
mkdir -p "$skills_dir"
rm -rf "$skills_dir/supply-chain-guard"
cp -R "$repo_tmp/ai-supply-chain-guard/supply-chain-guard" "$skills_dir/supply-chain-guard"
test -f "$skills_dir/supply-chain-guard/SKILL.md"

If your agent has a native skills directory, use that directory instead of .agents/skills, but preserve this layout:

<skills-root>/
`-- supply-chain-guard/
    |-- SKILL.md
    `-- references/

Bridge Instruction

For tools that read repository instructions such as AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, Cursor rules, Windsurf rules, or similar files, add this bridge:

# Supply Chain Guard

Before any install, update, scaffold, package-manager command, CI action/workflow change, IDE/MCP/agent-tool change, release job, or dependency-provided tool execution, read and follow `.agents/skills/supply-chain-guard/SKILL.md`.

For deeper guidance, load only the relevant file from `.agents/skills/supply-chain-guard/references/`.

For a global-only install, adapt the path in the bridge to the global skill location, for example ~/.agents/skills/supply-chain-guard/SKILL.md.

What This Skill Is

AI Supply Chain Guard is an agent skill that makes coding agents and human reviewers defensive around dependencies and developer tooling. It is meant to reduce preventable exposure to package compromise, CI compromise, malicious install scripts, dependency confusion, unsafe generators, poisoned caches, compromised actions, suspicious IDE extensions, risky MCP servers, and AI-agent tool persistence.

The skill tells an agent to:

  • prefer no new dependency when existing code is enough
  • pin exact versions and preserve lockfiles
  • block or review young package releases before adoption
  • disable lifecycle scripts by default
  • treat package-manager commands and project generators as code execution
  • verify signatures, provenance, attestations, repositories, workflows, refs, builders, and artifact digests where supported
  • remember that valid provenance proves origin or integrity, not that code is safe
  • treat CI actions, reusable workflows, caches, artifacts, release jobs, IDE extensions, MCP servers, and agent tools as dependencies
  • isolate risky installs from valuable credentials
  • stop for human approval on ambiguous or high-risk supply-chain actions
  • guide incident response when malicious code may have executed

When To Invoke It

Use the skill before touching any of these:

  • package manifests, dependency files, lockfiles, or package-manager config
  • npm, npx, pnpm, yarn, bun, deno, uv, pip, poetry, pipenv, cargo, go, mvn, gradle, dotnet, bundle, composer, pod, package installers, or project generators
  • GitHub Actions, reusable workflows, workflow templates, CI caches, artifacts, release jobs, or publish pipelines
  • Dockerfiles, container image references, binary downloads, one-line shell installers, or generated toolchains
  • VS Code/Open VSX/Cursor/Windsurf/JetBrains extensions, MCP configs, AI-agent tools, or automation permissions
  • active advisories, suspected compromise, publish or release authentication failures, suspicious dependency changes, unexpected scripts, new transitive sources, or suspected credential exposure

Compatibility Pattern

The installable skill follows the common agent skill structure:

supply-chain-guard/
|-- SKILL.md
`-- references/
    |-- attack-patterns.md
    |-- ci-and-repository-hardening.md
    |-- ecosystem-playbooks.md
    |-- incident-response.md
    |-- npm-trusted-publishing.md
    |-- package-manager-configs.md
    |-- threat-model-and-rules.md
    `-- tooling.md

Compatibility choices:

  • SKILL.md is the only required entrypoint.
  • YAML frontmatter contains name and description.
  • Deep detail is in one-level references/ files so agents load only what they need.
  • There are no hidden installers, binaries, package manifests, or tool-specific runtime dependencies.
  • The root README is for installation and orientation; the skill itself is the supply-chain-guard/ directory.

Versioning And Releases

Released versions are Git tags such as v1.0.0.

The source SKILL.md does not carry an embedded version. This avoids drift between frontmatter and the repository release. To pin an install, use a Git tag or commit SHA instead of a branch name.

Release artifacts package only the installable supply-chain-guard/ directory and include a SHA-256 checksum.

What The Skill Teaches

For the deeper tutorial, read supply-chain-guard/references/threat-model-and-rules.md. It explains why the rules exist, including:

  • legitimate package releases that briefly ship malicious versions
  • install-time scripts, source builds, generators, and one-shot CLIs as code execution
  • package-age gates and cooldown exceptions for urgent security fixes
  • provenance, trusted publishing, signatures, and attestations as identity/integrity signals rather than malware verdicts
  • GitHub Actions, reusable workflows, cache scopes, artifacts, tags, and release jobs as supply-chain dependencies
  • pull_request_target, poisoned caches, mutable action tags, and overbroad OIDC permissions
  • npm Trusted Publishing, staged publishing, exact identity matching, safe release diagnostics, and package bootstrap flows
  • trust downgrade, exotic sources, Git dependencies, tarballs, and registry confusion
  • IDE extensions, MCP servers, AI-agent config, and editor marketplaces as executable supply-chain surfaces
  • incident response when a malicious dependency may have exposed workstation, CI, SCM, registry, or cloud credentials

Recommended Companion Controls

This skill changes agent behavior. It should be paired with real controls where the user's environment supports them:

  • install-time malware blocking, registry proxying, or package intelligence on developer machines and CI runners
  • exact versions, frozen installs, checked-in lockfiles, and lifecycle scripts disabled by default
  • native package-age gates such as npm min-release-age (CLI 11.10.0+), pnpm minimumReleaseAge, Yarn npmMinimalAgeGate, Bun minimumReleaseAge, Deno minimumDependencyAge, uv exclude-newer, and pip --uploaded-prior-to
  • dependency review, vulnerability alerts, code scanning, secret scanning with push protection, signed commits, and repository rulesets
  • trusted publishing, short-lived OIDC credentials, protected release environments, and artifact/provenance verification
  • isolated dev containers, VMs, Codespaces, or short-lived runners for risky dependency work

Use third-party products only when they fit the user's environment, budget, and trust model. This skill is not tied to any vendor.

Example Prompts

See examples/README.md for short prompts covering repository review, dependency review, dependency diffs, CI/release review, incident triage, and a comprehensive full review.

Install In Agentic Coding Tools

Tool behavior changes quickly. Prefer the tool's current documentation when it differs from this table. The safest portable pattern is always the same: install supply-chain-guard/ intact, then add a bridge instruction that points at the installed SKILL.md. When a tool supports .agents/skills/, use that folder first. Tool-specific directories are adapters, not a second copy of the skill.

Tool Best install target Agent setup instruction
Devin .agents/skills/supply-chain-guard/SKILL.md Commit the portable skill folder. Ask Devin to use supply-chain-guard before dependency, package-manager, CI, release, IDE-extension, MCP, or agent-tool work.
Grok Bot .agents/skills/supply-chain-guard/ or ~/.agents/skills/supply-chain-guard/ Copy the portable skill folder to the project path or the user path. On Windows the user path is still ~/.agents/skills/supply-chain-guard/. Add an AGENTS.md bridge. Shared assistant workflows must consume that same skill folder. Do not create a second copy.
Grok Build .agents/skills/supply-chain-guard/, .grok/skills/supply-chain-guard/, or ~/.grok/skills/supply-chain-guard/ Prefer the portable .agents/skills/ folder. Native adapters are .grok/skills/ and ~/.grok/skills/. Grok Build also reads ~/.agents/skills/ and AGENTS.md.
Claude Code .claude/skills/supply-chain-guard/SKILL.md or ~/.claude/skills/supply-chain-guard/SKILL.md Copy the skill folder to Claude Code's skills directory. Add a CLAUDE.md bridge if the project also needs repository-level activation.
OpenAI Codex / Codex CLI .agents/skills/supply-chain-guard/ or ~/.agents/skills/supply-chain-guard/ plus AGENTS.md Commit the portable skill folder. Codex scans .agents/skills from the working directory up to the repository root. For user-wide use, copy the folder to ~/.agents/skills/.
GitHub Copilot Coding Agent / Copilot Chat .agents/skills/supply-chain-guard/, .github/skills/supply-chain-guard/, AGENTS.md, and .github/copilot-instructions.md Commit the portable skill folder. Copilot also loads .github/skills/ and .claude/skills/. Keep the AGENTS.md and .github/copilot-instructions.md bridges.
VS Code Copilot Agent Mode .agents/skills/supply-chain-guard/ or .github/skills/supply-chain-guard/ plus AGENTS.md or .github/instructions/*.instructions.md Commit the portable skill folder. Add a bridge that applies to manifests, lockfiles, workflows, Dockerfiles, release scripts, and agent/MCP config.
Cursor .agents/skills/supply-chain-guard/ or .cursor/skills/supply-chain-guard/ plus AGENTS.md Commit the portable skill folder. Cursor also loads .cursor/skills/ and ~/.agents/skills/. A .cursor/rules file may point at the installed SKILL.md. Do not fork the skill.
Windsurf Cascade / Devin Desktop .agents/skills/supply-chain-guard/ plus .devin/rules/ or .windsurf/rules/ and AGENTS.md Devin Desktop prefers .devin/rules/ and still reads .windsurf/rules/. Keep the portable skill folder and an AGENTS.md bridge.
Sourcegraph Amp .agents/skills/supply-chain-guard/ plus AGENTS.md Commit the portable skill folder. Amp loads project skills from .agents/skills/ and personal skills from ~/.agents/skills/ or ~/.config/agents/skills/.
Google Gemini CLI GEMINI.md and/or AGENTS.md Add the bridge to GEMINI.md. Keep the portable skill in .agents/skills/.
Google Jules AGENTS.md Jules-compatible setup is the portable AGENTS.md bridge plus the skill folder.
Replit Agent .agents/skills/supply-chain-guard/SKILL.md, replit.md, or custom_instruction/instructions.md Include the skill folder in project templates. Add the bridge to project or organization instructions.
JetBrains Junie .agents/skills/supply-chain-guard/, .junie/skills/supply-chain-guard/, and .junie/AGENTS.md or AGENTS.md Keep the portable skill folder. Copy it to .junie/skills/ when you want a Junie adapter. Add the bridge to .junie/AGENTS.md or root AGENTS.md.
Kiro (formerly Amazon Q Developer CLI) .agents/skills/supply-chain-guard/, .kiro/skills/supply-chain-guard/, or ~/.kiro/skills/supply-chain-guard/ Prefer the portable folder. Copy it to .kiro/skills/ or ~/.kiro/skills/ as a Kiro adapter. Keep an AGENTS.md bridge. Steering files are not a second copy of the skill.
Factory Droid .agents/skills/supply-chain-guard/, .factory/skills/supply-chain-guard/SKILL.md, or AGENTS.md Prefer the portable folder. Factory also loads .factory/skills/ and ~/.agents/skills/. Keep an AGENTS.md bridge.
OpenCode .agents/skills/supply-chain-guard/, .opencode/skills/supply-chain-guard/, or AGENTS.md Commit the portable skill folder. OpenCode also loads .opencode/skills/ and ~/.agents/skills/. Keep an AGENTS.md bridge.
OpenHands .agents/skills/supply-chain-guard/ plus AGENTS.md Prefer .agents/skills/. Legacy .openhands/skills/ and .openhands/microagents/ still load. Do not put dependency install commands in setup scripts unless they pass this skill's review.
Aider CONVENTIONS.md or configured read files Add the bridge to CONVENTIONS.md or configure Aider to read a small file that points at SKILL.md.
Cline .clinerules/supply-chain-guard.md Add a Cline rule with the bridge and keep the full skill in .agents/skills/.
Roo Code Unsupported The Roo Code extension shut down on 15 May 2026. Keep the portable skill folder and AGENTS.md for other tools. Do not add Roo-only rule files.
Kilo Code .kilocode/rules/supply-chain-guard.md and/or AGENTS.md Add a Kilo rule with the bridge and keep the portable skill folder in the repository.
Continue .continue/rules/supply-chain-guard.md Add a Continue rule that points to .agents/skills/supply-chain-guard/SKILL.md.
Qodo IDE plugin (formerly Qodo Gen) Chat preferences custom instructions or ~/.qodo/agents/*.toml Add the bridge under custom instructions, or create a custom agent TOML whose instructions point at the skill.
Tabnine Agent .tabnine/agent/commands/ or chat custom instructions Create a custom command such as /supply-chain-guard that points at SKILL.md, or paste the bridge into custom instructions if available.
Warp Agent Mode .agents/skills/supply-chain-guard/ plus AGENTS.md Commit the portable skill folder. Warp also reads .warp/skills/ and ~/.agents/skills/. AGENTS.md remains the project rules file.
Zed Agent / ACP agents .agents/skills/supply-chain-guard/ plus AGENTS.md Commit the portable skill folder. Zed loads project skills from .agents/skills/ and user skills from ~/.agents/skills/. Keep AGENTS.md for ACP agents that do not load skills.
Goose .agents/skills/supply-chain-guard/SKILL.md, ~/.agents/skills/supply-chain-guard/SKILL.md, AGENTS.md, or .goosehints Goose supports portable skills. Use project install for repos and global install for user-wide protection.
SWE-agent Task prompt or harness-level instruction file Include the bridge in the task prompt or harness instructions and mount the skill folder into the workspace.
Augment Code .augment/rules/ or AGENTS.md Add a rule or guideline with the bridge and keep the full skill in .agents/skills/.
Trae .agents/skills/supply-chain-guard/ or .trae/skills/supply-chain-guard/ Prefer the portable folder. If the client supports a native skills directory, copy the folder there too.
Mistral Vibe .agents/skills/supply-chain-guard/, .vibe/skills/supply-chain-guard/SKILL.md, or ~/.vibe/skills/supply-chain-guard/SKILL.md Prefer the portable folder. Vibe also loads .vibe/skills/ and ~/.vibe/skills/. Keep an AGENTS.md bridge.

Sources And References

Skill format and repository instructions:

Agent and editor setup references:

Incident case studies:

Supply-chain security guidance:

Package-manager and registry controls:

Optional scanners and hardening tools:

Contributing

Keep the installable skill concise and durable. Add ecosystem-specific detail to supply-chain-guard/references/. Add incident-specific package lists to issues or advisories, not to SKILL.md, because compromised package sets change quickly.