agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when assessing dependency and build-pipeline risk. Covers dependency vetting, lockfiles, SBOMs, provenance and signing, pinning CI actions, and responding to a compromised package.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill supply-chain --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/supply-chainContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when assessing dependency and build-pipeline risk. Covers dependency vetting, lockfiles, SBOMs, provenance and signing, pinning CI actions, and responding to a compromised package.
name: supply-chain description: Use when assessing dependency and build-pipeline risk. Covers dependency vetting, lockfiles, SBOMs, provenance and signing, pinning CI actions, and responding to a compromised package. metadata: category: security version: 1.0.0 tags: [supply-chain, dependencies, sbom, provenance, ci]
Reduce the risk that arrives through your dependencies and your build pipeline — which is now a more common attack path than a vulnerability in your own code.
1. **Vet before adding** — Who maintains it? When was it last released? How many transitive dependencies does it drag in? A left-pad-sized utility with forty dependencies is a liability, not a convenience. 2. **Commit the lockfile and install from it** — `npm ci`, `pip install -r requirements.lock`, `cargo --locked`. An install that resolves versions at build time is an install that can pull a compromised patch release. 3. **Pin CI actions by SHA** — A tag is mutable. A compromised action with `pull_request` write access can exfiltrate every secret in the pipeline. 4. **Restrict pipeline permissions** — The build job does not need write access to the repository or production credentials. Scope tokens per job. 5. **Generate an SBOM and scan it** — On every build. Fail on critical vulnerabilities in what you actually ship, not in your dev dependencies. 6. **Sign and attest** — Sigstore/cosign for the artifact, with a provenance attestation linking it to the commit and the build.
**Pipeline hardening — pinned, scoped, and scanned:**
permissions:
contents: read # the default is often write-all. It should not be.
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # for keyless signing only
attestations: write
steps:
# Pinned by SHA. A tag can be moved by an attacker who compromises the action.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: npm ci --ignore-scripts # lockfile, no arbitrary install-time code
- name: Generate SBOM
run: npx @cyclonedx/cyclonedx-npm --output-file sbom.json
- name: Fail on critical vulnerabilities in shipped dependencies
run: npx osv-scanner --lockfile=package-lock.json --fail-on-severity=critical
- name: Sign the artifact and attest its provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/app.tar.gz**Vetting a dependency before it enters the tree:**
npm view left-pad-ish --json | jq '{
maintainers: .maintainers,
last_publish: .time.modified,
dependencies: (.dependencies // {} | keys | length)
}'
# Transitive weight: what does one `npm install` actually bring in?
npm install --dry-run left-pad-ish 2>&1 | grep "added"
# added 47 packages <- for a function you could write in six lines**Responding to a compromised package:**
1. Determine exposure: is the compromised version in any lockfile, in any environment, including CI? `npm ls <pkg>` across every repository. 2. If it ran in CI: every secret that job could reach is compromised. Rotate all of them. This is the step people skip and it is the one that matters. 3. Pin to a known-good version, rebuild, redeploy. 4. Check for persistence: a malicious postinstall may have written to ~/.npmrc, added a git hook, or modified a lockfile.
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…