Skip to content

fix: align skill helper script paths with scripts/ convention #143

Description

@dmartinol

Summary

Skill helper scripts should live under <pack>/skills/<skill>/scripts/ and be invoked as skill-relative paths (scripts/<script> or python $SCRIPTS_DIR/<script> after SCRIPTS_DIR="scripts").

An audit found two packs that still violate this convention. ocp-admin is already correct — each skill has a scripts/ folder with symlinks to the shared pack scripts (../../../scripts/security-validation/ and ../../../scripts/cluster-report/).

Inconsistencies to fix

1. rh-sre/skills/cve-impact

Current Expected
File location references/01-cve-response-parser.py scripts/01-cve-response-parser.py
Invocation in SKILL.md python3 rh-sre/skills/cve-impact/references/01-cve-response-parser.py python $SCRIPTS_DIR/01-cve-response-parser.py
Other bad refs references/01-cve-response-parser.py, .../01-cve-response-parser.py scripts/01-cve-response-parser.py

Also update:

  • references/02-cve-parsing-guide.md (many repo-root path examples)
  • references/flows/01-account-cves.md
  • references/flows/02-system-all-cves.md
  • references/flows/03-system-remediatable-cves.md
  • Frontmatter/description line referencing references/01-cve-response-parser.py

Fix:

  1. Move (or symlink) 01-cve-response-parser.py into scripts/
  2. Add SCRIPTS_DIR="scripts" prerequisite block (match ocp-admin pattern)
  3. Replace all invocation examples with skill-relative paths

2. rh-basic/skills/red-hat-product-lifecycle

Current Expected
File location scripts/rh_lifecycle.py (no change)
Invocation in SKILL.md python rh-basic/skills/red-hat-product-lifecycle/scripts/rh_lifecycle.py python scripts/rh_lifecycle.py or python $SCRIPTS_DIR/rh_lifecycle.py
Dependencies section Full repo path scripts/rh_lifecycle.py

Fix:

  1. Add SCRIPTS_DIR="scripts" resolution (optional but consistent with other packs)
  2. Replace full pack path in workflow and Dependencies sections

Optional (docs only)

ocp-admin/skills/cluster-report/docs/multi-cluster-auth.md still uses repo-root paths such as ocp-admin/scripts/cluster-report/build-kubeconfig.py. The skill workflow itself is fine (scripts/assemble.py, symlinks in place). Align doc examples to scripts/build-kubeconfig.py for consistency.

Already correct (no action)

  • ocp-admin security skills (container-cve-validator, coreos-cve-validator, cve-recon, image-inspect) — scripts/ symlinks → scripts/security-validation/
  • ocp-admin cluster-reportscripts/ symlinks → scripts/cluster-report/, SKILL.md uses python3 scripts/assemble.py

Acceptance criteria

  • No executable helper scripts under references/ in affected skills
  • No repo-root invocation paths (<pack>/skills/<skill>/scripts/...) in skill workflows
  • All script invocations use skill-relative scripts/<script> or $SCRIPTS_DIR/<script>
  • Reference docs and flow guides updated to match

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions