datarobot-oss/datarobot-agent-skills / skills/datarobot-gap-analysis
datarobot-gap-analysis
FlaggedUse when the user wants to assess whether an AI agent repository (DataRobot-built or not) is enterprise-ready, run a gap analysis / readiness scan against security, governance, reliability, or regulatory standards, score an agent against EU AI Act requirements, or find and fix gaps (secrets, unpinned models, missing CI, missing guardrails, over-permissioned identity, etc.) before deploying an agent to production. Works on any repository, not only ones built with DataRobot.
scripts/gap_analysis/opencode.py
View on GitHub# Copyright (c) 2026 DataRobot, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""LLMClient adapter over the datarobot-skills-utils opencode runtime."""
from __future__ import annotations
import subprocess
from ._bootstrap import ensure_skills_utils
from .settings import DEFAULT_MODEL, DEFAULT_WORKER_TIMEOUT
ensure_skills_utils()
from datarobot_skills_utils.opencode import (
OpenCodeServer,
UsageMeter,
dr_available,
run_worker,
)
from datarobot_skills_utils.opencode.version import DR_OPENCODE
__all__ = [
"OpenCodeServer",
"OpenCodeWorkerClient",
"dr_available",
"list_models",
"pick_model",
]
def list_models() -> list[str]:
"""The models `dr opencode` offers, or none without the `dr` CLI."""
if not dr_available():
return []
listing = subprocess.run(
[*DR_OPENCODE, "models"],
capture_output=True,
text=True,
errors="replace",
stdin=subprocess.DEVNULL,
timeout=120,
check=False,
).stdout
return [line.strip() for line in listing.splitlines()]
def pick_model(models: list[str]) -> str:
"""The default model if listed, else any DataRobot sonnet, else the default."""
suffix = "/" + DEFAULT_MODEL.removeprefix("datarobot/")
for match in (lambda m: m.endswith(suffix), lambda m: "sonnet" in m):
found = next(
(m for m in models if m.startswith("datarobot") and match(m)), None
)
if found:
return found
return DEFAULT_MODEL
class OpenCodeWorkerClient:
"""LLMClient backed by `dr opencode run` subprocesses attached to a server.
Each complete() call is its own session on the shared server, so calls
are independent and safe to issue from multiple threads. `cwd` should be
a directory without opencode project context (the server's workdir) and
`password` the server's own (opencode 2.x); see OpenCodeServer.
"""
def __init__(
self,
server_url: str,
model: str = DEFAULT_MODEL,
cwd: str | None = None,
reasoning_effort: str | None = None,
timeout: int = DEFAULT_WORKER_TIMEOUT,
password: str | None = None,
):
self.server_url = server_url
self.model = model
self.cwd = cwd
self.timeout = timeout
self.password = password
self.usage = UsageMeter(self.model, reasoning_effort)
def complete(self, system: str, user: str) -> str:
text, meta = run_worker(
f"{system}\n\n{user}",
self.model,
server_url=self.server_url,
cwd=self.cwd,
timeout=self.timeout,
password=self.password,
)
self.usage.record(meta)
return text
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |