Skip to content

Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard.

perf(security-scan): scan concurrently and reuse unchanged results

Timothy Kassis665663cac17c
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index b61f8eaa..a399fe30 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -4,6 +4,11 @@ on:
schedule:
- cron: "0 9 * * 1" # Every Monday at 09:00 UTC
workflow_dispatch: # Allow manual trigger
+ inputs:
+ full_scan:
+ description: "Rescan every skill, ignoring cached findings"
+ type: boolean
+ default: false
permissions:
contents: write
@@ -11,7 +16,11 @@ permissions:
jobs:
scan:
runs-on: ubuntu-latest
- timeout-minutes: 120
+ # Scans run concurrently and reuse findings for unchanged skills, so a
+ # typical incremental run is minutes. The headroom is for a full rescan
+ # (triggered by a scanner/model change or the 30-day backstop) plus the
+ # scanner's own rate-limit retries.
+ timeout-minutes: 60
steps:
- uses: actions/checkout@v6
@@ -29,6 +38,11 @@ jobs:
env:
SKILL_SCANNER_LLM_API_KEY: ${{ secrets.SKILL_SCANNER_LLM_API_KEY }}
SKILL_SCANNER_LLM_MODEL: ${{ vars.SKILL_SCANNER_LLM_MODEL || 'claude-sonnet-5' }}
+ # Each skill scan is blocked on LLM network I/O, so concurrency is
+ # bounded by API rate limits rather than by the runner. Lower this if
+ # runs start hitting sustained 429s.
+ SKILL_SCAN_WORKERS: ${{ vars.SKILL_SCAN_WORKERS || '8' }}
+ SKILL_SCAN_FULL: ${{ inputs.full_scan && '1' || '' }}
run: uv run python scan_skills.py
# Gate: a scan that contradicts the contents of skills/ must not be
diff --git a/README.md b/README.md
index f6cb9357..68c64270 100644
--- a/README.md
+++ b/README.md
@@ -221,7 +221,7 @@ We recommend the following:
```
- **Report anything suspicious.** If you find a skill that looks malicious or behaves unexpectedly, please [open an issue](https://github.com/K-Dense-AI/scientific-agent-skills/issues) immediately so we can investigate.
-All skills are scanned on an approximately weekly basis, and the results are published to [docs/security-report.md](docs/security-report.md) once they pass an automated consistency check against the repository contents. See [SECURITY.md](SECURITY.md) for our security policy, what is in scope, how to report a vulnerability privately, and how to contest a scan finding. We try to address security gaps as they arise.
+Skills are scanned weekly — incrementally, so unchanged skills carry their previous findings forward, with a full rescan of everything at least every 30 days and whenever the scanner or model changes — and the results are published to [docs/security-report.md](docs/security-report.md) once they pass an automated consistency check against the repository contents. See [SECURITY.md](SECURITY.md) for our security policy, what is in scope, how to report a vulnerability privately, and how to contest a scan finding. We try to address security gaps as they arise.
---
diff --git a/SECURITY.md b/SECURITY.md
index 0d73e710..8e45c7df 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -68,7 +68,9 @@ Skills execute code and influence your agent's behavior. Review what you install
## Automated skill scanning
-Every skill in this repository is scanned on a weekly schedule, and changed skills are scanned on pull requests, using [`cisco-ai-skill-scanner`](https://pypi.org/project/cisco-ai-skill-scanner/). The scan combines static behavioral analysis, trigger analysis, and LLM-assisted review.
+Skills in this repository are scanned using [`cisco-ai-skill-scanner`](https://pypi.org/project/cisco-ai-skill-scanner/), which combines static behavioral analysis, trigger analysis, and LLM-assisted review. Changed skills are scanned on every pull request.
+
+The scheduled scan runs weekly and is incremental: a skill whose package contents are unchanged since the last scan carries its previous findings forward rather than being rescanned. Every skill is rescanned in full whenever the scanner version or the model changes, when a maintainer triggers a full run, and at least every 30 days regardless. Each skill's `last_scanned` date is recorded in the JSON report, so you can always see when a given finding was actually produced.
- **Report:** [`docs/security-report.md`](docs/security-report.md) (machine-readable companion: [`docs/security-report.json`](docs/security-report.json))
- **Workflow:** [`.github/workflows/security-scan.yml`](.github/workflows/security-scan.yml)
diff --git a/scan_skills.py b/scan_skills.py
index 7051bf9b..fc5457f5 100644
--- a/scan_skills.py
+++ b/scan_skills.py
@@ -7,12 +7,30 @@ the two files must always be generated together.
`SECURITY.md` is deliberately not written here: GitHub resolves that filename as
the repository's official security policy, which is hand-authored.
+
+Two things keep the run time down. Skills are scanned concurrently, because each
+scan is blocked on LLM network I/O rather than local CPU. And skills whose
+content has not changed since the last published report reuse that report's
+findings instead of being rescanned; a change of scanner version or model, or
+`--full`, invalidates every cached result.
+
+Environment:
+ SKILL_SCANNER_LLM_API_KEY API key for the LLM analyzer
+ SKILL_SCANNER_LLM_MODEL model id (default: anthropic/claude-sonnet-5)
+ SKILL_SCAN_WORKERS concurrent skills (default: 8)
+ SKILL_SCAN_FULL set to 1 to force a full rescan
+ SKILL_SCAN_MAX_AGE_DAYS force a full rescan after this many days (default: 30)
"""
+import argparse
+import hashlib
import json
import os
+import threading
import time
-from datetime import datetime, timezone
+from concurrent.futures import ThreadPoolExecutor, as_completed
+from datetime import datetime, timedelta, timezone
+from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from dotenv import load_dotenv
@@ -23,7 +41,13 @@ from skill_scanner.core.analyzers import (
TriggerAnalyzer,
)
from skill_scanner.core.loader import SkillLoadError
-from skill_scanner.core.models import Report
+from skill_scanner.core.models import (
+ Finding,
+ Report,
+ ScanResult,
+ Severity,
+ ThreatCategory,
+)
from skill_scanner.core.scan_policy import ScanPolicy
load_dotenv()
@@ -32,6 +56,41 @@ SKILLS_DIR = "skills"
OUTPUT_FILE = "docs/security-report.md"
JSON_OUTPUT_FILE = "docs/security-report.json"
+SCANNER_PACKAGE = "cisco-ai-skill-scanner"
+DEFAULT_WORKERS = 8
+DEFAULT_MAX_AGE_DAYS = 30
+
+
+def scanner_version() -> str:
+ try:
+ return version(SCANNER_PACKAGE)
+ except PackageNotFoundError: # pragma: no cover - editable/source installs
+ return "unknown"
+
+
+def llm_model_id() -> str:
+ return os.getenv("SKILL_SCANNER_LLM_MODEL", "anthropic/claude-sonnet-5")
+
+
+def content_hash(skill_dir: Path) -> str:
+ """Fingerprint everything in a skill package.
+
+ Covers file paths as well as bytes, so a rename or deletion changes the hash
+ even when the surviving content is identical. `__pycache__` is excluded
+ because it is a build artifact that varies without the skill changing.
+ """
+ digest = hashlib.sha256()
+ files = sorted(
+ f for f in skill_dir.rglob("*")
+ if f.is_file() and "__pycache__" not in f.parts
+ )
+ for f in files:
+ digest.update(str(f.relative_to(skill_dir)).encode())
+ digest.update(b"\0")
+ digest.update(f.read_bytes())
+ digest.update(b"\0")
+ return digest.hexdigest()
+
def build_scanner() -> SkillScanner:
policy = ScanPolicy.from_preset("balanced")
@@ -39,7 +98,7 @@ def build_scanner() -> SkillScanner:
policy.llm_analysis.max_referenced_file_chars = 75_000
policy.llm_analysis.max_code_file_chars = 75_000
policy.llm_analysis.max_total_prompt_chars = 500_000
- llm_model = os.getenv("SKILL_SCANNER_LLM_MODEL", "anthropic/claude-sonnet-5")
+ llm_model = llm_model_id()
llm_key = os.getenv("SKILL_SCANNER_LLM_API_KEY")
scanner = SkillScanner(
@@ -65,8 +124,9 @@ def severity_badge(sev: str) -> str:
return f"{icons.get(sev, '⚫')} {sev}"
-def generate_report(report) -> str:
+def generate_report(report, run_meta: dict | None = None) -> str:
now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
+ run_meta = run_meta or {}
lines: list[str] = []
lines.append("# Security Scan Report")
@@ -77,6 +137,27 @@ def generate_report(report) -> str:
lines.append(f"**Critical:** {report.critical_count} | **High:** {report.high_count} | **Safe skills:** {report.safe_count}/{report.total_skills_scanned}")
lines.append("")
+ if run_meta:
+ scanner_line = (
+ f"**Scanner:** {SCANNER_PACKAGE} {run_meta.get('scanner_version', '?')} · "
+ f"**Model:** {run_meta.get('model', '?')} "
+ )
+ lines.append(scanner_line)
+ reused = run_meta.get("skills_reused") or 0
+ if reused and not run_meta.get("full_scan"):
+ lines.append(
+ f"**This run:** {run_meta.get('skills_rescanned', 0)} skill(s) rescanned; "
+ f"{reused} unchanged since the last scan and carried forward unmodified. "
+ f"Per-skill scan dates are in "
+ f"[`security-report.json`](security-report.json) (`last_scanned`). "
+ )
+ else:
+ lines.append(
+ f"**This run:** full rescan of all "
+ f"{run_meta.get('skills_rescanned', report.total_skills_scanned)} skill(s). "
+ )
+ lines.append("")
+
# Summary table
lines.append("## Summary")
lines.append("")
@@ -138,7 +219,9 @@ def _enum_value(value) -> str:
def _finding_dict(finding) -> dict:
+ """Serialize a finding losslessly enough to be reconstructed on a later run."""
return {
+ "id": finding.id,
"rule_id": finding.rule_id,
"severity": _enum_value(finding.severity),
"category": _enum_value(finding.category),
@@ -146,12 +229,47 @@ def _finding_dict(finding) -> dict:
"description": finding.description,
"file_path": finding.file_path,
"line_number": finding.line_number,
+ "snippet": finding.snippet,
"remediation": finding.remediation,
"analyzer": finding.analyzer,
+ "metadata": finding.metadata,
}
-def generate_json_report(report) -> dict:
+def _finding_from_dict(data: dict) -> Finding:
+ return Finding(
+ id=data.get("id", ""),
+ rule_id=data["rule_id"],
+ category=ThreatCategory(data["category"]),
+ severity=Severity(data["severity"]),
+ title=data.get("title", ""),
+ description=data.get("description", ""),
+ file_path=data.get("file_path"),
+ line_number=data.get("line_number"),
+ snippet=data.get("snippet"),
+ remediation=data.get("remediation"),
+ analyzer=data.get("analyzer"),
+ metadata=data.get("metadata") or {},
+ )
+
+
+def _result_from_dict(data: dict) -> ScanResult:
+ """Rebuild a ScanResult from a previous report so it can be reused as-is."""
+ return ScanResult(
+ skill_name=data["name"],
+ skill_directory=data["directory"],
+ findings=[_finding_from_dict(f) for f in data.get("findings") or []],
+ scan_duration_seconds=data.get("scan_duration_seconds") or 0.0,
+ analyzers_used=data.get("analyzers_used") or [],
+ analyzers_failed=data.get("analyzers_failed") or [],
+ analyzability_score=data.get("analyzability_score"),
+ analyzability_details=data.get("analyzability_details"),
+ scan_metadata=data.get("scan_metadata"),
+ )
+
+
+def generate_json_report(report, skill_meta: dict | None = None,
+ run_meta: dict | None = None) -> dict:
"""Build the machine-readable companion to the markdown report.
`validate_report.py` consumes this to sanity-check the scan before CI
@@ -159,9 +277,16 @@ def generate_json_report(report) -> dict:
per-skill `scan_metadata` and `analyzability_details` are included because
they carry the scanner's own view of each package, which is what makes
disagreements with the filesystem diagnosable.
+
+ Per-skill `content_hash` and `last_scanned` are what make incremental runs
+ possible and honest: the hash decides whether a later run may reuse these
+ findings, and the timestamp records when the finding was actually produced
+ rather than when the report was written.
"""
+ skill_meta = skill_meta or {}
return {
"generated": datetime.now(timezone.utc).isoformat(timespec="seconds"),
+ "run": run_meta or {},
"totals": {
"skills_scanned": report.total_skills_scanned,
"findings": report.total_findings,
@@ -181,19 +306,86 @@ def generate_json_report(report) -> dict:
"is_safe": result.is_safe,
"max_severity": _enum_value(result.max_severity),
"scan_duration_seconds": round(result.scan_duration_seconds, 2),
+ "content_hash": skill_meta.get(result.skill_name, {}).get("content_hash"),
+ "last_scanned": skill_meta.get(result.skill_name, {}).get("last_scanned"),
+ "reused_from_previous_report": skill_meta.get(result.skill_name, {}).get(
+ "reused", False
+ ),
"analyzers_used": result.analyzers_used,
"analyzers_failed": result.analyzers_failed,
+ "analyzability_score": result.analyzability_score,
"scan_metadata": result.scan_metadata,
"analyzability_details": result.analyzability_details,
"findings": [_finding_dict(f) for f in result.findings],
}
- for result in report.scan_results
+ # Sorted so the committed JSON diffs cleanly regardless of the order
+ # concurrent workers happen to finish in.
+ for result in sorted(report.scan_results, key=lambda r: r.skill_name)
],
}
-def scan_with_progress(scanner: SkillScanner, skills_dir: str) -> Report:
- """Run scan_directory logic with per-skill progress output."""
+def load_previous_report(path: str | None = None) -> dict | None:
+ """Load the last published JSON report, if it is usable as a cache."""
+ p = Path(path or JSON_OUTPUT_FILE)
+ if not p.exists():
+ return None
+ try:
+ return json.loads(p.read_text())
+ except (json.JSONDecodeError, OSError) as e:
+ print(f" Previous report unusable ({e}); scanning everything.")
+ return None
+
+
+def cache_invalidation_reason(previous: dict | None, max_age_days: int) -> str | None:
+ """Explain why the cache cannot be used, or None if it can.
+
+ Findings depend on the scanner and the model as much as on the skill, so a
+ change to either invalidates every cached result. The age limit is a backstop
+ against a cache that quietly persists for months.
+ """
+ if previous is None:
+ return "no previous report"
+
+ run = previous.get("run") or {}
+ if run.get("scanner_version") != scanner_version():
+ return (
+ f"scanner version changed "
+ f"({run.get('scanner_version')} -> {scanner_version()})"
+ )
+ if run.get("model") != llm_model_id():
+ return f"model changed ({run.get('model')} -> {llm_model_id()})"
+
+ stamp = previous.get("run", {}).get("last_full_scan") or previous.get("generated")
+ if not stamp:
+ return "previous report has no timestamp"
+ try:
+ when = datetime.fromisoformat(stamp)
+ except ValueError:
+ return f"unparseable timestamp ({stamp!r})"
+ if when.tzinfo is None:
+ when = when.replace(tzinfo=timezone.utc)
+ age = datetime.now(timezone.utc) - when
+ if age > timedelta(days=max_age_days):
+ return f"last full scan was {age.days} days ago (limit {max_age_days})"
+
+ return None
+
+
+def scan_with_progress(
+ scanner: SkillScanner,
+ skills_dir: str,
+ *,
+ workers: int = DEFAULT_WORKERS,
+ previous: dict | None = None,
+) -> tuple[Report, dict, dict]:
+ """Scan every skill concurrently, reusing unchanged results where possible.
+
+ Returns the report, per-skill metadata for the JSON companion, and run
+ metadata. A scanner is built per worker thread rather than shared: the
+ analyzers carry mutable per-scan state, and sharing one instance across
+ threads would interleave it.
+ """
base = Path(skills_dir)
if not base.exists():
raise FileNotFoundError(f"Directory does not exist: {base}")
@@ -205,49 +397,118 @@ def scan_with_progress(scanner: SkillScanner, skills_dir: str) -> Report:
total = len(skill_dirs)
if total == 0:
print(" No skills found.")
- return Report()
-
- print(f" Found {total} skills to scan\n")
+ return Report(), {}, {}
+
+ cached: dict[str, dict] = {}
+ if previous is not None:
+ cached = {
+ s["name"]: s
+ for s in previous.get("skills") or []
+ if s.get("content_hash")
+ }
+
+ hashes = {d.name: content_hash(d) for d in skill_dirs}
+ fresh_dirs, reuse_dirs = [], []
+ for d in skill_dirs:
+ prior = cached.get(d.name)
+ if prior and prior.get("content_hash") == hashes[d.name]:
+ reuse_dirs.append(d)
+ else:
+ fresh_dirs.append(d)
+
+ print(
+ f" {total} skills: {len(fresh_dirs)} to scan, "
+ f"{len(reuse_dirs)} unchanged (reusing previous findings)"
+ )
+ print(f" Concurrency: {workers} workers\n")
report = Report()
+ skill_meta: dict[str, dict] = {}
loaded_skills = []
scan_start = time.time()
+ now_stamp = datetime.now(timezone.utc).isoformat(timespec="seconds")
+
+ for d in reuse_dirs:
+ prior = cached[d.name]
+ report.add_scan_result(_result_from_dict(prior))
+ skill_meta[d.name] = {
+ "content_hash": hashes[d.name],
+ "last_scanned": prior.get("last_scanned") or prior.get("generated"),
+ "reused": True,
+ }
+
+ # The loader is cheap and LLM-free; skills are loaded up front so the
+ # cross-skill overlap pass has every package, including reused ones.
+ for d in skill_dirs:
+ try:
+ loaded_skills.append(scanner.loader.load_skill(d))
+ except Exception: # counted per skill below when it is scanned
+ pass
- width = len(str(total))
- longest_name = 0
+ local = threading.local()
- for i, skill_dir in enumerate(skill_dirs, 1):
- name = skill_dir.name
- longest_name = max(longest_name, len(name))
- counter = f"[{i:>{width}}/{total}]"
- print(f" {counter} {name} ...", end="", flush=True)
+ def worker_scanner() -> SkillScanner:
+ if not hasattr(local, "scanner"):
+ local.scanner = build_scanner()
+ return local.scanner
+ def scan_one(skill_dir: Path) -> tuple[Path, ScanResult | None, str | None, float]:
t0 = time.time()
try:
- skill = scanner.loader.load_skill(skill_dir)
- result = scanner._scan_single_skill(skill, skill_dir)
- report.add_scan_result(result)
- loaded_skills.append(skill)
-
- elapsed = time.time() - t0
- sev = result.max_severity.value if hasattr(result.max_severity, "value") else str(result.max_severity)
- tag = severity_badge(sev)
- n_findings = len(result.findings)
- detail = f"{n_findings} finding{'s' if n_findings != 1 else ''}" if n_findings else ""
- print(f"\r {counter} {name:{longest_name}} {tag:18} {detail:20} ({elapsed:.1f}s)")
-
+ s = worker_scanner()
+ skill = s.loader.load_skill(skill_dir)
+ return skill_dir, s._scan_single_skill(skill, skill_dir), None, time.time() - t0
except SkillLoadError as e:
- elapsed = time.time() - t0
- print(f"\r {counter} {name:{longest_name}} ⚠️ SKIP ({e}) ({elapsed:.1f}s)")
- report.skills_skipped.append({"skill": str(skill_dir), "reason": str(e)})
-
+ return skill_dir, None, f"SKIP ({e})", time.time() - t0
except Exception as e:
- elapsed = time.time() - t0
- print(f"\r {counter} {name:{longest_name}} ❌ ERROR ({e}) ({elapsed:.1f}s)")
- report.skills_skipped.append({"skill": str(skill_dir), "reason": str(e)})
+ return skill_dir, None, f"ERROR ({e})", time.time() - t0
+
+ longest_name = max((len(d.name) for d in skill_dirs), default=10)
+ width = len(str(total))
+ done = len(reuse_dirs)
+ print_lock = threading.Lock()
+
+ if fresh_dirs:
+ with ThreadPoolExecutor(max_workers=workers) as pool:
+ futures = {pool.submit(scan_one, d): d for d in fresh_dirs}
+ for future in as_completed(futures):
+ skill_dir, result, error, elapsed = future.result()
+ name = skill_dir.name
+ done += 1
+ counter = f"[{done:>{width}}/{total}]"
+
+ if result is not None:
+ report.add_scan_result(result)
+ skill_meta[name] = {
+ "content_hash": hashes[name],
+ "last_scanned": now_stamp,
+ "reused": False,
+ }
+ tag = severity_badge(_enum_value(result.max_severity))
+ n = len(result.findings)
+ detail = f"{n} finding{'s' if n != 1 else ''}" if n else ""
+ line = f" {counter} {name:{longest_name}} {tag:18} {detail:20} ({elapsed:.1f}s)"
+ else:
+ report.skills_skipped.append(
+ {"skill": str(skill_dir), "reason": error or "unknown"}
+ )
+ icon = "⚠️ " if str(error).startswith("SKIP") else "❌"
+ line = f" {counter} {name:{longest_name}} {icon} {error} ({elapsed:.1f}s)"
+
+ with print_lock:
+ print(line, flush=True)
wall = time.time() - scan_start
+ run_meta = {
+ "scanner_version": scanner_version(),
+ "model": llm_model_id(),
+ "workers": workers,
+ "skills_rescanned": len(fresh_dirs),
+ "skills_reused": len(reuse_dirs),
+ "wall_seconds": round(wall, 1),
+ }
+
if len(loaded_skills) > 1:
print("\n Running cross-skill overlap analysis ...", end="", flush=True)
t0 = time.time()
@@ -269,27 +530,83 @@ def scan_with_progress(scanner: SkillScanner, skills_dir: str) -> Report:
print(f" error: {e}")
print(f"\n Done in {wall:.1f}s")
- return report
+ return report, skill_meta, run_meta
+
+
+def parse_args(argv=None) -> argparse.Namespace:
+ parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
+ parser.add_argument(
+ "--full",
+ action="store_true",
+ default=os.getenv("SKILL_SCAN_FULL") == "1",
+ help="rescan every skill, ignoring the previous report's cached findings",
+ )
+ parser.add_argument(
+ "--workers",
+ type=int,
+ default=int(os.getenv("SKILL_SCAN_WORKERS", DEFAULT_WORKERS)),
+ help=f"skills scanned concurrently (default: {DEFAULT_WORKERS})",
+ )
+ parser.add_argument(
+ "--max-age-days",
+ type=int,
+ default=int(os.getenv("SKILL_SCAN_MAX_AGE_DAYS", DEFAULT_MAX_AGE_DAYS)),
+ help=f"force a full rescan when the last one is older (default: {DEFAULT_MAX_AGE_DAYS})",
+ )
+ return parser.parse_args(argv)
+
+def main(argv=None):
+ args = parse_args(argv)
+ workers = max(1, args.workers)
-def main():
print("Building scanner (LLM + behavioral + trigger + balanced policy)...")
scanner = build_scanner()
- print(f"Analyzers: {scanner.list_analyzers()}\n")
+ print(f"Analyzers: {scanner.list_analyzers()}")
+ print(f"Scanner {SCANNER_PACKAGE} {scanner_version()}, model {llm_model_id()}\n")
+
+ previous = None if args.full else load_previous_report()
+ if args.full:
+ print("Full rescan requested; ignoring cached findings.")
+ reason = "--full requested"
+ else:
+ reason = cache_invalidation_reason(previous, args.max_age_days)
+ if reason:
+ print(f"Cache not usable: {reason}. Scanning everything.")
+ previous = None
print(f"Scanning {SKILLS_DIR}/...")
- report = scan_with_progress(scanner, SKILLS_DIR)
+ report, skill_meta, run_meta = scan_with_progress(
+ scanner, SKILLS_DIR, workers=workers, previous=previous
+ )
+
+ was_full = previous is None
+ run_meta["full_scan"] = was_full
+ run_meta["cache_invalidated_because"] = reason
+ if was_full:
+ run_meta["last_full_scan"] = datetime.now(timezone.utc).isoformat(timespec="seconds")
+ else:
+ # Carried forward so the age backstop measures from the last *full* scan,
+ # not from the last incremental one.
+ run_meta["last_full_scan"] = (previous.get("run") or {}).get("last_full_scan")
print(f"\nResults: {report.total_skills_scanned} skills, {report.total_findings} findings")
print(f" Critical: {report.critical_count} High: {report.high_count} Safe: {report.safe_count}")
+ print(
+ f" {run_meta['skills_rescanned']} rescanned, {run_meta['skills_reused']} reused "
+ f"in {run_meta['wall_seconds']}s"
+ )
- md = generate_report(report)
+ md = generate_report(report, run_meta=run_meta)
Path(OUTPUT_FILE).parent.mkdir(parents=True, exist_ok=True)
with open(OUTPUT_FILE, "w") as f:
f.write(md)
with open(JSON_OUTPUT_FILE, "w") as f:
- json.dump(generate_json_report(report), f, indent=2, sort_keys=False)
+ json.dump(
+ generate_json_report(report, skill_meta=skill_meta, run_meta=run_meta),
+ f, indent=2, sort_keys=False,
+ )
f.write("\n")
print(f"\nReport written to {OUTPUT_FILE}")
diff --git a/skills/genomic-intelligence/SKILL.md b/skills/genomic-intelligence/SKILL.md
index b174d866..aee0b930 100644
--- a/skills/genomic-intelligence/SKILL.md
+++ b/skills/genomic-intelligence/SKILL.md
@@ -1,6 +1,6 @@
---
name: genomic-intelligence
-description: Predict regulatory features, gene structure, and expression directly from DNA sequence using Genomic Intelligence's hosted transformer DNA language models — no local GPU or model weights. Six tasks over a REST API and a hosted MCP server (keyless public demo): promoter regions, splice donor/acceptor sites, enhancer activity, chromatin state, sequence-to-expression (log TPM), and de-novo gene annotation, plus a composite find-genes-then-predict-expression workflow. Use when the user has a gene symbol, a genomic region, or a DNA/FASTA sequence and wants any of these predictions, mentions Genomic Intelligence, genomicintelligence.ai, api.genomicintelligence.ai, or mcp.genomicintelligence.ai.
+description: "Predict regulatory features, gene structure, and expression directly from DNA sequence using Genomic Intelligence's hosted transformer DNA language models — no local GPU or model weights. Six tasks over a REST API and a hosted MCP server (keyless public demo): promoter regions, splice donor/acceptor sites, enhancer activity, chromatin state, sequence-to-expression (log TPM), and de-novo gene annotation, plus a composite find-genes-then-predict-expression workflow. Use when the user has a gene symbol, a genomic region, or a DNA/FASTA sequence and wants any of these predictions, mentions Genomic Intelligence, genomicintelligence.ai, api.genomicintelligence.ai, or mcp.genomicintelligence.ai."
license: MIT
compatibility: Python 3.10+ with the `requests` library for the REST path (no dedicated SDK). Network access required. The REST `/v1` API needs a `GI_API_KEY` (a `gi_` bearer); the hosted MCP server at mcp.genomicintelligence.ai/mcp works keyless against a capped public demo quota, key optional.
metadata: {"version": "1.0", "skill-author": "Genomic Intelligence", "trigger-keywords": "DNA sequence prediction, regulatory genomics, promoter prediction, splice site prediction, enhancer activity, chromatin state, gene expression prediction, sequence to expression, log TPM, gene annotation, transcript prediction, DNA language model, genomic intelligence, hosted inference, Ensembl sequence, FASTA prediction, cis-regulatory, TSS window, DeepSEA, DeepSTARR, BigBird splice, MCP genomics", "openclaw": {"primaryEnv": "GI_API_KEY", "envVars": [{"name": "GI_API_KEY", "required": false, "description": "Optional gi_ bearer key for the REST /v1 API and a higher MCP quota. The hosted MCP demo runs keyless; request a key at [email protected]."}]}}