Skip to content

Commit bc52ca7

Browse files
committed
Restore backward compatibility and make the pack self-verifying again
The repo still had a broken historical install surface for `virus-scan`, no single pack manifest, and no in-repo smoke test after the earlier cleanup. This adds a deprecated compatibility alias, introduces a small manifest for the canonical pack surface, and restores verification through a lightweight GitHub Actions workflow instead of local scripts. Constraint: Keep the repo small and avoid restoring the removed evals/scripts structure Rejected: Leave `virus-scan` broken and rely on external skills.sh cleanup | user-facing install path was still stale and failing Rejected: Reintroduce local scripts/evals | more repo scaffolding than needed for a smoke test Confidence: high Scope-risk: moderate Reversibility: clean Directive: If a skill is renamed again, preserve backward compatibility or explicitly update the manifest and smoke test in the same change Tested: Local `npx skills add . --list --full-depth`; local isolated `--all` install from repo path; local isolated `--skill virus-scan` install from repo path; architect, security, and code-review validation passes Not-tested: GitHub Actions execution after push; external skills.sh cache refresh timing
1 parent f1782bf commit bc52ca7

5 files changed

Lines changed: 169 additions & 0 deletions

File tree

.github/workflows/verify-pack.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: verify-pack
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
verify:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20"
19+
20+
- name: Verify discovery output matches manifest
21+
run: |
22+
OUTPUT="$(npx skills add . --list --full-depth)"
23+
echo "$OUTPUT"
24+
OUTPUT="$OUTPUT" node -e '
25+
const fs = require("fs");
26+
const manifest = JSON.parse(fs.readFileSync("skills-pack.json", "utf8"));
27+
const names = [
28+
...manifest.canonical_skills.map((skill) => skill.name),
29+
...(manifest.aliases ?? []).map((skill) => skill.name),
30+
];
31+
const output = process.env.OUTPUT ?? "";
32+
const missing = names.filter((name) => !output.includes(name));
33+
if (missing.length) {
34+
console.error("Missing skills in discovery output:", missing.join(", "));
35+
process.exit(1);
36+
}
37+
'
38+
39+
- name: Verify isolated --all install
40+
env:
41+
PACK_SOURCE: ${{ github.workspace }}
42+
run: |
43+
TMP_DIR="$(mktemp -d)"
44+
pushd "$TMP_DIR" >/dev/null
45+
npx skills add "$PACK_SOURCE" -y --all --copy
46+
popd >/dev/null
47+
TMP_DIR="$TMP_DIR" node -e '
48+
const fs = require("fs");
49+
const path = require("path");
50+
const manifest = JSON.parse(fs.readFileSync("skills-pack.json", "utf8"));
51+
const expected = [
52+
...manifest.canonical_skills.map((skill) => skill.name),
53+
...(manifest.aliases ?? []).map((skill) => skill.name),
54+
].sort();
55+
const installedDir = path.join(process.env.TMP_DIR, ".agents", "skills");
56+
const installed = fs.readdirSync(installedDir, { withFileTypes: true })
57+
.filter((entry) => entry.isDirectory())
58+
.map((entry) => entry.name)
59+
.sort();
60+
if (JSON.stringify(installed) !== JSON.stringify(expected)) {
61+
console.error("Installed skills did not match manifest.");
62+
console.error("Expected:", expected.join(", "));
63+
console.error("Actual:", installed.join(", "));
64+
process.exit(1);
65+
}
66+
'
67+
68+
- name: Verify deprecated alias install path still works
69+
env:
70+
PACK_SOURCE: ${{ github.workspace }}
71+
run: |
72+
TMP_DIR="$(mktemp -d)"
73+
pushd "$TMP_DIR" >/dev/null
74+
npx skills add "$PACK_SOURCE" -y --agent codex --skill virus-scan --copy
75+
popd >/dev/null
76+
test -f "$TMP_DIR/.agents/skills/virus-scan/SKILL.md"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ npx skills add https://github.com/jasperdevs/computer-doctor --skill computer-do
1818
npx skills add https://github.com/jasperdevs/computer-doctor --skill security-scan
1919
npx skills add https://github.com/jasperdevs/computer-doctor --skill devtools-audit
2020
npx skills add https://github.com/jasperdevs/computer-doctor --skill update-audit
21+
npx skills add https://github.com/jasperdevs/computer-doctor --skill virus-scan
2122
```
2223

2324
</details>
@@ -30,6 +31,9 @@ npx skills add https://github.com/jasperdevs/computer-doctor --skill update-audi
3031
| `$security-scan` | Endpoint protection, firewall status, suspicious processes, persistence, autoruns, risky permissions, and obvious malware signals. | [open](https://skills.sh/jasperdevs/computer-doctor/security-scan) |
3132
| `$devtools-audit` | PATH problems, shell setup, runtimes, SDKs, package managers, Git tooling, and dead or conflicting installs. | [open](https://skills.sh/jasperdevs/computer-doctor/devtools-audit) |
3233
| `$update-audit` | OS updates, outdated apps, drivers where visible, runtimes, package managers, and better replacement choices. | [open](https://skills.sh/jasperdevs/computer-doctor/update-audit) |
34+
| `$virus-scan` | Deprecated compatibility alias for `$security-scan`. Keep using it only if you still rely on the old command name. | [open](https://skills.sh/jasperdevs/computer-doctor/virus-scan) |
35+
36+
The canonical pack surface is tracked in [skills-pack.json](./skills-pack.json).
3337

3438
> [!NOTE]
3539
> Each skill begins with `Choose a mode: Audit mode (recommended) or YOLO mode.` Audit mode inspects first and asks before making changes. YOLO mode keeps moving after that initial choice, but still follows the skill's safety boundaries.

skills-pack.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "computer-doctor",
3+
"repository": "https://github.com/jasperdevs/computer-doctor",
4+
"default_install": "npx skills add https://github.com/jasperdevs/computer-doctor --all",
5+
"canonical_skills": [
6+
{
7+
"name": "computer-doctor",
8+
"path": "skills/computer-doctor",
9+
"skills_sh": "https://skills.sh/jasperdevs/computer-doctor/computer-doctor"
10+
},
11+
{
12+
"name": "security-scan",
13+
"path": "skills/security-scan",
14+
"skills_sh": "https://skills.sh/jasperdevs/computer-doctor/security-scan"
15+
},
16+
{
17+
"name": "devtools-audit",
18+
"path": "skills/devtools-audit",
19+
"skills_sh": "https://skills.sh/jasperdevs/computer-doctor/devtools-audit"
20+
},
21+
{
22+
"name": "update-audit",
23+
"path": "skills/update-audit",
24+
"skills_sh": "https://skills.sh/jasperdevs/computer-doctor/update-audit"
25+
}
26+
],
27+
"aliases": [
28+
{
29+
"name": "virus-scan",
30+
"path": "skills/virus-scan",
31+
"skills_sh": "https://skills.sh/jasperdevs/computer-doctor/virus-scan",
32+
"deprecated": true,
33+
"replaced_by": "security-scan"
34+
}
35+
]
36+
}

skills/virus-scan/SKILL.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: virus-scan
3+
description: Deprecated compatibility alias for security-scan. Run the same security-first audit after asking the user to choose Audit mode or YOLO mode.
4+
---
5+
6+
# Virus Scan (Deprecated)
7+
8+
Use this only for backward compatibility. Prefer `$security-scan`.
9+
10+
## First Step: Pick A Mode
11+
12+
At the start of the interaction, ask the user to choose one mode:
13+
14+
Ask exactly:
15+
`Choose a mode: Audit mode (recommended) or YOLO mode.`
16+
17+
- `Audit mode` (recommended): inspect first, report findings, ask before changing anything
18+
- `YOLO mode`: still try to be safe, but carry out actions without asking again after the initial mode choice
19+
20+
If the user already picked a mode earlier in the same task, do not ask again.
21+
22+
## Behavior
23+
24+
This deprecated alias should run the same security-first pass as `$security-scan`:
25+
26+
- antivirus or endpoint protection status
27+
- firewall status
28+
- suspicious processes
29+
- autoruns and persistence
30+
- risky permissions
31+
- obvious unwanted software
32+
33+
## Rules
34+
35+
- state that `$security-scan` is the preferred command name
36+
- be evidence-based and skeptical
37+
- do not claim a machine is clean unless the available evidence supports that
38+
- in Audit mode, ask before changing anything
39+
- in YOLO mode, proceed without repeated approval, but still avoid reckless actions
40+
- if confidence is limited, say so plainly
41+
42+
## Output
43+
44+
Report:
45+
46+
1. protection status
47+
2. highest-risk findings
48+
3. whether deeper scanning is needed
49+
4. approval-required changes in Audit mode
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Virus Scan (Deprecated)"
3+
short_description: "Deprecated compatibility alias for security-scan"
4+
default_prompt: "Use $virus-scan as a deprecated compatibility alias for $security-scan. Ask for Audit mode or YOLO mode first, then perform the same security-first audit as $security-scan and clearly note that $security-scan is the preferred command name."

0 commit comments

Comments
 (0)